diff --git a/.github/calendar.yml b/.github/calendar.yml new file mode 100644 index 00000000000..7bc555c3f6e --- /dev/null +++ b/.github/calendar.yml @@ -0,0 +1,5 @@ +{ + '2018-01-30T00:00Z': 'endgame', + '2018-02-07T20:00Z': 'release', + '2018-02-12T20:00Z': 'development', +} \ No newline at end of file diff --git a/.github/classifier.yml b/.github/classifier.yml index 15bc6a788bd..572d3c9b40a 100644 --- a/.github/classifier.yml +++ b/.github/classifier.yml @@ -8,7 +8,7 @@ assignLabel: false }, color-picker: [], - css-less-sass: [], + css-less-sass: [ aeschli ], debug: { assignees: [ weinand ], assignLabel: false diff --git a/.github/endgame/insiders.yml b/.github/endgame/insiders.yml new file mode 100644 index 00000000000..f11bd611cb2 --- /dev/null +++ b/.github/endgame/insiders.yml @@ -0,0 +1,6 @@ +{ + insidersLabel: 'insiders', + insidersColor: '006b75', + action: 'add', + perform: true +} \ No newline at end of file diff --git a/.github/insiders.yml b/.github/insiders.yml index 5ad2cb40a96..e9a49ce7858 100644 --- a/.github/insiders.yml +++ b/.github/insiders.yml @@ -1,4 +1,6 @@ { insidersLabel: 'insiders', - perform: false + insidersColor: '006b75', + action: 'remove', + perform: true } \ No newline at end of file diff --git a/.github/new_release.yml b/.github/new_release.yml index 35090e12714..57bb4e0498d 100644 --- a/.github/new_release.yml +++ b/.github/new_release.yml @@ -1,5 +1,6 @@ { newReleaseLabel: 'new release', - newReleases: ['1.18.1'], - perform: false + newReleaseColor: '006b75', + action: 'remove', + perform: true } \ No newline at end of file diff --git a/.github/release/new_release.yml b/.github/release/new_release.yml new file mode 100644 index 00000000000..ea9a57986b1 --- /dev/null +++ b/.github/release/new_release.yml @@ -0,0 +1,6 @@ +{ + newReleaseLabel: 'new release', + newReleaseColor: '006b75', + action: 'add', + perform: true +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 5e4670ba0e3..8160fb09320 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,7 +1,6 @@ { "version": "0.1.0", "configurations": [ - { "type": "node", "request": "launch", @@ -160,6 +159,20 @@ "${workspaceFolder}/extensions/git/out/**/*.js" ] }, + { + "type": "extensionHost", + "request": "launch", + "name": "VS Code Markdown Extension Tests", + "runtimeExecutable": "${execPath}", + "args": [ + "${workspaceFolder}/extensions/markdown/test-fixtures", + "--extensionDevelopmentPath=${workspaceFolder}/extensions/markdown", + "--extensionTestsPath=${workspaceFolder}/extensions/markdown/out/test" + ], + "outFiles": [ + "${workspaceFolder}/extensions/markdown/out/**/*.js" + ] + }, { "type": "node", "request": "launch", diff --git a/build/builtInExtensions.json b/build/builtInExtensions.json index f7491809856..5c05672fc78 100644 --- a/build/builtInExtensions.json +++ b/build/builtInExtensions.json @@ -1,12 +1,12 @@ [ { "name": "ms-vscode.node-debug", - "version": "1.20.10", + "version": "1.21.1", "repo": "https://github.com/Microsoft/vscode-node-debug" }, { "name": "ms-vscode.node-debug2", - "version": "1.20.3", + "version": "1.21.1", "repo": "https://github.com/Microsoft/vscode-node-debug2" } ] \ No newline at end of file diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 240153c168d..69c7b1b4af9 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -565,6 +565,7 @@ function versionStringToNumber(versionStr) { return parseInt(match[1], 10) * 1e4 + parseInt(match[2], 10) * 1e2 + parseInt(match[3], 10); } +// This task is only run for the MacOS build gulp.task('generate-vscode-configuration', () => { return new Promise((resolve, reject) => { const buildDir = process.env['AGENT_BUILDDIRECTORY']; @@ -574,7 +575,8 @@ gulp.task('generate-vscode-configuration', () => { const userDataDir = path.join(os.tmpdir(), 'tmpuserdata'); const extensionsDir = path.join(os.tmpdir(), 'tmpextdir'); - const appPath = path.join(buildDir, 'VSCode-darwin/Visual\\ Studio\\ Code\\ -\\ Insiders.app/Contents/Resources/app/bin/code'); + const appName = process.env.VSCODE_QUALITY === 'insider' ? 'Visual\\ Studio\\ Code\\ -\\ Insiders.app' : 'Visual\\ Studio\\ Code.app'; + const appPath = path.join(buildDir, `VSCode-darwin/${appName}/Contents/Resources/app/bin/code`); const codeProc = cp.exec(`${appPath} --export-default-configuration='${allConfigDetailsPath}' --wait --user-data-dir='${userDataDir}' --extensions-dir='${extensionsDir}'`); const timer = setTimeout(() => { diff --git a/build/lib/i18n.resources.json b/build/lib/i18n.resources.json index 909ab84d057..a94b0a43327 100644 --- a/build/lib/i18n.resources.json +++ b/build/lib/i18n.resources.json @@ -66,6 +66,10 @@ "name": "vs/workbench/parts/markers", "project": "vscode-workbench" }, + { + "name": "vs/workbench/parts/localizations", + "project": "vscode-workbench" + }, { "name": "vs/workbench/parts/logs", "project": "vscode-workbench" diff --git a/build/npm/update-all-grammars.js b/build/npm/update-all-grammars.js index 6d6ccc21982..af2db363e6a 100644 --- a/build/npm/update-all-grammars.js +++ b/build/npm/update-all-grammars.js @@ -4,9 +4,11 @@ *--------------------------------------------------------------------------------------------*/ const cp = require('child_process'); -const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; +const fs = require('fs'); +const path = require('path'); function updateGrammar(location) { + const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; const result = cp.spawnSync(npm, ['run', 'update-grammar'], { cwd: location, stdio: 'inherit' @@ -17,50 +19,17 @@ function updateGrammar(location) { } } -const extensions = [ - 'bat', - 'clojure', - 'coffeescript', - 'cpp', - 'csharp', - 'css', - 'diff', - 'docker', - 'fsharp', - 'gitsyntax', - 'go', - 'groovy', - 'handlebars', - 'hlsl', - 'html', - 'ini', - 'java', - // 'javascript', updated through JavaScript - 'json', - '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', - 'swift', - 'typescript', - 'vb', - 'xml', - 'yaml' -]; +const allExtensionFolders = fs.readdirSync('extensions'); +const extensions = allExtensionFolders.filter(e => { + try { + let packageJSON = JSON.parse(fs.readFileSync(path.join('extensions', e, 'package.json')).toString()); + return packageJSON && packageJSON.scripts && packageJSON.scripts['update-grammar']; + } catch (e) { + return false; + } +}); + +console.log(`Updating ${extensions.length} grammars...`); extensions.forEach(extension => updateGrammar(`extensions/${extension}`)); @@ -70,4 +39,5 @@ 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/build/tfs/common/node.sh b/build/tfs/common/node.sh index 23404689de5..cc1bb74d01f 100755 --- a/build/tfs/common/node.sh +++ b/build/tfs/common/node.sh @@ -4,9 +4,9 @@ set -e # setup nvm if [[ "$OSTYPE" == "darwin"* ]]; then export NVM_DIR=~/.nvm - source $(brew --prefix nvm)/nvm.sh + source $(brew --prefix nvm)/nvm.sh --no-use else - source $NVM_DIR/nvm.sh + source $NVM_DIR/nvm.sh --no-use fi # install node diff --git a/build/win32/code.iss b/build/win32/code.iss index 2045e468961..22c0096e0c5 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -1027,7 +1027,7 @@ begin Sleep(1000); end; - Exec(ExpandConstant('{app}\inno_updater.exe'), ExpandConstant('_ "{app}\unins000.dat" ' + BoolToStr(LockFileExists())), '', SW_SHOW, ewWaitUntilTerminated, UpdateResultCode); + Exec(ExpandConstant('{app}\inno_updater.exe'), ExpandConstant('"{app}\{#ExeBasename}.exe" ' + BoolToStr(LockFileExists())), '', SW_SHOW, ewWaitUntilTerminated, UpdateResultCode); end; end; diff --git a/build/win32/inno_updater.exe b/build/win32/inno_updater.exe index 2d5d1ab1d49..ffc04fb7661 100644 Binary files a/build/win32/inno_updater.exe and b/build/win32/inno_updater.exe differ diff --git a/extensions/clojure/syntaxes/clojure.tmLanguage.json b/extensions/clojure/syntaxes/clojure.tmLanguage.json index 01960657b6a..033e3e2a178 100644 --- a/extensions/clojure/syntaxes/clojure.tmLanguage.json +++ b/extensions/clojure/syntaxes/clojure.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/atom/language-clojure/commit/71068a45499cace7a69c45e337860ebbc9b7fccc", + "version": "https://github.com/atom/language-clojure/commit/ecc790326bc8e14220e4d2d72a392a30876c3219", "scopeName": "source.clojure", "fileTypes": [ "boot", @@ -326,7 +326,7 @@ "include": "#dynamic-variables" }, { - "match": "([\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]+)", + "match": "([a-zA-Z\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)", "name": "entity.global.clojure" }, { @@ -404,7 +404,7 @@ "namespace-symbol": { "patterns": [ { - "match": "([\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]+)/", + "match": "([a-zA-Z\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)/", "captures": { "1": { "name": "meta.symbol.namespace.clojure" @@ -416,7 +416,7 @@ "symbol": { "patterns": [ { - "match": "([\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]+)", + "match": "([a-zA-Z\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)", "name": "meta.symbol.clojure" } ] diff --git a/extensions/clojure/test/colorize-results/test_clj.json b/extensions/clojure/test/colorize-results/test_clj.json index 190c08af9f3..8a704fb9683 100644 --- a/extensions/clojure/test/colorize-results/test_clj.json +++ b/extensions/clojure/test/colorize-results/test_clj.json @@ -199,13 +199,13 @@ }, { "c": "42", - "t": "source.clojure meta.expression.clojure meta.definition.global.clojure entity.global.clojure", + "t": "source.clojure meta.expression.clojure meta.definition.global.clojure constant.numeric.long.clojure", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "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" } }, { @@ -1342,7 +1342,18 @@ } }, { - "c": "+ ", + "c": "+", + "t": "source.clojure meta.quoted-expression.clojure meta.symbol.clojure", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.clojure meta.quoted-expression.clojure", "r": { "dark_plus": "default: #D4D4D4", @@ -1870,7 +1881,29 @@ } }, { - "c": " v ", + "c": " ", + "t": "source.clojure meta.expression.clojure meta.definition.global.clojure", + "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.clojure meta.expression.clojure meta.definition.global.clojure entity.global.clojure", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.clojure meta.expression.clojure meta.definition.global.clojure", "r": { "dark_plus": "default: #D4D4D4", @@ -2134,7 +2167,29 @@ } }, { - "c": " v ", + "c": " ", + "t": "source.clojure meta.expression.clojure", + "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.clojure meta.expression.clojure meta.symbol.clojure", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.clojure meta.expression.clojure", "r": { "dark_plus": "default: #D4D4D4", @@ -2310,7 +2365,18 @@ } }, { - "c": "v ", + "c": "v", + "t": "source.clojure meta.symbol.clojure", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.clojure", "r": { "dark_plus": "default: #D4D4D4", @@ -2431,7 +2497,29 @@ } }, { - "c": " m ", + "c": " ", + "t": "source.clojure meta.expression.clojure meta.definition.global.clojure", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "m", + "t": "source.clojure meta.expression.clojure meta.definition.global.clojure entity.global.clojure", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.clojure meta.expression.clojure meta.definition.global.clojure", "r": { "dark_plus": "default: #D4D4D4", @@ -2574,7 +2662,29 @@ } }, { - "c": " m ", + "c": " ", + "t": "source.clojure meta.expression.clojure", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "m", + "t": "source.clojure meta.expression.clojure meta.symbol.clojure", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.clojure meta.expression.clojure", "r": { "dark_plus": "default: #D4D4D4", @@ -2684,7 +2794,29 @@ } }, { - "c": " m ", + "c": " ", + "t": "source.clojure meta.expression.clojure", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "m", + "t": "source.clojure meta.expression.clojure meta.symbol.clojure", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.clojure meta.expression.clojure", "r": { "dark_plus": "default: #D4D4D4", diff --git a/extensions/configuration-editing/src/extension.ts b/extensions/configuration-editing/src/extension.ts index 76d473c365e..2266b8005af 100644 --- a/extensions/configuration-editing/src/extension.ts +++ b/extensions/configuration-editing/src/extension.ts @@ -28,9 +28,6 @@ export function activate(context: vscode.ExtensionContext): void { //extensions suggestions context.subscriptions.push(...registerExtensionsCompletions()); - //locale suggestions - context.subscriptions.push(registerLocaleCompletionsInLanguageDocument()); - // launch.json decorations context.subscriptions.push(vscode.window.onDidChangeActiveTextEditor(editor => updateLaunchJsonDecorations(editor), null, context.subscriptions)); context.subscriptions.push(vscode.workspace.onDidChangeTextDocument(event => { @@ -109,20 +106,6 @@ function registerSettingsCompletions(): vscode.Disposable { }); } -function registerLocaleCompletionsInLanguageDocument(): vscode.Disposable { - return vscode.languages.registerCompletionItemProvider({ pattern: '**/locale.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] === 'locale') { - const extensionsContent = parse(document.getText()); - return provideContributedLocalesProposals(range); - } - return []; - } - }); -} - function provideContributedLocalesProposals(range: vscode.Range): vscode.ProviderResult { const contributedLocales: string[] = []; for (const extension of vscode.extensions.all) { diff --git a/extensions/cpp/build/update-grammars.js b/extensions/cpp/build/update-grammars.js new file mode 100644 index 00000000000..f02f51ca2cc --- /dev/null +++ b/extensions/cpp/build/update-grammars.js @@ -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'; + +var updateGrammar = require('../../../build/npm/update-grammar'); + +updateGrammar.update('atom/language-c', 'grammars/c.cson', './syntaxes/c.tmLanguage.json'); +updateGrammar.update('atom/language-c', 'grammars/c%2B%2B.cson', './syntaxes/cpp.tmLanguage.json'); + +// `source.c.platform` which is still included by other grammars +updateGrammar.update('textmate/c.tmbundle', 'Syntaxes/Platform.tmLanguage', './syntaxes/platform.tmLanguage.json'); + diff --git a/extensions/cpp/package.json b/extensions/cpp/package.json index 169cabff934..bb2f0b6aaab 100644 --- a/extensions/cpp/package.json +++ b/extensions/cpp/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js atom/language-c grammars/c.cson ./syntaxes/c.json grammars/c%2B%2B.cson ./syntaxes/c++.json" + "update-grammar": "node ./build/update-grammars.js" }, "contributes": { "languages": [{ @@ -22,16 +22,16 @@ "grammars": [{ "language": "c", "scopeName": "source.c", - "path": "./syntaxes/c.json" + "path": "./syntaxes/c.tmLanguage.json" }, { "language": "cpp", "scopeName": "source.cpp", - "path": "./syntaxes/c++.json" + "path": "./syntaxes/cpp.tmLanguage.json" }, { "scopeName": "source.c.platform", - "path": "./syntaxes/Platform.tmLanguage" + "path": "./syntaxes/platform.tmLanguage.json" }], "snippets": [{ "language": "c", diff --git a/extensions/cpp/syntaxes/Platform.tmLanguage b/extensions/cpp/syntaxes/Platform.tmLanguage deleted file mode 100644 index 1f16cf6e69c..00000000000 --- a/extensions/cpp/syntaxes/Platform.tmLanguage +++ /dev/null @@ -1,237 +0,0 @@ - - - - - fileTypes - - hideFromUser - - name - Platform - patterns - - - match - \b(?:CF(?:ByteOrder(?:BigEndian|LittleEndian|Unknown)|NotificationSuspensionBehavior(?:Coalesce|D(?:eliverImmediately|rop)|Hold))|kCF(?:B(?:ookmarkResolutionWithout(?:MountingMask|UIMask)|undleExecutableArchitecture(?:I386|PPC(?:64)?|X86_64))|C(?:alendar(?:ComponentsWrap|Unit(?:Day|Era|Hour|M(?:inute|onth)|Quarter|Second|Week(?:Of(?:Month|Year)|day(?:Ordinal)?)?|Year(?:ForWeekOfYear)?))|haracterSet(?:AlphaNumeric|C(?:apitalizedLetter|ontrol)|Dec(?:imalDigit|omposable)|Illegal|L(?:etter|owercaseLetter)|N(?:ewline|onBase)|Punctuation|Symbol|UppercaseLetter|Whitespace(?:AndNewline)?)|ompare(?:Anchored|Backwards|CaseInsensitive|DiacriticInsensitive|EqualTo|ForcedOrdering|GreaterThan|L(?:essThan|ocalized)|N(?:onliteral|umerically)|WidthInsensitive))|Dat(?:aSearch(?:Anchored|Backwards)|eFormatter(?:FullStyle|LongStyle|MediumStyle|NoStyle|ShortStyle))|File(?:Descriptor(?:ReadCallBack|WriteCallBack)|SecurityClear(?:AccessControlList|Group(?:UUID)?|Mode|Owner(?:UUID)?))|Gregorian(?:AllUnits|Units(?:Days|Hours|M(?:inutes|onths)|Seconds|Years))|LocaleLanguageDirection(?:BottomToTop|LeftToRight|RightToLeft|TopToBottom|Unknown)|MessagePort(?:BecameInvalidError|IsInvalid|ReceiveTimeout|S(?:endTimeout|uccess)|TransportError)|N(?:ot(?:Found|ification(?:DeliverImmediately|PostToAllSessions))|umber(?:C(?:FIndexType|GFloatType|harType)|DoubleType|F(?:loat(?:32Type|64Type|Type)|ormatter(?:CurrencyStyle|DecimalStyle|NoStyle|P(?:a(?:d(?:After(?:Prefix|Suffix)|Before(?:Prefix|Suffix))|rseIntegersOnly)|ercentStyle)|Round(?:Ceiling|Down|Floor|Half(?:Down|Even|Up)|Up)|S(?:cientificStyle|pellOutStyle)))|IntType|Long(?:LongType|Type)|MaxType|NSIntegerType|S(?:Int(?:16Type|32Type|64Type|8Type)|hortType)))|PropertyList(?:BinaryFormat_v1_0|Immutable|MutableContainers(?:AndLeaves)?|OpenStepFormat|Read(?:CorruptError|StreamError|UnknownVersionError)|WriteStreamError|XMLFormat_v1_0)|RunLoop(?:A(?:fterWaiting|llActivities)|Before(?:Sources|Timers|Waiting)|E(?:ntry|xit)|Run(?:Finished|HandledSource|Stopped|TimedOut))|S(?:ocket(?:A(?:cceptCallBack|utomaticallyReenable(?:AcceptCallBack|DataCallBack|ReadCallBack|WriteCallBack))|C(?:loseOnInvalidate|onnectCallBack)|DataCallBack|Error|LeaveErrors|NoCallBack|ReadCallBack|Success|Timeout|WriteCallBack)|tr(?:eam(?:E(?:rrorDomain(?:Custom|MacOSStatus|POSIX)|vent(?:CanAcceptBytes|E(?:ndEncountered|rrorOccurred)|HasBytesAvailable|None|OpenCompleted))|Status(?:AtEnd|Closed|Error|NotOpen|Open(?:ing)?|Reading|Writing))|ing(?:Encoding(?:A(?:NSEL|SCII)|Big5(?:_(?:E|HKSCS_1999))?|CNS_11643_92_P(?:1|2|3)|DOS(?:Arabic|BalticRim|C(?:anadianFrench|hinese(?:Simplif|Trad)|yrillic)|Greek(?:1|2)?|Hebrew|Icelandic|Japanese|Korean|Latin(?:1|2|US)|Nordic|Portuguese|Russian|T(?:hai|urkish))|E(?:BCDIC_(?:CP037|US)|UC_(?:CN|JP|KR|TW))|GB(?:K_95|_(?:18030_2000|2312_80))|HZ_GB_2312|ISO(?:Latin(?:1(?:0)?|2|3|4|5|6|7|8|9|Arabic|Cyrillic|Greek|Hebrew|Thai)|_2022_(?:CN(?:_EXT)?|JP(?:_(?:1|2|3))?|KR))|JIS_(?:C6226_78|X02(?:0(?:1_76|8_(?:83|90))|12_90))|K(?:OI8_(?:R|U)|SC_5601_(?:87|92_Johab))|Mac(?:Ar(?:abic|menian)|B(?:engali|urmese)|C(?:e(?:ltic|ntralEurRoman)|hinese(?:Simp|Trad)|roatian|yrillic)|D(?:evanagari|ingbats)|E(?:thiopic|xtArabic)|Farsi|G(?:aelic|eorgian|reek|u(?:jarati|rmukhi))|H(?:FS|ebrew)|I(?:celandic|nuit)|Japanese|K(?:annada|hmer|orean)|Laotian|M(?:alayalam|ongolian)|Oriya|Roman(?:Latin1|ian)?|S(?:inhalese|ymbol)|T(?:amil|elugu|hai|ibetan|urkish)|Ukrainian|V(?:T100|ietnamese))|N(?:extStep(?:Japanese|Latin)|onLossyASCII)|ShiftJIS(?:_X0213(?:_(?:00|MenKuTen))?)?|U(?:TF(?:16(?:BE|LE)?|32(?:BE|LE)?|7(?:_IMAP)?|8)|nicode)|VISCII|Windows(?:Arabic|BalticRim|Cyrillic|Greek|Hebrew|KoreanJohab|Latin(?:1|2|5)|Vietnamese))|NormalizationForm(?:C|D|K(?:C|D))|Tokenizer(?:AttributeLa(?:nguage|tinTranscription)|Token(?:Has(?:DerivedSubTokensMask|HasNumbersMask|NonLettersMask|SubTokensMask)|IsCJWordMask|No(?:ne|rmal))|Unit(?:LineBreak|Paragraph|Sentence|Word(?:Boundary)?)))))|TimeZoneNameStyle(?:DaylightSaving|Generic|S(?:hort(?:DaylightSaving|Generic|Standard)|tandard))|U(?:RL(?:Bookmark(?:Creation(?:MinimalBookmarkMask|PreferFileIDResolutionMask|S(?:ecurityScopeAllowOnlyReadAccess|uitableForBookmarkFile)|WithSecurityScope)|ResolutionWith(?:SecurityScope|out(?:MountingMask|UIMask)))|Component(?:Fragment|Host|NetLocation|P(?:a(?:rameterString|ssword|th)|ort)|Query|ResourceSpecifier|Scheme|User(?:Info)?)|Enumerator(?:D(?:e(?:faultBehavior|scendRecursively)|irectoryPostOrderSuccess)|E(?:nd|rror)|GenerateFileReferenceURLs|IncludeDirectoriesP(?:ostOrder|reOrder)|S(?:kip(?:Invisibles|PackageContents)|uccess))|HFSPathStyle|ImproperArgumentsError|P(?:OSIXPathStyle|ropertyKeyUnavailableError)|Re(?:moteHostUnavailableError|source(?:AccessViolationError|NotFoundError))|TimeoutError|Unknown(?:Error|PropertyKeyError|SchemeError)|WindowsPathStyle)|serNotification(?:AlternateResponse|Ca(?:ncelResponse|utionAlertLevel)|DefaultResponse|No(?:DefaultButtonFlag|teAlertLevel)|OtherResponse|PlainAlertLevel|StopAlertLevel|UseRadioButtonsFlag))|XML(?:E(?:ntityType(?:Character|Par(?:ameter|sed(?:External|Internal))|Unparsed)|rror(?:E(?:lementlessDocument|ncodingConversionFailure)|Malformed(?:C(?:DSect|haracterReference|loseTag|omment)|D(?:TD|ocument)|Name|P(?:arsedCharacterData|rocessingInstruction)|StartTag)|NoData|Un(?:expectedEOF|knownEncoding)))|Node(?:CurrentVersion|Type(?:Attribute(?:ListDeclaration)?|C(?:DATASection|omment)|Document(?:Fragment|Type)?|E(?:lement(?:TypeDeclaration)?|ntity(?:Reference)?)|Notation|ProcessingInstruction|Text|Whitespace))|Parser(?:A(?:ddImpliedAttributes|llOptions)|NoOptions|Re(?:placePhysicalEntities|solveExternalEntities)|Skip(?:MetaData|Whitespace)|ValidateDocument)|StatusParse(?:InProgress|NotBegun|Successful))))\b - name - support.constant.cf.c - - - match - \b(?:FILESEC_(?:ACL(?:_(?:ALLOCSIZE|RAW))?|GR(?:OUP|PUUID)|MODE|OWNER|UUID)|P_(?:ALL|P(?:GID|ID)))\b - name - support.constant.clib.c - - - match - \bDISPATCH_BLOCK_(?:ASSIGN_CURRENT|BARRIER|DETACHED|ENFORCE_QOS_CLASS|INHERIT_QOS_CLASS|NO_QOS_CLASS)\b - name - support.constant.dispatch.c - - - match - \b(?:alphaStage|b(?:etaStage|old)|condense|developStage|extend|finalStage|italic|k(?:NilOptions|UnknownType|VariableLengthArray)|no(?:Err|rmal)|outline|shadow|underline)\b - name - support.constant.mac-classic.c - - - match - \bOS(?:BigEndian|LittleEndian|UnknownByteOrder)\b - name - support.constant.os.c - - - match - \b(?:CG(?:GlyphM(?:ax|in)|PDFDataFormat(?:JPEG(?:2000|Encoded)|Raw)|RectM(?:ax(?:XEdge|YEdge)|in(?:XEdge|YEdge)))|kCG(?:A(?:nnotatedSessionEventTap|ssistiveTechHighWindowLevelKey)|B(?:a(?:ck(?:ingStore(?:Buffered|Nonretained|Retained)|stopMenuLevelKey)|seWindowLevelKey)|itmap(?:AlphaInfoMask|ByteOrder(?:16(?:Big|Little)|32(?:Big|Little)|Default|Mask)|FloatComponents)|lendMode(?:C(?:lear|o(?:lor(?:Burn|Dodge)?|py))|D(?:arken|estination(?:Atop|In|O(?:ut|ver))|ifference)|Exclusion|H(?:ardLight|ue)|L(?:ighten|uminosity)|Multiply|Normal|Overlay|Plus(?:Darker|Lighter)|S(?:aturation|creen|o(?:ftLight|urce(?:Atop|In|Out)))|XOR))|C(?:aptureNo(?:Fill|Options)|o(?:lorSpaceModel(?:CMYK|DeviceN|Indexed|Lab|Monochrome|Pattern|RGB|Unknown)|nfigure(?:For(?:AppOnly|Session)|Permanently))|ursorWindowLevelKey)|D(?:esktop(?:IconWindowLevelKey|WindowLevelKey)|isplay(?:AddFlag|BeginConfigurationFlag|D(?:esktopShapeChangedFlag|isabledFlag)|EnabledFlag|M(?:irrorFlag|ovedFlag)|RemoveFlag|S(?:etM(?:ainFlag|odeFlag)|tream(?:FrameStatus(?:Frame(?:Blank|Complete|Idle)|Stopped)|Update(?:DirtyRects|MovedRects|Re(?:ducedDirtyRects|freshedRects))))|UnMirrorFlag)|ockWindowLevelKey|raggingWindowLevelKey)|E(?:ncoding(?:FontSpecific|MacRoman)|rror(?:CannotComplete|Failure|I(?:llegalArgument|nvalid(?:Con(?:nection|text)|Operation))|No(?:neAvailable|tImplemented)|RangeCheck|Success|TypeCheck)|vent(?:F(?:ilterMaskPermit(?:Local(?:KeyboardEvents|MouseEvents)|SystemDefinedEvents)|lag(?:Mask(?:Al(?:phaShift|ternate)|Co(?:mmand|ntrol)|Help|N(?:onCoalesced|umericPad)|S(?:econdaryFn|hift))|sChanged))|Key(?:Down|Up)|LeftMouse(?:D(?:own|ragged)|Up)|Mouse(?:Moved|Subtype(?:Default|TabletP(?:oint|roximity)))|Null|OtherMouse(?:D(?:own|ragged)|Up)|RightMouse(?:D(?:own|ragged)|Up)|S(?:crollWheel|ource(?:GroupID|State(?:CombinedSessionState|HIDSystemState|ID|Private)|U(?:nixProcessID|ser(?:Data|ID)))|uppressionState(?:RemoteMouseDrag|SuppressionInterval))|Ta(?:bletP(?:ointer|roximity)|p(?:DisabledBy(?:Timeout|UserInput)|Option(?:Default|ListenOnly))|rget(?:ProcessSerialNumber|UnixProcessID))))|F(?:loatingWindowLevelKey|ont(?:Index(?:Invalid|Max)|PostScriptFormatType(?:1|3|42)))|G(?:esturePhase(?:Began|C(?:ancelled|hanged)|Ended|MayBegin|None)|lyphMax|radientDraws(?:AfterEndLocation|BeforeStartLocation))|H(?:IDEventTap|e(?:adInsertEventTap|lpWindowLevelKey))|I(?:mageAlpha(?:First|Last|None(?:Skip(?:First|Last))?|Only|Premultiplied(?:First|Last))|nterpolation(?:Default|High|Low|Medium|None))|KeyboardEvent(?:Autorepeat|Key(?:boardType|code))|Line(?:Cap(?:Butt|Round|Square)|Join(?:Bevel|Miter|Round))|M(?:a(?:inMenuWindowLevelKey|ximumWindowLevelKey)|inimumWindowLevelKey|o(?:dalPanelWindowLevelKey|mentumScrollPhase(?:Begin|Continue|End|None)|use(?:Button(?:Center|Left|Right)|Event(?:ButtonNumber|ClickState|Delta(?:X|Y)|InstantMouser|Number|Pressure|Subtype|WindowUnderMousePointer(?:ThatCanHandleThisEvent)?))))|N(?:ormalWindowLevelKey|umberOf(?:EventSuppressionStates|WindowLevelKeys))|OverlayWindowLevelKey|P(?:DF(?:ArtBox|BleedBox|CropBox|MediaBox|ObjectType(?:Array|Boolean|Dictionary|Integer|N(?:ame|ull)|Real|Str(?:eam|ing))|TrimBox)|at(?:h(?:E(?:OFill(?:Stroke)?|lement(?:Add(?:CurveToPoint|LineToPoint|QuadCurveToPoint)|CloseSubpath|MoveToPoint))|Fill(?:Stroke)?|Stroke)|ternTiling(?:ConstantSpacing(?:MinimalDistortion)?|NoDistortion))|opUpMenuWindowLevelKey)|RenderingIntent(?:AbsoluteColorimetric|Default|Perceptual|RelativeColorimetric|Saturation)|S(?:cr(?:een(?:SaverWindowLevelKey|UpdateOperation(?:Move|Re(?:ducedDirtyRectangleCount|fresh)))|oll(?:EventUnit(?:Line|Pixel)|Phase(?:Began|C(?:ancelled|hanged)|Ended|MayBegin)|WheelEvent(?:DeltaAxis(?:1|2|3)|FixedPtDeltaAxis(?:1|2|3)|I(?:nstantMouser|sContinuous)|MomentumPhase|PointDeltaAxis(?:1|2|3)|Scroll(?:Count|Phase))))|essionEventTap|tatusWindowLevelKey)|T(?:a(?:blet(?:Event(?:DeviceID|Point(?:Buttons|Pressure|X|Y|Z)|Rotation|T(?:angentialPressure|ilt(?:X|Y))|Vendor(?:1|2|3))|ProximityEvent(?:CapabilityMask|DeviceID|EnterProximity|Pointer(?:ID|Type)|SystemTabletID|TabletID|Vendor(?:ID|Pointer(?:SerialNumber|Type)|UniqueID)))|ilAppendEventTap)|ext(?:Clip|Fill(?:Clip|Stroke(?:Clip)?)?|Invisible|Stroke(?:Clip)?)|ornOffMenuWindowLevelKey)|UtilityWindowLevelKey|Window(?:Image(?:B(?:estResolution|oundsIgnoreFraming)|Default|NominalResolution|OnlyShadows|ShouldBeOpaque)|List(?:ExcludeDesktopElements|Option(?:All|IncludingWindow|OnScreen(?:AboveWindow|BelowWindow|Only)))|Sharing(?:None|Read(?:Only|Write)))))\b - name - support.constant.quartz.c - - - match - \b(?:CF(?:A(?:bsoluteTime|llocator(?:AllocateCallBack|Co(?:ntext|pyDescriptionCallBack)|DeallocateCallBack|PreferredSizeCallBack|Re(?:allocateCallBack|f|leaseCallBack|tainCallBack))|rray(?:ApplierFunction|C(?:allBacks|opyDescriptionCallBack)|EqualCallBack|Re(?:f|leaseCallBack|tainCallBack))|ttributedStringRef)|B(?:ag(?:ApplierFunction|C(?:allBacks|opyDescriptionCallBack)|EqualCallBack|HashCallBack|Re(?:f|leaseCallBack|tainCallBack))|i(?:naryHeap(?:ApplierFunction|C(?:allBacks|ompareContext)|Ref)|t(?:VectorRef)?)|ooleanRef|undleRef(?:Num)?|yteOrder)|C(?:alendar(?:Ref|Unit)|haracterSet(?:PredefinedSet|Ref)|ompar(?:atorFunction|isonResult))|D(?:at(?:a(?:Ref|SearchFlags)|e(?:Formatter(?:Ref|Style)|Ref))|ictionary(?:ApplierFunction|CopyDescriptionCallBack|EqualCallBack|HashCallBack|KeyCallBacks|Re(?:f|leaseCallBack|tainCallBack)|ValueCallBacks))|ErrorRef|File(?:Descriptor(?:C(?:allBack|ontext)|NativeDescriptor|Ref)|Security(?:ClearOptions|Ref))|Gregorian(?:Date|Unit(?:Flags|s))|HashCode|Index|Locale(?:LanguageDirection|Ref)|M(?:achPort(?:C(?:allBack|ontext)|InvalidationCallBack|Ref)|essagePort(?:C(?:allBack|ontext)|InvalidationCallBack|Ref)|utable(?:A(?:rrayRef|ttributedStringRef)|B(?:agRef|itVectorRef)|CharacterSetRef|D(?:ataRef|ictionaryRef)|S(?:etRef|tringRef)))|N(?:otification(?:C(?:allback|enterRef)|SuspensionBehavior)|u(?:llRef|mber(?:Formatter(?:OptionFlags|PadPosition|R(?:ef|oundingMode)|Style)|Ref|Type)))|OptionFlags|P(?:lugIn(?:DynamicRegisterFunction|FactoryFunction|Instance(?:DeallocateInstanceDataFunction|GetInterfaceFunction|Ref)|Ref|UnloadFunction)|ropertyList(?:Format|MutabilityOptions|Ref))|R(?:ange|eadStream(?:ClientCallBack|Ref)|unLoop(?:Activity|Observer(?:C(?:allBack|ontext)|Ref)|Ref|Source(?:Context(?:1)?|Ref)|Timer(?:C(?:allBack|ontext)|Ref)))|S(?:et(?:ApplierFunction|C(?:allBacks|opyDescriptionCallBack)|EqualCallBack|HashCallBack|Re(?:f|leaseCallBack|tainCallBack))|ocket(?:C(?:allBack(?:Type)?|ontext)|Error|NativeHandle|Ref|Signature)|tr(?:eam(?:ClientContext|E(?:rror(?:Domain)?|ventType)|Status)|ing(?:BuiltInEncodings|CompareFlags|Encoding(?:s)?|InlineBuffer|NormalizationForm|Ref|Tokenizer(?:Ref|TokenType)))|wappedFloat(?:32|64))|T(?:ime(?:Interval|Zone(?:NameStyle|Ref))|ree(?:ApplierFunction|Co(?:ntext|pyDescriptionCallBack)|Re(?:f|leaseCallBack|tainCallBack))|ype(?:ID|Ref))|U(?:RL(?:Bookmark(?:CreationOptions|FileCreationOptions|ResolutionOptions)|ComponentType|E(?:numerator(?:Options|Re(?:f|sult))|rror)|PathStyle|Ref)|UID(?:Bytes|Ref)|serNotification(?:CallBack|Ref))|WriteStream(?:ClientCallBack|Ref)|XML(?:Attribute(?:DeclarationInfo|ListDeclarationInfo)|Document(?:Info|TypeInfo)|E(?:lement(?:Info|TypeDeclarationInfo)|ntity(?:Info|ReferenceInfo|TypeCode)|xternalID)|No(?:de(?:Ref|TypeCode)|tationInfo)|P(?:arser(?:AddChildCallBack|C(?:allBacks|o(?:ntext|pyDescriptionCallBack)|reateXMLStructureCallBack)|EndXMLStructureCallBack|HandleErrorCallBack|Options|Re(?:f|leaseCallBack|solveExternalEntityCallBack|tainCallBack)|StatusCode)|rocessingInstructionInfo)|TreeRef))|FSRef)\b - name - support.type.cf.c - - - match - \b(?:FILE|accessx_descriptor|blk(?:cnt_t|size_t)|c(?:addr_t|lock_t|t_rune_t)|d(?:addr_t|ev_t|iv_t|ouble_t)|errno_t|f(?:bootstraptransfer(?:_t)?|codeblobs(?:_t)?|d_(?:mask|set)|i(?:lesec_(?:property_t|t)|xpt_t)|lo(?:at_t|ck(?:timeout)?)|pos_t|s(?:blkcnt_t|filcnt_t|ignatures(?:_t)?|searchblock|tore(?:_t)?))|g(?:id_t|uid_t)|i(?:d(?:_t|type_t)|n(?:_(?:addr_t|port_t)|o(?:64_t|_t)|t(?:16_t|32_t|64_t|8_t|_(?:fast(?:16_t|32_t|64_t|8_t)|least(?:16_t|32_t|64_t|8_t))|max_t|ptr_t)))|jmp_buf|key_t|l(?:conv|div_t|ldiv_t|og2phys)|m(?:a(?:ch_port_t|x_align_t)|ode_t)|nlink_t|off_t|p(?:id_t|roc_rlimit_control_wakeupmon|trdiff_t)|q(?:addr_t|uad_t)|r(?:advisory|egister_t|lim(?:_t|it)|size_t|u(?:ne_t|sage(?:_info_(?:current|t|v(?:0|1|2|3)))?))|s(?:e(?:archstate|gsz_t)|i(?:g(?:_(?:atomic_t|t)|action|event|info_t|jmp_buf|s(?:et_t|tack)|vec)|ze_t)|size_t|tack_t|useconds_t|wblk_t|yscall_arg_t)|t(?:ime(?:_t|spec|val)|m)|u(?:_(?:char|int(?:16_t|32_t|64_t|8_t)?|long|quad_t|short)|context_t|i(?:d_t|nt(?:16_t|32_t|64_t|8_t|_(?:fast(?:16_t|32_t|64_t|8_t)|least(?:16_t|32_t|64_t|8_t))|max_t|ptr_t)?)|s(?:e(?:conds_t|r_(?:addr_t|long_t|off_t|s(?:ize_t|size_t)|time_t|ulong_t))|hort)|uid_t)|va_list|wint_t)\b - name - support.type.clib.c - - - match - \b(?:dispatch_(?:block_(?:flags_t|t)|data_(?:applier_t|s|t)|f(?:d_t|unction_t)|group_t|io_(?:close_flags_t|handler_t|interval_flags_t|t(?:ype_t)?)|o(?:bject_t|nce_t)|q(?:os_class_t|ueue_(?:attr_(?:s|t)|priority_t|s|t))|s(?:emaphore_t|ource_(?:m(?:ach_send_flags_t|emorypressure_flags_t)|proc_flags_t|t(?:imer_flags_t|ype_(?:s|t))?|vnode_flags_t))|time_t)|timespec)\b - name - support.type.dispatch.c - - - match - \b(?:AbsoluteTime|B(?:oolean|yte(?:Count|Offset|Ptr)?)|C(?:harParameter|o(?:mpTimeValue|nst(?:LogicalAddress|Str(?:15Param|2(?:55Param|7Param)|3(?:1Param|2Param)|63Param|FileNameParam|ingPtr))))|Duration|F(?:ixed(?:P(?:oint|tr)|Rect)?|loat(?:32(?:Point)?|64|80|96)|ourCharCode|ract(?:Ptr)?)|Handle|ItemCount|L(?:angCode|ogicalAddress)|NumVersion(?:Variant(?:Handle|Ptr)?)?|O(?:S(?:Err|Status|Type(?:Ptr)?)|ptionBits)|P(?:BVersion|RefCon|hysicalAddress|oint(?:Ptr)?|roc(?:Handle|Ptr|essSerialNumber(?:Ptr)?)|tr)|Re(?:ct(?:Ptr)?|gi(?:onCode|ster68kProcPtr)|sType(?:Ptr)?)|S(?:Int(?:16|32|64|8)|RefCon|criptCode|hortFixed(?:Ptr)?|i(?:gnedByte|ze)|t(?:r(?:15|2(?:55|7)|3(?:1|2(?:Field)?)|63|FileName|ing(?:Handle|Ptr))|yle(?:Field|Parameter)?))|Time(?:Base(?:Record)?|Record|Scale|Value(?:64)?)|U(?:Int(?:16|32|64|8)|RefCon|TF(?:16Char|32Char|8Char)|n(?:i(?:Char(?:Count(?:Ptr)?|Ptr)?|codeScalarValue|versalProc(?:Handle|Ptr))|signed(?:Fixed(?:Ptr)?|Wide(?:Ptr)?)))|V(?:HSelect|ersRec(?:Hndl|Ptr)?)|WidePtr|extended(?:80|96)|wide)\b - name - support.type.mac-classic.c - - - match - \b(?:pthread_(?:attr_t|cond(?:_t|attr_t)|key_t|mutex(?:_t|attr_t)|o(?:nce_t|verride_(?:s|t))|rwlock(?:_t|attr_t)|t)|sched_param)\b - name - support.type.pthread.c - - - match - \bCG(?:AffineTransform|B(?:itmap(?:ContextReleaseDataCallback|Info)|lendMode|uttonCount)|C(?:aptureOptions|harCode|o(?:lor(?:Re(?:f|nderingIntent)|Space(?:Model|Ref)?)?|n(?:figureOption|text(?:Ref)?)))|D(?:ata(?:Consumer(?:Callbacks|PutBytesCallback|Re(?:f|leaseInfoCallback))?|Provider(?:DirectCallbacks|GetByte(?:PointerCallback|s(?:AtPositionCallback|Callback))|Re(?:f|lease(?:BytePointerCallback|DataCallback|InfoCallback)|windCallback)|S(?:equentialCallbacks|kipForwardCallback))?)|eviceColor|i(?:rectDisplayID|splay(?:BlendFraction|C(?:hangeSummaryFlags|o(?:nfigRef|unt))|Err|Fade(?:Interval|ReservationToken)|Mode(?:Ref)?|Re(?:configurationCallBack|servationInterval)|Stream(?:Frame(?:AvailableHandler|Status)|Ref|Update(?:Re(?:ctType|f))?)?)))|E(?:rror|vent(?:Err|F(?:i(?:eld|lterMask)|lags)|M(?:ask|ouseSubtype)|Ref|S(?:ource(?:KeyboardType|Ref|StateID)|uppressionState)|T(?:ap(?:CallBack|Information|Location|Options|P(?:lacement|roxy))|imestamp|ype)))|F(?:loat|ont(?:Index|PostScriptFormat|Ref)?|unction(?:Callbacks|EvaluateCallback|Re(?:f|leaseInfoCallback))?)|G(?:ammaValue|esturePhase|lyph|radient(?:DrawingOptions|Ref)?)|I(?:mage(?:AlphaInfo|Ref)?|nterpolationQuality)|KeyCode|L(?:ayer(?:Ref)?|ine(?:Cap|Join))|M(?:o(?:mentumScrollPhase|useButton)|utablePathRef)|OpenGLDisplayMask|P(?:DF(?:Array(?:Ref)?|Bo(?:olean|x)|ContentStream(?:Ref)?|D(?:ataFormat|ictionary(?:ApplierFunction|Ref)?|ocument(?:Ref)?)|Integer|O(?:bject(?:Ref|Type)|perator(?:Callback|Table(?:Ref)?))|Page(?:Ref)?|Real|S(?:canner(?:Ref)?|tr(?:eam(?:Ref)?|ing(?:Ref)?)))|SConverter(?:Begin(?:DocumentCallback|PageCallback)|Callbacks|End(?:DocumentCallback|PageCallback)|MessageCallback|ProgressCallback|Re(?:f|leaseInfoCallback))?|at(?:h(?:ApplierFunction|DrawingMode|Element(?:Type)?|Ref)?|tern(?:Callbacks|DrawPatternCallback|Re(?:f|leaseInfoCallback)|Tiling)?)|oint)|Re(?:ct(?:Count|Edge)?|freshRate)|S(?:cr(?:een(?:RefreshCallback|Update(?:Move(?:Callback|Delta)|Operation))|oll(?:EventUnit|Phase))|hading(?:Ref)?|ize)|Text(?:DrawingMode|Encoding)|Vector|W(?:heelCount|indow(?:BackingType|I(?:D|mageOption)|L(?:evel(?:Key)?|istOption)|SharingType)))\b - name - support.type.quartz.c - - - match - \bkCF(?:A(?:bsoluteTimeIntervalSince19(?:04|70)|llocator(?:Default|Malloc(?:Zone)?|Null|SystemDefault|UseContext))|B(?:oolean(?:False|True)|u(?:ddhistCalendar|ndle(?:DevelopmentRegionKey|ExecutableKey|I(?:dentifierKey|nfoDictionaryVersionKey)|LocalizationsKey|NameKey|VersionKey)))|C(?:hineseCalendar|o(?:pyString(?:BagCallBacks|DictionaryKeyCallBacks|SetCallBacks)|reFoundationVersionNumber))|DateFormatter(?:AMSymbol|Calendar(?:Name)?|D(?:efault(?:Date|Format)|oesRelativeDateFormattingKey)|EraSymbols|GregorianStartDate|IsLenient|LongEraSymbols|MonthSymbols|PMSymbol|QuarterSymbols|S(?:hort(?:MonthSymbols|QuarterSymbols|Standalone(?:MonthSymbols|QuarterSymbols|WeekdaySymbols)|WeekdaySymbols)|tandalone(?:MonthSymbols|QuarterSymbols|WeekdaySymbols))|T(?:imeZone|woDigitStartDate)|VeryShort(?:MonthSymbols|Standalone(?:MonthSymbols|WeekdaySymbols)|WeekdaySymbols)|WeekdaySymbols)|Error(?:D(?:escriptionKey|omain(?:Cocoa|Mach|OSStatus|POSIX))|FilePathKey|Localized(?:DescriptionKey|FailureReasonKey|RecoverySuggestionKey)|U(?:RLKey|nderlyingErrorKey))|GregorianCalendar|HebrewCalendar|I(?:SO8601Calendar|ndianCalendar|slamic(?:C(?:alendar|ivilCalendar)|TabularCalendar|UmmAlQuraCalendar))|JapaneseCalendar|Locale(?:AlternateQuotation(?:BeginDelimiterKey|EndDelimiterKey)|C(?:alendar(?:Identifier)?|o(?:llat(?:ionIdentifier|orIdentifier)|untryCode)|urren(?:cy(?:Code|Symbol)|tLocaleDidChangeNotification))|DecimalSeparator|ExemplarCharacterSet|GroupingSeparator|Identifier|LanguageCode|MeasurementSystem|Quotation(?:BeginDelimiterKey|EndDelimiterKey)|ScriptCode|UsesMetricSystem|VariantCode)|Nu(?:ll|mber(?:Formatter(?:AlwaysShowDecimalSeparator|Currency(?:Code|DecimalSeparator|GroupingSeparator|Symbol)|De(?:cimalSeparator|faultFormat)|ExponentSymbol|FormatWidth|GroupingS(?:eparator|ize)|I(?:n(?:finitySymbol|ternationalCurrencySymbol)|sLenient)|M(?:ax(?:FractionDigits|IntegerDigits|SignificantDigits)|in(?:FractionDigits|IntegerDigits|SignificantDigits|usSign)|ultiplier)|N(?:aNSymbol|egative(?:Prefix|Suffix))|P(?:adding(?:Character|Position)|er(?:MillSymbol|centSymbol)|lusSign|ositive(?:Prefix|Suffix))|Rounding(?:Increment|Mode)|SecondaryGroupingSize|Use(?:GroupingSeparator|SignificantDigits)|ZeroSymbol)|N(?:aN|egativeInfinity)|PositiveInfinity))|P(?:ersianCalendar|lugIn(?:DynamicRegist(?:erFunctionKey|rationKey)|FactoriesKey|TypesKey|UnloadFunctionKey)|references(?:Any(?:Application|Host|User)|Current(?:Application|Host|User)))|R(?:epublicOfChinaCalendar|unLoop(?:CommonModes|DefaultMode))|S(?:ocket(?:CommandKey|ErrorKey|NameKey|Re(?:gisterCommand|sultKey|trieveCommand)|ValueKey)|tr(?:eamProperty(?:AppendToFile|DataWritten|FileCurrentOffset|Socket(?:NativeHandle|Remote(?:HostName|PortNumber)))|ing(?:BinaryHeapCallBacks|Transform(?:FullwidthHalfwidth|HiraganaKatakana|Latin(?:Arabic|Cyrillic|Greek|H(?:angul|ebrew|iragana)|Katakana|Thai)|MandarinLatin|Strip(?:CombiningMarks|Diacritics)|To(?:Latin|UnicodeName|XMLHex)))))|T(?:imeZoneSystemTimeZoneDidChangeNotification|ype(?:ArrayCallBacks|BagCallBacks|Dictionary(?:KeyCallBacks|ValueCallBacks)|SetCallBacks))|U(?:RL(?:A(?:ddedToDirectoryDateKey|ttributeModificationDateKey)|C(?:ontent(?:AccessDateKey|ModificationDateKey)|reationDateKey|ustomIconKey)|DocumentIdentifierKey|EffectiveIconKey|File(?:AllocatedSizeKey|DirectoryContents|Exists|L(?:astModificationTime|ength)|OwnerID|POSIXMode|Resource(?:IdentifierKey|Type(?:BlockSpecial|CharacterSpecial|Directory|Key|NamedPipe|Regular|S(?:ocket|ymbolicLink)|Unknown))|S(?:ecurityKey|izeKey))|GenerationIdentifierKey|H(?:TTPStatus(?:Code|Line)|asHiddenExtensionKey)|Is(?:AliasFileKey|DirectoryKey|Ex(?:cludedFromBackupKey|ecutableKey)|HiddenKey|MountTriggerKey|PackageKey|Re(?:adableKey|gularFileKey)|Sy(?:mbolicLinkKey|stemImmutableKey)|U(?:biquitousItemKey|serImmutableKey)|VolumeKey|WritableKey)|KeysOfUnsetValuesKey|L(?:abel(?:ColorKey|NumberKey)|inkCountKey|ocalized(?:LabelKey|NameKey|TypeDescriptionKey))|NameKey|P(?:a(?:rentDirectoryURLKey|thKey)|referredIOBlockSizeKey)|QuarantinePropertiesKey|T(?:agNamesKey|otalFile(?:AllocatedSizeKey|SizeKey)|ypeIdentifierKey)|UbiquitousItem(?:Downloading(?:ErrorKey|Status(?:Current|Downloaded|Key|NotDownloaded))|HasUnresolvedConflictsKey|Is(?:Download(?:edKey|ingKey)|Upload(?:edKey|ingKey))|Percent(?:DownloadedKey|UploadedKey)|UploadingErrorKey)|Volume(?:AvailableCapacityKey|CreationDateKey|I(?:dentifierKey|s(?:AutomountedKey|BrowsableKey|EjectableKey|InternalKey|JournalingKey|LocalKey|Re(?:adOnlyKey|movableKey)))|Localized(?:FormatDescriptionKey|NameKey)|MaximumFileSizeKey|NameKey|ResourceCountKey|Supports(?:AdvisoryFileLockingKey|Case(?:PreservedNamesKey|SensitiveNamesKey)|ExtendedSecurityKey|HardLinksKey|JournalingKey|PersistentIDsKey|R(?:enamingKey|ootDirectoryDatesKey)|S(?:parseFilesKey|ymbolicLinksKey)|VolumeSizesKey|ZeroRunsKey)|TotalCapacityKey|U(?:RL(?:ForRemountingKey|Key)|UIDStringKey)))|serNotification(?:Al(?:ert(?:HeaderKey|MessageKey)|ternateButtonTitleKey)|CheckBoxTitlesKey|DefaultButtonTitleKey|IconURLKey|LocalizationURLKey|OtherButtonTitleKey|P(?:opUp(?:SelectionKey|TitlesKey)|rogressIndicatorValueKey)|SoundURLKey|TextField(?:TitlesKey|ValuesKey)))|XMLTreeError(?:Description|L(?:ineNumber|ocation)|StatusCode))\b - name - support.variable.cf.c - - - match - \b(?:daylight|getdate_err|opt(?:arg|err|ind|opt|reset)|s(?:igngam|uboptarg|ys_(?:errlist|nerr|sig(?:list|name)))|t(?:imezone|zname))\b - name - support.variable.clib.c - - - match - \b(?:CG(?:AffineTransformIdentity|PointZero|Rect(?:Infinite|Null|Zero)|SizeZero)|kCG(?:Color(?:Black|Clear|Space(?:AdobeRGB1998|Generic(?:CMYK|Gray(?:Gamma2_2)?|RGB(?:Linear)?)|SRGB)|White)|DisplayS(?:howDuplicateLowResolutionModes|tream(?:ColorSpace|DestinationRect|MinimumFrameTime|PreserveAspectRatio|QueueDepth|S(?:howCursor|ourceRect)|YCbCrMatrix(?:_(?:ITU_R_(?:601_4|709_2)|SMPTE_240M_1995))?))|FontVariationAxis(?:DefaultValue|M(?:axValue|inValue)|Name)|PDF(?:Context(?:A(?:llows(?:Copying|Printing)|rtBox|uthor)|BleedBox|Cr(?:eator|opBox)|EncryptionKeyLength|Keywords|MediaBox|O(?:utputIntent(?:s)?|wnerPassword)|Subject|T(?:itle|rimBox)|UserPassword)|X(?:DestinationOutputProfile|Info|Output(?:Condition(?:Identifier)?|IntentSubtype)|RegistryName))|Window(?:Alpha|B(?:ackingLocationVideoMemory|ounds)|IsOnscreen|Layer|MemoryUsage|N(?:ame|umber)|Owner(?:Name|PID)|S(?:haringState|toreType)|Workspace)))\b - name - support.variable.quartz.c - - - repository - - functions - - patterns - - - captures - - 1 - - name - punctuation.whitespace.support.function.leading.c - - 2 - - name - support.function.cf.c - - - match - (\s*)(\bCF(?:A(?:bsoluteTime(?:AddGregorianUnits|Get(?:Current|D(?:ayOf(?:Week|Year)|ifferenceAsGregorianUnits)|GregorianDate|WeekOfYear))|llocator(?:Allocate|Create|Deallocate|Get(?:Context|Default|PreferredSizeForSize|TypeID)|Reallocate|SetDefault)|rray(?:App(?:end(?:Array|Value)|lyFunction)|BSearchValues|C(?:ontainsValue|reate(?:Copy|Mutable(?:Copy)?)?)|ExchangeValuesAtIndices|Get(?:Count(?:OfValue)?|FirstIndexOfValue|LastIndexOfValue|TypeID|Value(?:AtIndex|s))|InsertValueAtIndex|Re(?:move(?:AllValues|ValueAtIndex)|placeValues)|S(?:etValueAtIndex|ortValues))|ttributedString(?:BeginEditing|Create(?:Copy|Mutable(?:Copy)?|WithSubstring)?|EndEditing|Get(?:Attribute(?:AndLongestEffectiveRange|s(?:AndLongestEffectiveRange)?)?|Length|MutableString|String|TypeID)|Re(?:moveAttribute|place(?:AttributedString|String))|SetAttribute(?:s)?)|utorelease)|B(?:ag(?:A(?:ddValue|pplyFunction)|C(?:ontainsValue|reate(?:Copy|Mutable(?:Copy)?)?)|Get(?:Count(?:OfValue)?|TypeID|Value(?:IfPresent|s)?)|Re(?:move(?:AllValues|Value)|placeValue)|SetValue)|i(?:naryHeap(?:A(?:ddValue|pplyFunction)|C(?:ontainsValue|reate(?:Copy)?)|Get(?:Count(?:OfValue)?|Minimum(?:IfPresent)?|TypeID|Values)|Remove(?:AllValues|MinimumValue))|tVector(?:C(?:ontainsBit|reate(?:Copy|Mutable(?:Copy)?)?)|FlipBit(?:AtIndex|s)|Get(?:Bit(?:AtIndex|s)|Count(?:OfBit)?|FirstIndexOfBit|LastIndexOfBit|TypeID)|Set(?:AllBits|Bit(?:AtIndex|s)|Count)))|ooleanGet(?:TypeID|Value)|undle(?:C(?:loseBundleResourceMap|opy(?:AuxiliaryExecutableURL|Bu(?:iltInPlugInsURL|ndle(?:Localizations|URL))|Executable(?:Architectures(?:ForURL)?|URL)|InfoDictionary(?:ForURL|InDirectory)|Localiz(?:ationsFor(?:Preferences|URL)|edString)|Pr(?:eferredLocalizationsFromArray|ivateFrameworksURL)|Resource(?:URL(?:ForLocalization|InDirectory|sOfType(?:ForLocalization|InDirectory)?)?|sDirectoryURL)|S(?:hared(?:FrameworksURL|SupportURL)|upportFilesDirectoryURL))|reate(?:BundlesFromDirectory)?)|Get(?:AllBundles|BundleWithIdentifier|D(?:ataPointer(?:ForName|sForNames)|evelopmentRegion)|FunctionPointer(?:ForName|sForNames)|I(?:dentifier|nfoDictionary)|LocalInfoDictionary|MainBundle|P(?:ackageInfo(?:InDirectory)?|lugIn)|TypeID|V(?:alueForInfoDictionaryKey|ersionNumber))|IsExecutableLoaded|LoadExecutable(?:AndReturnError)?|OpenBundleResource(?:Files|Map)|PreflightExecutable|UnloadExecutable)|yteOrderGetCurrent)|C(?:alendar(?:AddComponents|C(?:o(?:mposeAbsoluteTime|py(?:Current|Locale|TimeZone))|reateWithIdentifier)|DecomposeAbsoluteTime|Get(?:ComponentDifference|FirstWeekday|Identifier|M(?:aximumRangeOfUnit|inimum(?:DaysInFirstWeek|RangeOfUnit))|OrdinalityOfUnit|RangeOfUnit|T(?:imeRangeOfUnit|ypeID))|Set(?:FirstWeekday|Locale|MinimumDaysInFirstWeek|TimeZone))|haracterSet(?:AddCharactersIn(?:Range|String)|Create(?:BitmapRepresentation|Copy|InvertedSet|Mutable(?:Copy)?|With(?:BitmapRepresentation|CharactersIn(?:Range|String)))|Get(?:Predefined|TypeID)|HasMemberInPlane|I(?:n(?:tersect|vert)|s(?:CharacterMember|LongCharacterMember|SupersetOfSet))|RemoveCharactersIn(?:Range|String)|Union)|o(?:nvert(?:Double(?:HostToSwapped|SwappedToHost)|Float(?:32(?:HostToSwapped|SwappedToHost)|64(?:HostToSwapped|SwappedToHost)|HostToSwapped|SwappedToHost))|py(?:Description|HomeDirectoryURL|TypeIDDescription)))|D(?:at(?:a(?:AppendBytes|Create(?:Copy|Mutable(?:Copy)?|WithBytesNoCopy)?|DeleteBytes|Find|Get(?:Byte(?:Ptr|s)|Length|MutableBytePtr|TypeID)|IncreaseLength|ReplaceBytes|SetLength)|e(?:C(?:ompare|reate)|Formatter(?:C(?:opyProperty|reate(?:DateF(?:ormatFromTemplate|romString)|StringWith(?:AbsoluteTime|Date))?)|Get(?:AbsoluteTimeFromString|DateStyle|Format|Locale|T(?:imeStyle|ypeID))|Set(?:Format|Property))|Get(?:AbsoluteTime|T(?:imeIntervalSinceDate|ypeID))))|ictionary(?:A(?:ddValue|pplyFunction)|C(?:ontains(?:Key|Value)|reate(?:Copy|Mutable(?:Copy)?)?)|Get(?:Count(?:Of(?:Key|Value))?|KeysAndValues|TypeID|Value(?:IfPresent)?)|Re(?:move(?:AllValues|Value)|placeValue)|SetValue))|E(?:qual|rror(?:C(?:opy(?:Description|FailureReason|RecoverySuggestion|UserInfo)|reate(?:WithUserInfoKeysAndValues)?)|Get(?:Code|Domain|TypeID)))|File(?:Descriptor(?:Create(?:RunLoopSource)?|DisableCallBacks|EnableCallBacks|Get(?:Context|NativeDescriptor|TypeID)|I(?:nvalidate|sValid))|Security(?:C(?:learProperties|opy(?:AccessControlList|GroupUUID|OwnerUUID)|reate(?:Copy)?)|Get(?:Group|Mode|Owner|TypeID)|Set(?:AccessControlList|Group(?:UUID)?|Mode|Owner(?:UUID)?)))|G(?:et(?:Allocator|RetainCount|TypeID)|regorianDate(?:GetAbsoluteTime|IsValid))|Hash|Locale(?:C(?:opy(?:AvailableLocaleIdentifiers|C(?:ommonISOCurrencyCodes|urrent)|DisplayNameForPropertyValue|ISO(?:C(?:ountryCodes|urrencyCodes)|LanguageCodes)|PreferredLanguages)|reate(?:C(?:anonicalL(?:anguageIdentifierFromString|ocaleIdentifierFromS(?:criptManagerCodes|tring))|o(?:mponentsFromLocaleIdentifier|py))|LocaleIdentifierFrom(?:Components|WindowsLocaleCode))?)|Get(?:Identifier|Language(?:CharacterDirection|LineDirection)|System|TypeID|Value|WindowsLocaleCodeFromLocaleIdentifier))|M(?:a(?:chPort(?:Create(?:RunLoopSource|WithPort)?|Get(?:Context|InvalidationCallBack|Port|TypeID)|I(?:nvalidate|sValid)|SetInvalidationCallBack)|keCollectable)|essagePort(?:Create(?:Local|R(?:emote|unLoopSource))|Get(?:Context|InvalidationCallBack|Name|TypeID)|I(?:nvalidate|s(?:Remote|Valid))|Se(?:ndRequest|t(?:DispatchQueue|InvalidationCallBack|Name))))|N(?:otificationCenter(?:AddObserver|Get(?:D(?:arwinNotifyCenter|istributedCenter)|LocalCenter|TypeID)|PostNotification(?:WithOptions)?|Remove(?:EveryObserver|Observer))|u(?:llGetTypeID|mber(?:C(?:ompare|reate)|Formatter(?:C(?:opyProperty|reate(?:NumberFromString|StringWith(?:Number|Value))?)|Get(?:DecimalInfoForCurrencyCode|Format|Locale|Style|TypeID|ValueFromString)|Set(?:Format|Property))|Get(?:ByteSize|Type(?:ID)?|Value)|IsFloatType)))|P(?:lugIn(?:AddInstanceForFactory|Create|FindFactoriesForPlugInType(?:InPlugIn)?|Get(?:Bundle|TypeID)|I(?:nstance(?:Create(?:WithInstanceDataSize)?|Get(?:FactoryName|In(?:stanceData|terfaceFunctionTable)|TypeID))|sLoadOnDemand)|Re(?:gister(?:FactoryFunction(?:ByName)?|PlugInType)|moveInstanceForFactory)|SetLoadOnDemand|Unregister(?:Factory|PlugInType))|r(?:eferences(?:A(?:ddSuitePreferencesToApp|pp(?:Synchronize|ValueIsForced))|Copy(?:App(?:Value|licationList)|KeyList|Multiple|Value)|GetApp(?:BooleanValue|IntegerValue)|RemoveSuitePreferencesFromApp|S(?:et(?:AppValue|Multiple|Value)|ynchronize))|opertyList(?:Create(?:D(?:ata|eepCopy)|From(?:Stream|XMLData)|With(?:Data|Stream)|XMLData)|IsValid|Write(?:ToStream)?)))|R(?:angeMake|e(?:adStream(?:C(?:lose|opy(?:DispatchQueue|Error|Property)|reateWith(?:BytesNoCopy|File))|Get(?:Buffer|Error|Status|TypeID)|HasBytesAvailable|Open|Read|S(?:cheduleWithRunLoop|et(?:Client|DispatchQueue|Property))|UnscheduleFromRunLoop)|lease|tain)|unLoop(?:Add(?:CommonMode|Observer|Source|Timer)|Co(?:ntains(?:Observer|Source|Timer)|py(?:AllModes|CurrentMode))|Get(?:Current|Main|NextTimerFireDate|TypeID)|IsWaiting|Observer(?:Create(?:WithHandler)?|DoesRepeat|Get(?:Activities|Context|Order|TypeID)|I(?:nvalidate|sValid))|PerformBlock|R(?:emove(?:Observer|Source|Timer)|un(?:InMode)?)|S(?:ource(?:Create|Get(?:Context|Order|TypeID)|I(?:nvalidate|sValid)|Signal)|top)|Timer(?:Create(?:WithHandler)?|DoesRepeat|Get(?:Context|Interval|NextFireDate|Order|T(?:olerance|ypeID))|I(?:nvalidate|sValid)|Set(?:NextFireDate|Tolerance))|WakeUp))|S(?:et(?:A(?:ddValue|pplyFunction)|C(?:ontainsValue|reate(?:Copy|Mutable(?:Copy)?)?)|Get(?:Count(?:OfValue)?|TypeID|Value(?:IfPresent|s)?)|Re(?:move(?:AllValues|Value)|placeValue)|SetValue)|how(?:Str)?|ocket(?:C(?:o(?:nnectToAddress|py(?:Address|PeerAddress|Registered(?:SocketSignature|Value)))|reate(?:ConnectedToSocketSignature|RunLoopSource|With(?:Native|SocketSignature))?)|DisableCallBacks|EnableCallBacks|Get(?:Context|DefaultNameRegistryPortNumber|Native|SocketFlags|TypeID)|I(?:nvalidate|sValid)|Register(?:SocketSignature|Value)|Se(?:ndData|t(?:Address|DefaultNameRegistryPortNumber|SocketFlags))|Unregister)|tr(?:eamCreate(?:BoundPair|PairWith(?:PeerSocketSignature|Socket(?:ToHost)?))|ing(?:Append(?:C(?:String|haracters)|Format(?:AndArguments)?|PascalString)?|C(?:apitalize|o(?:mpare(?:WithOptions(?:AndLocale)?)?|nvert(?:EncodingTo(?:IANACharSetName|NSStringEncoding|WindowsCodepage)|IANACharSetNameToEncoding|NSStringEncodingToEncoding|WindowsCodepageToEncoding))|reate(?:Array(?:BySeparatingStrings|WithFindResults)|ByCombiningStrings|Copy|ExternalRepresentation|FromExternalRepresentation|Mutable(?:Copy|WithExternalCharactersNoCopy)?|With(?:Bytes(?:NoCopy)?|C(?:String(?:NoCopy)?|haracters(?:NoCopy)?)|F(?:ileSystemRepresentation|ormat(?:AndArguments)?)|PascalString(?:NoCopy)?|Substring)))|Delete|F(?:ind(?:AndReplace|CharacterFromSet|WithOptions(?:AndLocale)?)?|old)|Get(?:Bytes|C(?:String(?:Ptr)?|haracter(?:AtIndex|FromInlineBuffer|s(?:Ptr)?))|DoubleValue|F(?:astestEncoding|ileSystemRepresentation)|HyphenationLocationBeforeIndex|IntValue|L(?:ength|i(?:neBounds|stOfAvailableEncodings)|ongCharacterForSurrogatePair)|M(?:aximumSize(?:ForEncoding|OfFileSystemRepresentation)|ostCompatibleMacStringEncoding)|NameOfEncoding|Pa(?:ragraphBounds|scalString(?:Ptr)?)|RangeOfComposedCharactersAtIndex|S(?:mallestEncoding|urrogatePairForLongCharacter|ystemEncoding)|TypeID)|Has(?:Prefix|Suffix)|I(?:n(?:itInlineBuffer|sert)|s(?:EncodingAvailable|HyphenationAvailableForLocale|Surrogate(?:HighCharacter|LowCharacter)))|Lowercase|Normalize|Pad|Replace(?:All)?|SetExternalCharactersNoCopy|T(?:okenizer(?:AdvanceToNextToken|C(?:opy(?:BestStringLanguage|CurrentTokenAttribute)|reate)|G(?:et(?:Current(?:SubTokens|TokenRange)|TypeID)|oToTokenAtIndex)|SetString)|r(?:ansform|im(?:Whitespace)?))|Uppercase))|wapInt(?:16(?:BigToHost|HostTo(?:Big|Little)|LittleToHost)?|32(?:BigToHost|HostTo(?:Big|Little)|LittleToHost)?|64(?:BigToHost|HostTo(?:Big|Little)|LittleToHost)?))|T(?:imeZone(?:C(?:opy(?:Abbreviation(?:Dictionary)?|Default|KnownNames|LocalizedName|System)|reate(?:With(?:Name|TimeIntervalFromGMT))?)|Get(?:Da(?:ta|ylightSavingTimeOffset)|N(?:ame|extDaylightSavingTimeTransition)|SecondsFromGMT|TypeID)|IsDaylightSavingTime|ResetSystem|Set(?:AbbreviationDictionary|Default))|ree(?:App(?:endChild|lyFunctionToChildren)|Create|FindRoot|Get(?:C(?:hild(?:AtIndex|Count|ren)|ontext)|FirstChild|NextSibling|Parent|TypeID)|InsertSibling|PrependChild|Remove(?:AllChildren)?|S(?:etContext|ortChildren)))|U(?:RL(?:C(?:anBeDecomposed|learResourcePropertyCache(?:ForKey)?|opy(?:AbsoluteURL|F(?:ileSystemPath|ragment)|HostName|LastPathComponent|NetLocation|Pa(?:rameterString|ssword|th(?:Extension)?)|QueryString|Resource(?:Propert(?:iesForKeys|yForKey)|Specifier)|S(?:cheme|trictPath)|UserName)|reate(?:AbsoluteURLWithBytes|B(?:ookmarkData(?:From(?:AliasRecord|File))?|yResolvingBookmarkData)|Copy(?:AppendingPath(?:Component|Extension)|Deleting(?:LastPathComponent|PathExtension))|Data(?:AndPropertiesFromResource)?|F(?:ile(?:PathURL|ReferenceURL)|romF(?:SRef|ileSystemRepresentation(?:RelativeToBase)?))|PropertyFromResource|ResourcePropert(?:iesForKeysFromBookmarkData|yForKeyFromBookmarkData)|StringBy(?:AddingPercentEscapes|ReplacingPercentEscapes(?:UsingEncoding)?)|With(?:Bytes|FileSystemPath(?:RelativeToBase)?|String)))|DestroyResource|Enumerator(?:CreateFor(?:DirectoryURL|MountedVolumes)|Get(?:DescendentLevel|NextURL|SourceDidChange|TypeID)|SkipDescendents)|Get(?:B(?:aseURL|yte(?:RangeForComponent|s))|F(?:SRef|ileSystemRepresentation)|PortNumber|String|TypeID)|HasDirectoryPath|IsFileReferenceURL|ResourceIsReachable|S(?:et(?:ResourcePropert(?:iesForKeys|yForKey)|TemporaryResourcePropertyForKey)|t(?:artAccessingSecurityScopedResource|opAccessingSecurityScopedResource))|Write(?:BookmarkDataToFile|DataAndPropertiesToResource))|UID(?:Create(?:From(?:String|UUIDBytes)|String|WithBytes)?|Get(?:ConstantUUIDWithBytes|TypeID|UUIDBytes))|serNotification(?:C(?:ancel|heckBoxChecked|reate(?:RunLoopSource)?)|Display(?:Alert|Notice)|Get(?:Response(?:Dictionary|Value)|TypeID)|PopUpSelection|ReceiveResponse|SecureTextField|Update))|WriteStream(?:C(?:anAcceptBytes|lose|opy(?:DispatchQueue|Error|Property)|reateWith(?:AllocatedBuffers|Buffer|File))|Get(?:Error|Status|TypeID)|Open|S(?:cheduleWithRunLoop|et(?:Client|DispatchQueue|Property))|UnscheduleFromRunLoop|Write)|XML(?:CreateStringBy(?:EscapingEntities|UnescapingEntities)|Node(?:Create(?:Copy)?|Get(?:InfoPtr|String|Type(?:Code|ID)|Version))|Parser(?:Abort|C(?:opyErrorDescription|reate(?:WithDataFromURL)?)|Get(?:C(?:allBacks|ontext)|Document|L(?:ineNumber|ocation)|S(?:ourceURL|tatusCode)|TypeID)|Parse)|Tree(?:Create(?:FromData(?:WithError)?|With(?:DataFromURL|Node)|XMLData)|GetNode)))\b) - - - captures - - 1 - - name - punctuation.whitespace.support.function.leading.c - - 2 - - name - support.function.clib.c - - - match - (\s*)(\b(?:a(?:64l|b(?:ort|s)|c(?:c(?:ess(?:x_np)?|t)|os(?:f|h(?:f|l)?|l)?)|dd_profil|l(?:arm|loca)|rc4random(?:_(?:addrandom|buf|stir|uniform))?|s(?:ctime(?:_r)?|in(?:f|h(?:f|l)?|l)?|printf)|t(?:an(?:2(?:f|l)?|f|h(?:f|l)?|l)?|exit(?:_b)?|o(?:f|i|l(?:l)?)))|b(?:c(?:mp|opy)|rk|s(?:d_signal|earch(?:_b)?)|zero)|c(?:alloc|brt(?:f|l)?|eil(?:f|l)?|get(?:c(?:ap|lose)|ent|first|match|n(?:ext|um)|s(?:et|tr)|ustr)|h(?:dir|own|root)|l(?:earerr|o(?:ck|se))|o(?:nfstr|pysign(?:f|l)?|s(?:f|h(?:f|l)?|l)?)|r(?:eat|ypt)|t(?:ermid(?:_r)?|ime(?:_r)?))|d(?:aemon|evname(?:_r)?|i(?:fftime|gittoint|v)|printf|r(?:and48|em)|up(?:2)?)|e(?:cvt|n(?:crypt|dusershell)|r(?:and48|f(?:c(?:f|l)?|f|l)?)|x(?:changedata|ec(?:l(?:e|p)?|v(?:P|e|p)?)|it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|f(?:a(?:bs(?:f|l)?|ccessat)|c(?:h(?:dir|own(?:at)?)|lose|ntl|vt)|d(?:im(?:f|l)?|open)|e(?:of|rror)|f(?:l(?:agstostr|ush)|s(?:ctl|l(?:l)?)?)|get(?:attrlist|c|ln|pos|s)|i(?:le(?:no|sec_(?:dup|free|get_property|init|query_property|set_property|unset_property))|nite)|l(?:o(?:ck(?:file)?|or(?:f|l)?)|s(?:l(?:l)?)?)|m(?:a(?:f|l|x(?:f|l)?)?|in(?:f|l)?|od(?:f|l)?|tcheck)|o(?:pen|rk)|p(?:athconf|rintf|u(?:rge|t(?:c|s)))|re(?:ad|e|open|xp(?:f|l)?)|s(?:c(?:anf|tl)|e(?:ek(?:o)?|t(?:attrlist|pos))|ync(?:_volume_np)?)|t(?:ell(?:o)?|r(?:uncate|ylockfile))|un(?:lockfile|open)|write)|g(?:amma|cvt|et(?:attrlist(?:at|bulk)?|bsize|c(?:_unlocked|har(?:_unlocked)?|wd)?|d(?:ate|elim|irentriesattr|omainname|tablesize)|e(?:gid|nv|uid)|g(?:id|roup(?:list|s))|host(?:id|name)|iopolicy_np|l(?:ine|o(?:adavg|gin(?:_r)?))|mode|opt|p(?:a(?:gesize|ss)|eereid|g(?:id|rp)|id|pid|r(?:iority|ogname))|r(?:limit|usage)|s(?:groups_np|id|ubopt)?|u(?:id|sershell)|w(?:d|groups_np)?)|mtime(?:_r)?|rantpt)|h(?:eapsort(?:_b)?|ypot(?:f|l)?)|i(?:logb(?:f|l)?|n(?:dex|it(?:groups|state))|ruserok(?:_sa)?|s(?:a(?:l(?:num|pha)|scii|tty)|blank|cntrl|digit|graph|hexnumber|ideogram|lower|number|p(?:honogram|rint|unct)|rune|s(?:etugid|p(?:ace|ecial))|upper|xdigit))|j(?:0|1|n|rand48)|kill(?:pg)?|l(?:64a|abs|c(?:hown|ong48)|d(?:exp(?:f|l)?|iv)|gamma(?:f|l)?|ink(?:at)?|l(?:abs|div|r(?:int(?:f|l)?|ound(?:f|l)?))|o(?:c(?:al(?:econv|time(?:_r)?)|kf)|g(?:1(?:0(?:f|l)?|p(?:f|l)?)|2(?:f|l)?|b(?:f|l)?|f|l)?|ngjmp(?:error)?)|r(?:and48|int(?:f|l)?|ound(?:f|l)?)|seek)|m(?:a(?:jor|kedev|lloc)|b(?:len|stowcs|towc)|e(?:m(?:c(?:cpy|hr|mp|py)|m(?:em|ove)|set(?:_pattern(?:16|4|8))?)|rgesort(?:_b)?)|inor|k(?:dtemp|nod|path_np|stemp(?:s)?|t(?:emp|ime))|odf(?:f|l)?|rand48)|n(?:an(?:f|l|osleep)?|e(?:arbyint(?:f|l)?|xt(?:after(?:f|l)?|toward(?:f|l)?))|fssvc|ice|rand48)|open(?:_dprotected_np|at|x_np)?|p(?:a(?:thconf|use)|close|error|ipe|o(?:pen|six(?:2time|_(?:memalign|openpt))|w(?:f|l)?)|r(?:ead|intf|ofil)|s(?:elect|ignal|ort(?:_(?:b|r))?)|t(?:hread_(?:getugid_np|kill|s(?:etugid_np|igmask))|sname)|ut(?:c(?:_unlocked|har(?:_unlocked)?)?|env|s|w)|write)|qsort(?:_(?:b|r))?|r(?:a(?:dixsort|ise|nd(?:_r|om)?)|cmd(?:_af)?|e(?:a(?:d(?:link(?:at)?)?|l(?:loc(?:f)?|path))|boot|m(?:ainder(?:f|l)?|ove|quo(?:f|l)?)|name(?:at)?|voke|wind)|in(?:dex|t(?:f|l|tol)?)|mdir|ound(?:f|l|tol)?|resvport(?:_af)?|userok)|s(?:brk|ca(?:lb(?:ln(?:f|l)?|n(?:f|l)?)?|nf)|e(?:archfs|ed48|lect|t(?:attrlist|buf(?:fer)?|domainname|e(?:gid|nv|uid)|g(?:id|roups)|host(?:id|name)|iopolicy_np|jmp|key|l(?:inebuf|o(?:cale|gin))|mode|p(?:g(?:id|rp)|r(?:iority|ogname))|r(?:e(?:gid|uid)|gid|limit|uid)|s(?:groups_np|id|tate)|u(?:id|sershell)|vbuf|wgroups_np))|i(?:g(?:a(?:ction|ddset|ltstack)|block|delset|emptyset|fillset|hold|i(?:gnore|nterrupt|smember)|longjmp|n(?:al|ificand)|p(?:ause|ending|rocmask)|relse|s(?:et(?:jmp|mask)?|uspend)|vec|wait)|n(?:f|h(?:f|l)?|l)?)|leep|nprintf|printf|qrt(?:f|l)?|ra(?:dixsort|nd(?:48|dev|om(?:dev)?)?)|scanf|t(?:p(?:cpy|ncpy)|r(?:c(?:a(?:se(?:cmp|str)|t)|hr|mp|oll|py|spn)|dup|error(?:_r)?|ftime|l(?:c(?:at|py)|en)|mode|n(?:c(?:a(?:secmp|t)|mp|py)|dup|len|str)|p(?:brk|time)|rchr|s(?:ep|ignal|pn|tr)|to(?:d|f(?:flags)?|k(?:_r)?|l(?:d|l)?|q|u(?:l(?:l)?|q))|xfrm))|wa(?:b|pon)|y(?:mlink(?:at)?|nc(?:_volume_np)?|s(?:c(?:all|onf)|tem)))|t(?:an(?:f|h(?:f|l)?|l)?|c(?:getpgrp|setpgrp)|empnam|gamma(?:f|l)?|ime(?:2posix|gm|local)?|mp(?:file|nam)|o(?:ascii|lower|upper)|runc(?:ate|f|l)?|ty(?:name(?:_r)?|slot)|zset(?:wall)?)|u(?:alarm|n(?:delete|getc|l(?:ink(?:at)?|ockpt)|setenv|whiteout)|sleep)|v(?:a(?:lloc|sprintf)|dprintf|f(?:ork|printf|scanf)|printf|s(?:canf|nprintf|printf|scanf))|w(?:ait(?:3|4|id|pid)?|c(?:stombs|tomb)|rite)|y(?:0|1|n)|zopen)\b) - - - captures - - 1 - - name - punctuation.whitespace.support.function.leading.c - - 2 - - name - support.function.dispatch.c - - - match - (\s*)(\bdispatch_(?:a(?:fter(?:_f)?|pply(?:_f)?|sync(?:_f)?)|b(?:arrier_(?:async(?:_f)?|sync(?:_f)?)|lock_(?:c(?:ancel|reate(?:_with_qos_class)?)|notify|perform|testcancel|wait))|cancel|d(?:ata_(?:apply|c(?:opy_region|reate(?:_(?:concat|map|subrange))?)|get_size)|ebug(?:v)?)|g(?:et_(?:c(?:ontext|urrent_queue)|global_queue|main_queue|specific)|roup_(?:async(?:_f)?|create|enter|leave|notify(?:_f)?|wait))|io_(?:barrier|c(?:lose|reate(?:_with_(?:io|path))?)|get_descriptor|read|set_(?:high_water|interval|low_water)|write)|main|notify|once(?:_f)?|queue_(?:attr_make_with_qos_class|create|get_(?:label|qos_class|specific)|set_specific)|re(?:ad|lease|sume|tain)|s(?:e(?:maphore_(?:create|signal|wait)|t_(?:context|finalizer_f|target_queue))|ource_(?:c(?:ancel|reate)|get_(?:data|handle|mask)|merge_data|set_(?:cancel_handler(?:_f)?|event_handler(?:_f)?|registration_handler(?:_f)?|timer)|testcancel)|uspend|ync(?:_f)?)|t(?:estcancel|ime)|w(?:a(?:it|lltime)|rite))\b) - - - captures - - 1 - - name - punctuation.whitespace.support.function.leading.c - - 2 - - name - support.function.mac-classic.c - - - match - (\s*)(\b(?:Debug(?:Str|ger)|S(?:trLength|ysBreak(?:Func|Str)?))\b) - - - captures - - 1 - - name - punctuation.whitespace.support.function.leading.c - - 2 - - name - support.function.os.c - - - match - (\s*)(\b(?:OS(?:HostByteOrder|ReadSwapInt(?:16|32|64)|WriteSwapInt(?:16|32|64))|gethostuuid)\b) - - - captures - - 1 - - name - punctuation.whitespace.support.function.leading.c - - 2 - - name - support.function.pthread.c - - - match - (\s*)(\b(?:pthread_(?:at(?:fork|tr_(?:destroy|get(?:_qos_class_np|detachstate|guardsize|inheritsched|s(?:c(?:hedp(?:aram|olicy)|ope)|tack(?:addr|size)?))|init|set(?:_qos_class_np|detachstate|guardsize|inheritsched|s(?:c(?:hedp(?:aram|olicy)|ope)|tack(?:addr|size)?))))|c(?:ancel|ond(?:_(?:broadcast|destroy|init|signal(?:_thread_np)?|timedwait(?:_relative_np)?|wait)|attr_(?:destroy|getpshared|init|setpshared))|reate(?:_suspended_np)?)|detach|e(?:qual|xit)|from_mach_thread_np|get(?:_(?:qos_class_np|stack(?:addr_np|size_np))|concurrency|name_np|s(?:chedparam|pecific))|is_threaded_np|join|k(?:ey_(?:create|delete)|ill)|m(?:a(?:ch_thread_np|in_np)|utex(?:_(?:destroy|getprioceiling|init|lock|setprioceiling|trylock|unlock)|attr_(?:destroy|get(?:p(?:r(?:ioceiling|otocol)|shared)|type)|init|set(?:p(?:r(?:ioceiling|otocol)|shared)|type))))|o(?:nce|verride_qos_class_(?:end_np|start_np))|rwlock(?:_(?:destroy|init|rdlock|try(?:rdlock|wrlock)|unlock|wrlock)|attr_(?:destroy|getpshared|init|setpshared))|s(?:e(?:lf|t(?:_qos_class_self_np|c(?:ancel(?:state|type)|oncurrency)|name_np|s(?:chedparam|pecific)))|igmask)|t(?:estcancel|hreadid_np)|yield_np)|sched_(?:get_priority_m(?:ax|in)|yield))\b) - - - captures - - 1 - - name - punctuation.whitespace.support.function.leading.c - - 2 - - name - support.function.quartz.c - - - match - (\s*)(\bCG(?:A(?:cquireDisplayFadeReservation|ffineTransform(?:Concat|EqualToTransform|I(?:nvert|sIdentity)|Make(?:Rotation|Scale|Translation)?|Rotate|Scale|Translate)|ssociateMouseAndMouseCursorPosition)|B(?:eginDisplayConfiguration|itmapContext(?:Create(?:Image|WithData)?|Get(?:AlphaInfo|B(?:it(?:mapInfo|sPer(?:Component|Pixel))|ytesPerRow)|ColorSpace|Data|Height|Width)))|C(?:a(?:ncelDisplayConfiguration|ptureAllDisplays(?:WithOptions)?)|o(?:lor(?:Create(?:Copy(?:WithAlpha)?|Generic(?:CMYK|Gray|RGB)|WithPattern)?|EqualToColor|Get(?:Alpha|Co(?:lorSpace|mponents|nstantColor)|NumberOfComponents|Pattern|TypeID)|Re(?:lease|tain)|Space(?:C(?:opy(?:ICCProfile|Name)|reate(?:Calibrated(?:Gray|RGB)|Device(?:CMYK|Gray|RGB)|I(?:CCBased|ndexed)|Lab|Pattern|With(?:ICCProfile|Name|PlatformColorSpace)))|Get(?:BaseColorSpace|ColorTable(?:Count)?|Model|NumberOfComponents|TypeID)|Re(?:lease|tain)))|mpleteDisplayConfiguration|n(?:figureDisplay(?:FadeEffect|M(?:irrorOfDisplay|ode)|Origin|StereoOperation|WithDisplayMode)|text(?:Add(?:Arc(?:ToPoint)?|CurveToPoint|EllipseInRect|Line(?:ToPoint|s)|Path|QuadCurveToPoint|Rect(?:s)?)|Begin(?:Pa(?:ge|th)|TransparencyLayer(?:WithRect)?)|C(?:l(?:earRect|ip(?:To(?:Mask|Rect(?:s)?))?|osePath)|o(?:n(?:catCTM|vert(?:PointTo(?:DeviceSpace|UserSpace)|RectTo(?:DeviceSpace|UserSpace)|SizeTo(?:DeviceSpace|UserSpace)))|pyPath))|Draw(?:Image|L(?:ayer(?:AtPoint|InRect)|inearGradient)|P(?:DF(?:Document|Page)|ath)|RadialGradient|Shading|TiledImage)|E(?:O(?:Clip|FillPath)|nd(?:Page|TransparencyLayer))|F(?:ill(?:EllipseInRect|Path|Rect(?:s)?)|lush)|Get(?:C(?:TM|lipBoundingBox)|InterpolationQuality|Path(?:BoundingBox|CurrentPoint)|T(?:ext(?:Matrix|Position)|ypeID)|UserSpaceToDeviceSpaceTransform)|IsPathEmpty|MoveToPoint|PathContainsPoint|R(?:e(?:lease|placePathWithStrokedPath|storeGState|tain)|otateCTM)|S(?:aveGState|caleCTM|e(?:lectFont|t(?:Al(?:lows(?:Antialiasing|FontS(?:moothing|ubpixel(?:Positioning|Quantization)))|pha)|BlendMode|C(?:MYK(?:FillColor|StrokeColor)|haracterSpacing)|F(?:ill(?:Color(?:Space|WithColor)?|Pattern)|latness|ont(?:Size)?)|Gray(?:FillColor|StrokeColor)|InterpolationQuality|Line(?:Cap|Dash|Join|Width)|MiterLimit|PatternPhase|R(?:GB(?:FillColor|StrokeColor)|enderingIntent)|S(?:h(?:adow(?:WithColor)?|ould(?:Antialias|S(?:moothFonts|ubpixel(?:PositionFonts|QuantizeFonts))))|troke(?:Color(?:Space|WithColor)?|Pattern))|Text(?:DrawingMode|Matrix|Position)))|how(?:Glyphs(?:AtPo(?:int|sitions)|WithAdvances)?|Text(?:AtPoint)?)|troke(?:EllipseInRect|LineSegments|Path|Rect(?:WithWidth)?)|ynchronize)|TranslateCTM)))|ursorIs(?:DrawnInFramebuffer|Visible))|D(?:ata(?:Consumer(?:Create(?:With(?:CFData|URL))?|GetTypeID|Re(?:lease|tain))|Provider(?:C(?:opyData|reate(?:Direct|Sequential|With(?:CFData|Data|Filename|URL)))|GetTypeID|Re(?:lease|tain)))|isplay(?:AvailableModes|B(?:estModeForParameters(?:AndRefreshRate)?|ounds)|C(?:apture(?:WithOptions)?|opy(?:AllDisplayModes|ColorSpace|DisplayMode)|reateImage(?:ForRect)?|urrentMode)|Fade(?:OperationInProgress)?|G(?:ammaTableCapacity|etDrawingContext)|HideCursor|I(?:DToOpenGLDisplayMask|OServicePort|s(?:A(?:ctive|lwaysInMirrorSet|sleep)|Builtin|Captured|In(?:HWMirrorSet|MirrorSet)|Main|Online|Stereo))|M(?:irrorsDisplay|o(?:de(?:CopyPixelEncoding|Get(?:Height|IO(?:DisplayModeID|Flags)|Pixel(?:Height|Width)|RefreshRate|TypeID|Width)|IsUsableForDesktopGUI|Re(?:lease|tain)|lNumber)|veCursorToPoint))|P(?:ixels(?:High|Wide)|rimaryDisplay)|R(?:e(?:gisterReconfigurationCallback|lease|moveReconfigurationCallback|storeColorSyncSettings)|otation)|S(?:creenSize|e(?:rialNumber|t(?:DisplayMode|StereoOperation))|howCursor|tream(?:Create(?:WithDispatchQueue)?|Get(?:RunLoopSource|TypeID)|St(?:art|op)|Update(?:CreateMergedUpdate|Get(?:DropCount|MovedRectsDelta|Rects|TypeID)))|witchToMode)|U(?:nitNumber|sesOpenGLAcceleration)|VendorNumber))|E(?:nableEventStateCombining|vent(?:Create(?:Copy|Data|FromData|KeyboardEvent|MouseEvent|S(?:crollWheelEvent|ourceFromEvent))?|Get(?:DoubleValueField|Flags|IntegerValueField|Location|T(?:imestamp|ype(?:ID)?)|UnflippedLocation)|Keyboard(?:GetUnicodeString|SetUnicodeString)|Post(?:ToPSN)?|S(?:et(?:DoubleValueField|Flags|IntegerValueField|Location|Source|T(?:imestamp|ype))|ource(?:ButtonState|C(?:ounterForEventType|reate)|FlagsState|Get(?:KeyboardType|LocalEvents(?:FilterDuringSuppressionState|SuppressionInterval)|PixelsPerLine|SourceStateID|TypeID|UserData)|KeyState|Se(?:condsSinceLastEventType|t(?:KeyboardType|LocalEvents(?:FilterDuringSuppressionState|SuppressionInterval)|PixelsPerLine|UserData))))|Tap(?:Create(?:ForPSN)?|Enable|IsEnabled|PostEvent)))|F(?:ont(?:C(?:anCreatePostScriptSubset|opy(?:FullName|GlyphNameForGlyph|PostScriptName|Table(?:ForTag|Tags)|Variation(?:Axes|s))|reate(?:CopyWithVariations|PostScript(?:Encoding|Subset)|With(?:DataProvider|FontName|PlatformFont)))|Get(?:Ascent|CapHeight|Descent|FontBBox|Glyph(?:Advances|BBoxes|WithGlyphName)|ItalicAngle|Leading|NumberOfGlyphs|StemV|TypeID|UnitsPerEm|XHeight)|Re(?:lease|tain))|unction(?:Create|GetTypeID|Re(?:lease|tain)))|G(?:et(?:ActiveDisplayList|Display(?:TransferBy(?:Formula|Table)|sWith(?:OpenGLDisplayMask|Point|Rect))|EventTapList|LastMouseDelta|OnlineDisplayList)|radient(?:CreateWithColor(?:Components|s)|GetTypeID|Re(?:lease|tain)))|I(?:mage(?:Create(?:Copy(?:WithColorSpace)?|With(?:ImageInRect|JPEGDataProvider|Mask(?:ingColors)?|PNGDataProvider))?|Get(?:AlphaInfo|B(?:it(?:mapInfo|sPer(?:Component|Pixel))|ytesPerRow)|ColorSpace|D(?:ataProvider|ecode)|Height|RenderingIntent|ShouldInterpolate|TypeID|Width)|IsMask|MaskCreate|Re(?:lease|tain))|nhibitLocalEvents)|Layer(?:CreateWithContext|Get(?:Context|Size|TypeID)|Re(?:lease|tain))|MainDisplayID|OpenGLDisplayMaskToDisplayID|P(?:DF(?:ArrayGet(?:Array|Boolean|Count|Dictionary|Integer|N(?:ame|u(?:ll|mber))|Object|Str(?:eam|ing))|Conte(?:ntStream(?:CreateWith(?:Page|Stream)|Get(?:Resource|Streams)|Re(?:lease|tain))|xt(?:AddD(?:estinationAtPoint|ocumentMetadata)|BeginPage|C(?:lose|reate(?:WithURL)?)|EndPage|Set(?:DestinationForRect|URLForRect)))|D(?:ictionary(?:ApplyFunction|Get(?:Array|Boolean|Count|Dictionary|Integer|N(?:ame|umber)|Object|Str(?:eam|ing)))|ocument(?:Allows(?:Copying|Printing)|CreateWith(?:Provider|URL)|Get(?:ArtBox|BleedBox|C(?:atalog|ropBox)|I(?:D|nfo)|MediaBox|NumberOfPages|Page|RotationAngle|T(?:rimBox|ypeID)|Version)|Is(?:Encrypted|Unlocked)|Re(?:lease|tain)|UnlockWithPassword))|O(?:bjectGet(?:Type|Value)|peratorTable(?:Create|Re(?:lease|tain)|SetCallback))|Page(?:Get(?:BoxRect|D(?:ictionary|ocument|rawingTransform)|PageNumber|RotationAngle|TypeID)|Re(?:lease|tain))|S(?:canner(?:Create|GetContentStream|Pop(?:Array|Boolean|Dictionary|Integer|N(?:ame|umber)|Object|Str(?:eam|ing))|Re(?:lease|tain)|Scan)|tr(?:eam(?:CopyData|GetDictionary)|ing(?:Copy(?:Date|TextString)|Get(?:BytePtr|Length)))))|SConverter(?:Abort|C(?:onvert|reate)|GetTypeID|IsConverting)|at(?:h(?:A(?:dd(?:Arc(?:ToPoint)?|CurveToPoint|EllipseInRect|Line(?:ToPoint|s)|Path|QuadCurveToPoint|R(?:e(?:ct(?:s)?|lativeArc)|oundedRect))|pply)|C(?:loseSubpath|ontainsPoint|reate(?:Copy(?:By(?:DashingPath|StrokingPath|TransformingPath))?|Mutable(?:Copy(?:ByTransformingPath)?)?|With(?:EllipseInRect|R(?:ect|oundedRect))))|EqualToPath|Get(?:BoundingBox|CurrentPoint|PathBoundingBox|TypeID)|Is(?:Empty|Rect)|MoveToPoint|Re(?:lease|tain))|tern(?:Create|GetTypeID|Re(?:lease|tain)))|o(?:int(?:ApplyAffineTransform|CreateDictionaryRepresentation|EqualToPoint|Make(?:WithDictionaryRepresentation)?)|st(?:KeyboardEvent|MouseEvent|ScrollWheelEvent)))|Re(?:ct(?:ApplyAffineTransform|C(?:ontains(?:Point|Rect)|reateDictionaryRepresentation)|Divide|EqualToRect|Get(?:Height|M(?:ax(?:X|Y)|i(?:d(?:X|Y)|n(?:X|Y)))|Width)|I(?:n(?:set|te(?:gral|rsect(?:ion|sRect)))|s(?:Empty|Infinite|Null))|Make(?:WithDictionaryRepresentation)?|Offset|Standardize|Union)|gisterScreenRefreshCallback|lease(?:AllDisplays|DisplayFadeReservation|ScreenRefreshRects)|storePermanentDisplayConfiguration)|S(?:creen(?:RegisterMoveCallback|UnregisterMoveCallback)|e(?:ssionCopyCurrentDictionary|t(?:DisplayTransferBy(?:ByteTable|Formula|Table)|LocalEvents(?:FilterDuringSuppressionState|SuppressionInterval)))|h(?:ading(?:Create(?:Axial|Radial)|GetTypeID|Re(?:lease|tain))|ieldingWindow(?:ID|Level))|ize(?:ApplyAffineTransform|CreateDictionaryRepresentation|EqualToSize|Make(?:WithDictionaryRepresentation)?))|UnregisterScreenRefreshCallback|VectorMake|W(?:a(?:itForScreen(?:RefreshRects|UpdateRects)|rpMouseCursorPosition)|indow(?:L(?:evelForKey|istC(?:opyWindowInfo|reate(?:DescriptionFromArray|Image(?:FromArray)?)?))|ServerC(?:FMachPort|reateServerPort))))\b) - - - - - scopeName - source.c.platform - uuid - 3E3CB242-CEBA-4B61-9806-9A97B5783D2A - - \ No newline at end of file diff --git a/extensions/cpp/syntaxes/c.json b/extensions/cpp/syntaxes/c.tmLanguage.json similarity index 100% rename from extensions/cpp/syntaxes/c.json rename to extensions/cpp/syntaxes/c.tmLanguage.json diff --git a/extensions/cpp/syntaxes/c++.json b/extensions/cpp/syntaxes/cpp.tmLanguage.json similarity index 100% rename from extensions/cpp/syntaxes/c++.json rename to extensions/cpp/syntaxes/cpp.tmLanguage.json diff --git a/extensions/cpp/syntaxes/platform.tmLanguage.json b/extensions/cpp/syntaxes/platform.tmLanguage.json new file mode 100644 index 00000000000..bc4821b4f63 --- /dev/null +++ b/extensions/cpp/syntaxes/platform.tmLanguage.json @@ -0,0 +1,574 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/c.tmbundle/blob/master/Syntaxes/Platform.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." + ], + "version": "https://github.com/textmate/c.tmbundle/commit/9aa365882274ca52f01722f3dbb169b9539a20ee", + "comment": "This file was generated with clang-C using MacOSX10.12.sdk", + "fileTypes": [], + "hideFromUser": true, + "name": "Platform", + "patterns": [ + { + "match": "\\bkCF(?:CalendarUnitWeek|Gregorian(?:AllUnits|Units(?:Days|Hours|M(?:inutes|onths)|Seconds|Years)))\\b", + "name": "invalid.deprecated.10.10.support.constant.cf.c" + }, + { + "match": "\\bCFGregorian(?:Date|Units)\\b", + "name": "invalid.deprecated.10.10.support.type.cf.c" + }, + { + "match": "\\bkCFURL(?:CustomIconKey|EffectiveIconKey|LabelColorKey)\\b", + "name": "invalid.deprecated.10.12.support.variable.cf.c" + }, + { + "match": "\\bkCFURLUbiquitousItemPercent(?:DownloadedKey|UploadedKey)\\b", + "name": "invalid.deprecated.10.8.support.variable.cf.c" + }, + { + "match": "\\bkCGWindowWorkspace\\b", + "name": "invalid.deprecated.10.8.support.variable.quartz.c" + }, + { + "match": "\\bkCFURL(?:BookmarkCreationPreferFileIDResolutionMask|HFSPathStyle|ImproperArgumentsError|PropertyKeyUnavailableError|Re(?:moteHostUnavailableError|source(?:AccessViolationError|NotFoundError))|TimeoutError|Unknown(?:Error|PropertyKeyError|SchemeError))\\b", + "name": "invalid.deprecated.10.9.support.constant.cf.c" + }, + { + "match": "\\bkCGEncoding(?:FontSpecific|MacRoman)\\b", + "name": "invalid.deprecated.10.9.support.constant.quartz.c" + }, + { + "match": "\\bCFURLError\\b", + "name": "invalid.deprecated.10.9.support.type.cf.c" + }, + { + "match": "\\bCGTextEncoding\\b", + "name": "invalid.deprecated.10.9.support.type.quartz.c" + }, + { + "match": "\\bkCFURL(?:File(?:DirectoryContents|Exists|L(?:astModificationTime|ength)|OwnerID|POSIXMode)|HTTPStatus(?:Code|Line)|UbiquitousItemIsDownloadedKey)\\b", + "name": "invalid.deprecated.10.9.support.variable.cf.c" + }, + { + "match": "\\bkCFNumberFormatter(?:Currency(?:AccountingStyle|ISOCodeStyle|PluralStyle)|OrdinalStyle)\\b", + "name": "support.constant.cf.10.11.c" + }, + { + "match": "\\bkCFISO8601DateFormatWith(?:ColonSeparatorInTime(?:Zone)?|Da(?:shSeparatorInDate|y)|Full(?:Date|Time)|InternetDateTime|Month|SpaceBetweenDateAndTime|Time(?:Zone)?|WeekOfYear|Year)\\b", + "name": "support.constant.cf.10.12.c" + }, + { + "match": "\\bkCFFileSecurityClear(?:AccessControlList|Group(?:UUID)?|Mode|Owner(?:UUID)?)\\b", + "name": "support.constant.cf.10.8.c" + }, + { + "match": "\\b(?:CF(?:ByteOrder(?:BigEndian|LittleEndian|Unknown)|NotificationSuspensionBehavior(?:Coalesce|D(?:eliverImmediately|rop)|Hold))|kCF(?:B(?:ookmarkResolutionWithout(?:MountingMask|UIMask)|undleExecutableArchitecture(?:I386|PPC(?:64)?|X86_64))|C(?:alendar(?:ComponentsWrap|Unit(?:Day|Era|Hour|M(?:inute|onth)|Quarter|Second|Week(?:Of(?:Month|Year)|day(?:Ordinal)?)|Year(?:ForWeekOfYear)?))|haracterSet(?:AlphaNumeric|C(?:apitalizedLetter|ontrol)|Dec(?:imalDigit|omposable)|Illegal|L(?:etter|owercaseLetter)|N(?:ewline|onBase)|Punctuation|Symbol|UppercaseLetter|Whitespace(?:AndNewline)?)|ompare(?:Anchored|Backwards|CaseInsensitive|DiacriticInsensitive|EqualTo|ForcedOrdering|GreaterThan|L(?:essThan|ocalized)|N(?:onliteral|umerically)|WidthInsensitive))|Dat(?:aSearch(?:Anchored|Backwards)|eFormatter(?:FullStyle|LongStyle|MediumStyle|NoStyle|ShortStyle))|FileDescriptor(?:ReadCallBack|WriteCallBack)|LocaleLanguageDirection(?:BottomToTop|LeftToRight|RightToLeft|TopToBottom|Unknown)|MessagePort(?:BecameInvalidError|IsInvalid|ReceiveTimeout|S(?:endTimeout|uccess)|TransportError)|N(?:otification(?:DeliverImmediately|PostToAllSessions)|umber(?:C(?:FIndexType|GFloatType|harType)|DoubleType|F(?:loat(?:32Type|64Type|Type)|ormatter(?:CurrencyStyle|DecimalStyle|NoStyle|P(?:a(?:d(?:After(?:Prefix|Suffix)|Before(?:Prefix|Suffix))|rseIntegersOnly)|ercentStyle)|Round(?:Ceiling|Down|Floor|Half(?:Down|Even|Up)|Up)|S(?:cientificStyle|pellOutStyle)))|IntType|Long(?:LongType|Type)|MaxType|NSIntegerType|S(?:Int(?:16Type|32Type|64Type|8Type)|hortType)))|PropertyList(?:BinaryFormat_v1_0|Immutable|MutableContainers(?:AndLeaves)?|OpenStepFormat|Read(?:CorruptError|StreamError|UnknownVersionError)|WriteStreamError|XMLFormat_v1_0)|RunLoop(?:A(?:fterWaiting|llActivities)|Before(?:Sources|Timers|Waiting)|E(?:ntry|xit)|Run(?:Finished|HandledSource|Stopped|TimedOut))|S(?:ocket(?:A(?:cceptCallBack|utomaticallyReenable(?:AcceptCallBack|DataCallBack|ReadCallBack|WriteCallBack))|C(?:loseOnInvalidate|onnectCallBack)|DataCallBack|Error|LeaveErrors|NoCallBack|ReadCallBack|Success|Timeout|WriteCallBack)|tr(?:eam(?:E(?:rrorDomain(?:Custom|MacOSStatus|POSIX)|vent(?:CanAcceptBytes|E(?:ndEncountered|rrorOccurred)|HasBytesAvailable|None|OpenCompleted))|Status(?:AtEnd|Closed|Error|NotOpen|Open(?:ing)?|Reading|Writing))|ing(?:Encoding(?:A(?:NSEL|SCII)|Big5(?:_(?:E|HKSCS_1999))?|CNS_11643_92_P(?:1|2|3)|DOS(?:Arabic|BalticRim|C(?:anadianFrench|hinese(?:Simplif|Trad)|yrillic)|Greek(?:1|2)?|Hebrew|Icelandic|Japanese|Korean|Latin(?:1|2|US)|Nordic|Portuguese|Russian|T(?:hai|urkish))|E(?:BCDIC_(?:CP037|US)|UC_(?:CN|JP|KR|TW))|GB(?:K_95|_(?:18030_2000|2312_80))|HZ_GB_2312|ISO(?:Latin(?:1(?:0)?|2|3|4|5|6|7|8|9|Arabic|Cyrillic|Greek|Hebrew|Thai)|_2022_(?:CN(?:_EXT)?|JP(?:_(?:1|2|3))?|KR))|JIS_(?:C6226_78|X02(?:0(?:1_76|8_(?:83|90))|12_90))|K(?:OI8_(?:R|U)|SC_5601_(?:87|92_Johab))|Mac(?:Ar(?:abic|menian)|B(?:engali|urmese)|C(?:e(?:ltic|ntralEurRoman)|hinese(?:Simp|Trad)|roatian|yrillic)|D(?:evanagari|ingbats)|E(?:thiopic|xtArabic)|Farsi|G(?:aelic|eorgian|reek|u(?:jarati|rmukhi))|H(?:FS|ebrew)|I(?:celandic|nuit)|Japanese|K(?:annada|hmer|orean)|Laotian|M(?:alayalam|ongolian)|Oriya|Roman(?:Latin1|ian)?|S(?:inhalese|ymbol)|T(?:amil|elugu|hai|ibetan|urkish)|Ukrainian|V(?:T100|ietnamese))|N(?:extStep(?:Japanese|Latin)|onLossyASCII)|ShiftJIS(?:_X0213(?:_(?:00|MenKuTen))?)?|U(?:TF(?:16(?:BE|LE)?|32(?:BE|LE)?|7(?:_IMAP)?|8)|nicode)|VISCII|Windows(?:Arabic|BalticRim|Cyrillic|Greek|Hebrew|KoreanJohab|Latin(?:1|2|5)|Vietnamese))|NormalizationForm(?:C|D|K(?:C|D))|Tokenizer(?:AttributeLa(?:nguage|tinTranscription)|Token(?:Has(?:DerivedSubTokensMask|HasNumbersMask|NonLettersMask|SubTokensMask)|IsCJWordMask|No(?:ne|rmal))|Unit(?:LineBreak|Paragraph|Sentence|Word(?:Boundary)?)))))|TimeZoneNameStyle(?:DaylightSaving|Generic|S(?:hort(?:DaylightSaving|Generic|Standard)|tandard))|U(?:RL(?:Bookmark(?:Creation(?:MinimalBookmarkMask|S(?:ecurityScopeAllowOnlyReadAccess|uitableForBookmarkFile)|WithSecurityScope)|ResolutionWith(?:SecurityScope|out(?:MountingMask|UIMask)))|Component(?:Fragment|Host|NetLocation|P(?:a(?:rameterString|ssword|th)|ort)|Query|ResourceSpecifier|Scheme|User(?:Info)?)|Enumerator(?:D(?:e(?:faultBehavior|scendRecursively)|irectoryPostOrderSuccess)|E(?:nd|rror)|GenerateFileReferenceURLs|IncludeDirectoriesP(?:ostOrder|reOrder)|S(?:kip(?:Invisibles|PackageContents)|uccess))|POSIXPathStyle|WindowsPathStyle)|serNotification(?:AlternateResponse|Ca(?:ncelResponse|utionAlertLevel)|DefaultResponse|No(?:DefaultButtonFlag|teAlertLevel)|OtherResponse|PlainAlertLevel|StopAlertLevel|UseRadioButtonsFlag))|XML(?:E(?:ntityType(?:Character|Par(?:ameter|sed(?:External|Internal))|Unparsed)|rror(?:E(?:lementlessDocument|ncodingConversionFailure)|Malformed(?:C(?:DSect|haracterReference|loseTag|omment)|D(?:TD|ocument)|Name|P(?:arsedCharacterData|rocessingInstruction)|StartTag)|NoData|Un(?:expectedEOF|knownEncoding)))|Node(?:CurrentVersion|Type(?:Attribute(?:ListDeclaration)?|C(?:DATASection|omment)|Document(?:Fragment|Type)?|E(?:lement(?:TypeDeclaration)?|ntity(?:Reference)?)|Notation|ProcessingInstruction|Text|Whitespace))|Parser(?:A(?:ddImpliedAttributes|llOptions)|NoOptions|Re(?:placePhysicalEntities|solveExternalEntities)|Skip(?:MetaData|Whitespace)|ValidateDocument)|StatusParse(?:InProgress|NotBegun|Successful))))\\b", + "name": "support.constant.cf.c" + }, + { + "match": "\\b(?:FILESEC_(?:ACL(?:_(?:ALLOCSIZE|RAW))?|GR(?:OUP|PUUID)|MODE|OWNER|UUID)|P_(?:ALL|P(?:GID|ID)))\\b", + "name": "support.constant.clib.c" + }, + { + "match": "\\bDISPATCH_BLOCK_(?:ASSIGN_CURRENT|BARRIER|DETACHED|ENFORCE_QOS_CLASS|INHERIT_QOS_CLASS|NO_QOS_CLASS)\\b", + "name": "support.constant.dispatch.10.10.c" + }, + { + "match": "\\bDISPATCH_AUTORELEASE_FREQUENCY_(?:INHERIT|NEVER|WORK_ITEM)\\b", + "name": "support.constant.dispatch.10.12.c" + }, + { + "match": "\\b(?:alphaStage|b(?:etaStage|old)|condense|developStage|extend|finalStage|italic|k(?:NilOptions|UnknownType|VariableLengthArray)|no(?:Err|rmal)|outline|shadow|underline)\\b", + "name": "support.constant.mac-classic.c" + }, + { + "match": "\\bOS(?:BigEndian|LittleEndian|UnknownByteOrder)\\b", + "name": "support.constant.os.c" + }, + { + "match": "\\bkCGImageByteOrder(?:16(?:Big|Little)|32(?:Big|Little)|Mask)\\b", + "name": "support.constant.quartz.10.12.c" + }, + { + "match": "\\b(?:CG(?:GlyphM(?:ax|in)|PDFDataFormat(?:JPEG(?:2000|Encoded)|Raw)|RectM(?:ax(?:XEdge|YEdge)|in(?:XEdge|YEdge)))|kCG(?:A(?:nnotatedSessionEventTap|ssistiveTechHighWindowLevelKey)|B(?:a(?:ck(?:ingStore(?:Buffered|Nonretained|Retained)|stopMenuLevelKey)|seWindowLevelKey)|itmap(?:AlphaInfoMask|ByteOrder(?:16(?:Big|Little)|32(?:Big|Little)|Default|Mask)|Float(?:Components|InfoMask))|lendMode(?:C(?:lear|o(?:lor(?:Burn|Dodge)?|py))|D(?:arken|estination(?:Atop|In|O(?:ut|ver))|ifference)|Exclusion|H(?:ardLight|ue)|L(?:ighten|uminosity)|Multiply|Normal|Overlay|Plus(?:Darker|Lighter)|S(?:aturation|creen|o(?:ftLight|urce(?:Atop|In|Out)))|XOR))|C(?:aptureNo(?:Fill|Options)|o(?:lor(?:ConversionTransform(?:ApplySpace|FromSpace|ToSpace)|SpaceModel(?:CMYK|DeviceN|Indexed|Lab|Monochrome|Pattern|RGB|Unknown))|nfigure(?:For(?:AppOnly|Session)|Permanently))|ursorWindowLevelKey)|D(?:esktop(?:IconWindowLevelKey|WindowLevelKey)|isplay(?:AddFlag|BeginConfigurationFlag|D(?:esktopShapeChangedFlag|isabledFlag)|EnabledFlag|M(?:irrorFlag|ovedFlag)|RemoveFlag|S(?:etM(?:ainFlag|odeFlag)|tream(?:FrameStatus(?:Frame(?:Blank|Complete|Idle)|Stopped)|Update(?:DirtyRects|MovedRects|Re(?:ducedDirtyRects|freshedRects))))|UnMirrorFlag)|ockWindowLevelKey|raggingWindowLevelKey)|E(?:rror(?:CannotComplete|Failure|I(?:llegalArgument|nvalid(?:Con(?:nection|text)|Operation))|No(?:neAvailable|tImplemented)|RangeCheck|Success|TypeCheck)|vent(?:F(?:ilterMaskPermit(?:Local(?:KeyboardEvents|MouseEvents)|SystemDefinedEvents)|lag(?:Mask(?:Al(?:phaShift|ternate)|Co(?:mmand|ntrol)|Help|N(?:onCoalesced|umericPad)|S(?:econdaryFn|hift))|sChanged))|Key(?:Down|Up)|LeftMouse(?:D(?:own|ragged)|Up)|Mouse(?:Moved|Subtype(?:Default|TabletP(?:oint|roximity)))|Null|OtherMouse(?:D(?:own|ragged)|Up)|RightMouse(?:D(?:own|ragged)|Up)|S(?:crollWheel|ource(?:GroupID|State(?:CombinedSessionState|HIDSystemState|ID|Private)|U(?:nixProcessID|ser(?:Data|ID)))|uppressionState(?:RemoteMouseDrag|SuppressionInterval))|Ta(?:bletP(?:ointer|roximity)|p(?:DisabledBy(?:Timeout|UserInput)|Option(?:Default|ListenOnly))|rget(?:ProcessSerialNumber|UnixProcessID))))|F(?:loatingWindowLevelKey|ontPostScriptFormatType(?:1|3|42))|G(?:esturePhase(?:Began|C(?:ancelled|hanged)|Ended|MayBegin|None)|radientDraws(?:AfterEndLocation|BeforeStartLocation))|H(?:IDEventTap|e(?:adInsertEventTap|lpWindowLevelKey))|I(?:mageAlpha(?:First|Last|None(?:Skip(?:First|Last))?|Only|Premultiplied(?:First|Last))|nterpolation(?:Default|High|Low|Medium|None))|KeyboardEvent(?:Autorepeat|Key(?:boardType|code))|Line(?:Cap(?:Butt|Round|Square)|Join(?:Bevel|Miter|Round))|M(?:a(?:inMenuWindowLevelKey|ximumWindowLevelKey)|inimumWindowLevelKey|o(?:dalPanelWindowLevelKey|mentumScrollPhase(?:Begin|Continue|End|None)|use(?:Button(?:Center|Left|Right)|Event(?:ButtonNumber|ClickState|Delta(?:X|Y)|InstantMouser|Number|Pressure|Subtype|WindowUnderMousePointer(?:ThatCanHandleThisEvent)?))))|N(?:ormalWindowLevelKey|umberOf(?:EventSuppressionStates|WindowLevelKeys))|OverlayWindowLevelKey|P(?:DF(?:ArtBox|BleedBox|CropBox|MediaBox|ObjectType(?:Array|Boolean|Dictionary|Integer|N(?:ame|ull)|Real|Str(?:eam|ing))|TrimBox)|at(?:h(?:E(?:OFill(?:Stroke)?|lement(?:Add(?:CurveToPoint|LineToPoint|QuadCurveToPoint)|CloseSubpath|MoveToPoint))|Fill(?:Stroke)?|Stroke)|ternTiling(?:ConstantSpacing(?:MinimalDistortion)?|NoDistortion))|opUpMenuWindowLevelKey)|RenderingIntent(?:AbsoluteColorimetric|Default|Perceptual|RelativeColorimetric|Saturation)|S(?:cr(?:een(?:SaverWindowLevelKey|UpdateOperation(?:Move|Re(?:ducedDirtyRectangleCount|fresh)))|oll(?:EventUnit(?:Line|Pixel)|Phase(?:Began|C(?:ancelled|hanged)|Ended|MayBegin)|WheelEvent(?:DeltaAxis(?:1|2|3)|FixedPtDeltaAxis(?:1|2|3)|I(?:nstantMouser|sContinuous)|MomentumPhase|PointDeltaAxis(?:1|2|3)|Scroll(?:Count|Phase))))|essionEventTap|tatusWindowLevelKey)|T(?:a(?:blet(?:Event(?:DeviceID|Point(?:Buttons|Pressure|X|Y|Z)|Rotation|T(?:angentialPressure|ilt(?:X|Y))|Vendor(?:1|2|3))|ProximityEvent(?:CapabilityMask|DeviceID|EnterProximity|Pointer(?:ID|Type)|SystemTabletID|TabletID|Vendor(?:ID|Pointer(?:SerialNumber|Type)|UniqueID)))|ilAppendEventTap)|ext(?:Clip|Fill(?:Clip|Stroke(?:Clip)?)?|Invisible|Stroke(?:Clip)?)|ornOffMenuWindowLevelKey)|UtilityWindowLevelKey|Window(?:Image(?:B(?:estResolution|oundsIgnoreFraming)|Default|NominalResolution|OnlyShadows|ShouldBeOpaque)|List(?:ExcludeDesktopElements|Option(?:All|IncludingWindow|OnScreen(?:AboveWindow|BelowWindow|Only)))|Sharing(?:None|Read(?:Only|Write)))))\\b", + "name": "support.constant.quartz.c" + }, + { + "match": "\\b(?:CF(?:A(?:bsoluteTime|llocator(?:AllocateCallBack|Co(?:ntext|pyDescriptionCallBack)|DeallocateCallBack|PreferredSizeCallBack|Re(?:allocateCallBack|f|leaseCallBack|tainCallBack))|rray(?:ApplierFunction|C(?:allBacks|opyDescriptionCallBack)|EqualCallBack|Re(?:f|leaseCallBack|tainCallBack))|ttributedStringRef)|B(?:ag(?:ApplierFunction|C(?:allBacks|opyDescriptionCallBack)|EqualCallBack|HashCallBack|Re(?:f|leaseCallBack|tainCallBack))|i(?:naryHeap(?:ApplierFunction|C(?:allBacks|ompareContext)|Ref)|t(?:VectorRef)?)|ooleanRef|undleRef(?:Num)?|yteOrder)|C(?:alendar(?:Identifier|Ref|Unit)|haracterSet(?:PredefinedSet|Ref)|ompar(?:atorFunction|isonResult))|D(?:at(?:a(?:Ref|SearchFlags)|e(?:Formatter(?:Key|Ref|Style)|Ref))|ictionary(?:ApplierFunction|CopyDescriptionCallBack|EqualCallBack|HashCallBack|KeyCallBacks|Re(?:f|leaseCallBack|tainCallBack)|ValueCallBacks))|Error(?:Domain|Ref)|File(?:Descriptor(?:C(?:allBack|ontext)|NativeDescriptor|Ref)|Security(?:ClearOptions|Ref))|GregorianUnitFlags|HashCode|I(?:SO8601DateFormatOptions|ndex)|Locale(?:Identifier|Key|LanguageDirection|Ref)|M(?:achPort(?:C(?:allBack|ontext)|InvalidationCallBack|Ref)|essagePort(?:C(?:allBack|ontext)|InvalidationCallBack|Ref)|utable(?:A(?:rrayRef|ttributedStringRef)|B(?:agRef|itVectorRef)|CharacterSetRef|D(?:ataRef|ictionaryRef)|S(?:etRef|tringRef)))|N(?:otification(?:C(?:allback|enterRef)|Name|SuspensionBehavior)|u(?:llRef|mber(?:Formatter(?:Key|OptionFlags|PadPosition|R(?:ef|oundingMode)|Style)|Ref|Type)))|OptionFlags|P(?:lugIn(?:DynamicRegisterFunction|FactoryFunction|Instance(?:DeallocateInstanceDataFunction|GetInterfaceFunction|Ref)|Ref|UnloadFunction)|ropertyList(?:Format|MutabilityOptions|Ref))|R(?:ange|eadStream(?:ClientCallBack|Ref)|unLoop(?:Activity|Mode|Observer(?:C(?:allBack|ontext)|Ref)|R(?:ef|unResult)|Source(?:Context(?:1)?|Ref)|Timer(?:C(?:allBack|ontext)|Ref)))|S(?:et(?:ApplierFunction|C(?:allBacks|opyDescriptionCallBack)|EqualCallBack|HashCallBack|Re(?:f|leaseCallBack|tainCallBack))|ocket(?:C(?:allBack(?:Type)?|ontext)|Error|NativeHandle|Ref|Signature)|tr(?:eam(?:ClientContext|E(?:rror(?:Domain)?|ventType)|PropertyKey|Status)|ing(?:BuiltInEncodings|CompareFlags|Encoding(?:s)?|InlineBuffer|NormalizationForm|Ref|Tokenizer(?:Ref|TokenType)))|wappedFloat(?:32|64))|T(?:ime(?:Interval|Zone(?:NameStyle|Ref))|ree(?:ApplierFunction|Co(?:ntext|pyDescriptionCallBack)|Re(?:f|leaseCallBack|tainCallBack))|ype(?:ID|Ref))|U(?:RL(?:Bookmark(?:CreationOptions|FileCreationOptions|ResolutionOptions)|ComponentType|E(?:numerator(?:Options|Re(?:f|sult))|rror)|PathStyle|Ref)|UID(?:Bytes|Ref)|serNotification(?:CallBack|Ref))|WriteStream(?:ClientCallBack|Ref)|XML(?:Attribute(?:DeclarationInfo|ListDeclarationInfo)|Document(?:Info|TypeInfo)|E(?:lement(?:Info|TypeDeclarationInfo)|ntity(?:Info|ReferenceInfo|TypeCode)|xternalID)|No(?:de(?:Ref|TypeCode)|tationInfo)|P(?:arser(?:AddChildCallBack|C(?:allBacks|o(?:ntext|pyDescriptionCallBack)|reateXMLStructureCallBack)|EndXMLStructureCallBack|HandleErrorCallBack|Options|Re(?:f|leaseCallBack|solveExternalEntityCallBack|tainCallBack)|StatusCode)|rocessingInstructionInfo)|TreeRef))|FSRef)\\b", + "name": "support.type.cf.c" + }, + { + "match": "\\b(?:FILE|accessx_descriptor|blk(?:cnt_t|size_t)|c(?:addr_t|lock(?:_t|id_t)|t_rune_t)|d(?:addr_t|ev_t|i(?:spatch_time_t|v_t)|ouble_t)|errno_t|f(?:bootstraptransfer(?:_t)?|c(?:hecklv(?:_t)?|odeblobs(?:_t)?)|d_(?:mask|set)|i(?:lesec_(?:property_t|t)|xpt_t)|lo(?:at_t|ck(?:timeout)?)|pos_t|s(?:blkcnt_t|filcnt_t|i(?:d(?:_t)?|gnatures(?:_t)?)|obj_id(?:_t)?|searchblock|tore(?:_t)?))|g(?:id_t|uid_t)|i(?:d(?:_t|type_t)|n(?:_(?:addr_t|port_t)|o(?:64_t|_t)|t(?:16_t|32_t|64_t|8_t|_(?:fast(?:16_t|32_t|64_t|8_t)|least(?:16_t|32_t|64_t|8_t))|max_t|ptr_t)))|jmp_buf|key_t|l(?:conv|div_t|ldiv_t|og2phys)|m(?:ach_port_t|ode_t)|nlink_t|off_t|p(?:id_t|roc_rlimit_control_wakeupmon|trdiff_t)|q(?:addr_t|uad_t)|r(?:advisory|egister_t|lim(?:_t|it)|size_t|u(?:ne_t|sage(?:_info_(?:current|t|v(?:0|1|2|3)))?))|s(?:e(?:archstate|gsz_t)|i(?:g(?:_(?:atomic_t|t)|action|event|info_t|jmp_buf|s(?:et_t|tack)|vec)|ze_t)|size_t|tack_t|useconds_t|wblk_t|yscall_arg_t)|t(?:ime(?:_t|spec|val)|m)|u(?:_(?:char|int(?:16_t|32_t|64_t|8_t)?|long|quad_t|short)|context_t|i(?:d_t|nt(?:16_t|32_t|64_t|8_t|_(?:fast(?:16_t|32_t|64_t|8_t)|least(?:16_t|32_t|64_t|8_t))|max_t|ptr_t)?)|s(?:e(?:conds_t|r_(?:addr_t|long_t|off_t|s(?:ize_t|size_t)|time_t|ulong_t))|hort)|uid_t)|va_list|wint_t)\\b", + "name": "support.type.clib.c" + }, + { + "match": "\\bdispatch_(?:autorelease_frequency_t|block_(?:flags_t|t)|data_(?:applier_t|s|t)|f(?:d_t|unction_t)|group_(?:s|t)|io_(?:close_flags_t|handler_t|interval_flags_t|s|t(?:ype_t)?)|o(?:bject_(?:s|t)|nce_t)|q(?:os_class_t|ueue_(?:attr_(?:s|t)|priority_t|s|t))|s(?:emaphore_(?:s|t)|ource_(?:m(?:ach_send_flags_t|emorypressure_flags_t)|proc_flags_t|s|t(?:imer_flags_t|ype_(?:s|t))?|vnode_flags_t)))\\b", + "name": "support.type.dispatch.c" + }, + { + "match": "\\b(?:AbsoluteTime|B(?:oolean|yte(?:Count|Offset|Ptr)?)|C(?:harParameter|o(?:mpTimeValue|nst(?:LogicalAddress|Str(?:15Param|2(?:55Param|7Param)|3(?:1Param|2Param)|63Param|FileNameParam|ingPtr))))|Duration|F(?:ixed(?:P(?:oint|tr)|Rect)?|loat(?:32(?:Point)?|64|80|96)|ourCharCode|ract(?:Ptr)?)|Handle|ItemCount|L(?:angCode|ogicalAddress)|NumVersion(?:Variant(?:Handle|Ptr)?)?|O(?:S(?:Err|Status|Type(?:Ptr)?)|ptionBits)|P(?:BVersion|RefCon|hysicalAddress|oint(?:Ptr)?|roc(?:Handle|Ptr|essSerialNumber(?:Ptr)?)|tr)|Re(?:ct(?:Ptr)?|gi(?:onCode|ster68kProcPtr)|sType(?:Ptr)?)|S(?:Int(?:16|32|64|8)|RefCon|criptCode|hortFixed(?:Ptr)?|i(?:gnedByte|ze)|t(?:r(?:15|2(?:55|7)|3(?:1|2(?:Field)?)|63|FileName|ing(?:Handle|Ptr))|yle(?:Field|Parameter)?))|Time(?:Base(?:Record)?|Record|Scale|Value(?:64)?)|U(?:Int(?:16|32|64|8)|RefCon|TF(?:16Char|32Char|8Char)|n(?:i(?:Char(?:Count(?:Ptr)?|Ptr)?|codeScalarValue|versalProc(?:Handle|Ptr))|signed(?:Fixed(?:Ptr)?|Wide(?:Ptr)?)))|V(?:HSelect|ersRec(?:Hndl|Ptr)?)|WidePtr|extended(?:80|96)|wide)\\b", + "name": "support.type.mac-classic.c" + }, + { + "match": "\\b(?:pthread_(?:attr_t|cond(?:_t|attr_t)|key_t|mutex(?:_t|attr_t)|o(?:nce_t|verride_(?:s|t))|rwlock(?:_t|attr_t)|t)|sched_param)\\b", + "name": "support.type.pthread.c" + }, + { + "match": "\\bCGImageByteOrderInfo\\b", + "name": "support.type.quartz.10.12.c" + }, + { + "match": "\\b(?:CG(?:AffineTransform|B(?:itmap(?:ContextReleaseDataCallback|Info)|lendMode|uttonCount)|C(?:aptureOptions|harCode|o(?:lor(?:ConversionInfo(?:Ref|TransformType)?|Re(?:f|nderingIntent)|Space(?:Model|Ref)?)?|n(?:figureOption|text(?:Ref)?)))|D(?:ata(?:Consumer(?:Callbacks|PutBytesCallback|Re(?:f|leaseInfoCallback))?|Provider(?:DirectCallbacks|GetByte(?:PointerCallback|s(?:AtPositionCallback|Callback))|Re(?:f|lease(?:BytePointerCallback|DataCallback|InfoCallback)|windCallback)|S(?:equentialCallbacks|kipForwardCallback))?)|eviceColor|i(?:rectDisplayID|splay(?:BlendFraction|C(?:hangeSummaryFlags|o(?:nfigRef|unt))|Err|Fade(?:Interval|ReservationToken)|Mode(?:Ref)?|Re(?:configurationCallBack|servationInterval)|Stream(?:Frame(?:AvailableHandler|Status)|Ref|Update(?:Re(?:ctType|f))?)?)))|E(?:rror|vent(?:Err|F(?:i(?:eld|lterMask)|lags)|M(?:ask|ouseSubtype)|Ref|S(?:ource(?:KeyboardType|Ref|StateID)|uppressionState)|T(?:ap(?:CallBack|Information|Location|Options|P(?:lacement|roxy))|imestamp|ype)))|F(?:loat|ont(?:Index|PostScriptFormat|Ref)?|unction(?:Callbacks|EvaluateCallback|Re(?:f|leaseInfoCallback))?)|G(?:ammaValue|esturePhase|lyph(?:DeprecatedEnum)?|radient(?:DrawingOptions|Ref)?)|I(?:mage(?:AlphaInfo|ByteOrderInfo|Ref)?|nterpolationQuality)|KeyCode|L(?:ayer(?:Ref)?|ine(?:Cap|Join))|M(?:o(?:mentumScrollPhase|useButton)|utablePathRef)|OpenGLDisplayMask|P(?:DF(?:Array(?:Ref)?|Bo(?:olean|x)|ContentStream(?:Ref)?|D(?:ataFormat|ictionary(?:ApplierFunction|Ref)?|ocument(?:Ref)?)|Integer|O(?:bject(?:Ref|Type)?|perator(?:Callback|Table(?:Ref)?))|Page(?:Ref)?|Real|S(?:canner(?:Ref)?|tr(?:eam(?:Ref)?|ing(?:Ref)?)))|SConverter(?:Begin(?:DocumentCallback|PageCallback)|Callbacks|End(?:DocumentCallback|PageCallback)|MessageCallback|ProgressCallback|Re(?:f|leaseInfoCallback))?|at(?:h(?:ApplierFunction|DrawingMode|Element(?:Type)?|Ref)?|tern(?:Callbacks|DrawPatternCallback|Re(?:f|leaseInfoCallback)|Tiling)?)|oint)|Re(?:ct(?:Count|Edge)?|freshRate)|S(?:cr(?:een(?:RefreshCallback|Update(?:Move(?:Callback|Delta)|Operation))|oll(?:EventUnit|Phase))|hading(?:Ref)?|ize)|Text(?:DrawingMode|Encoding)|Vector|W(?:heelCount|indow(?:BackingType|I(?:D|mageOption)|L(?:evel(?:Key)?|istOption)|SharingType)))|IOSurfaceRef)\\b", + "name": "support.type.quartz.c" + }, + { + "match": "\\bkCF(?:Islamic(?:TabularCalendar|UmmAlQuraCalendar)|URL(?:AddedToDirectoryDateKey|DocumentIdentifierKey|GenerationIdentifierKey|QuarantinePropertiesKey))\\b", + "name": "support.variable.cf.10.10.c" + }, + { + "match": "\\bkCFURL(?:ApplicationIsScriptableKey|IsApplicationKey)\\b", + "name": "support.variable.cf.10.11.c" + }, + { + "match": "\\bkCFURL(?:CanonicalPathKey|Volume(?:Is(?:EncryptedKey|RootFileSystemKey)|Supports(?:CompressionKey|ExclusiveRenamingKey|FileCloningKey|SwapRenamingKey)))\\b", + "name": "support.variable.cf.10.12.c" + }, + { + "match": "\\bkCFURL(?:IsExcludedFromBackupKey|PathKey)\\b", + "name": "support.variable.cf.10.8.c" + }, + { + "match": "\\bkCFURL(?:TagNamesKey|UbiquitousItem(?:Downloading(?:ErrorKey|Status(?:Current|Downloaded|Key|NotDownloaded))|UploadingErrorKey))\\b", + "name": "support.variable.cf.10.9.c" + }, + { + "match": "\\bkCF(?:A(?:bsoluteTimeIntervalSince19(?:04|70)|llocator(?:Default|Malloc(?:Zone)?|Null|SystemDefault|UseContext))|B(?:oolean(?:False|True)|u(?:ddhistCalendar|ndle(?:DevelopmentRegionKey|ExecutableKey|I(?:dentifierKey|nfoDictionaryVersionKey)|LocalizationsKey|NameKey|VersionKey)))|C(?:hineseCalendar|o(?:pyString(?:BagCallBacks|DictionaryKeyCallBacks|SetCallBacks)|reFoundationVersionNumber))|DateFormatter(?:AMSymbol|Calendar(?:Name)?|D(?:efault(?:Date|Format)|oesRelativeDateFormattingKey)|EraSymbols|GregorianStartDate|IsLenient|LongEraSymbols|MonthSymbols|PMSymbol|QuarterSymbols|S(?:hort(?:MonthSymbols|QuarterSymbols|Standalone(?:MonthSymbols|QuarterSymbols|WeekdaySymbols)|WeekdaySymbols)|tandalone(?:MonthSymbols|QuarterSymbols|WeekdaySymbols))|T(?:imeZone|woDigitStartDate)|VeryShort(?:MonthSymbols|Standalone(?:MonthSymbols|WeekdaySymbols)|WeekdaySymbols)|WeekdaySymbols)|Error(?:D(?:escriptionKey|omain(?:Cocoa|Mach|OSStatus|POSIX))|FilePathKey|Localized(?:DescriptionKey|FailureReasonKey|RecoverySuggestionKey)|U(?:RLKey|nderlyingErrorKey))|GregorianCalendar|HebrewCalendar|I(?:SO8601Calendar|ndianCalendar|slamicC(?:alendar|ivilCalendar))|JapaneseCalendar|Locale(?:AlternateQuotation(?:BeginDelimiterKey|EndDelimiterKey)|C(?:alendar(?:Identifier)?|o(?:llat(?:ionIdentifier|orIdentifier)|untryCode)|urren(?:cy(?:Code|Symbol)|tLocaleDidChangeNotification))|DecimalSeparator|ExemplarCharacterSet|GroupingSeparator|Identifier|LanguageCode|MeasurementSystem|Quotation(?:BeginDelimiterKey|EndDelimiterKey)|ScriptCode|UsesMetricSystem|VariantCode)|N(?:otFound|u(?:ll|mber(?:Formatter(?:AlwaysShowDecimalSeparator|Currency(?:Code|DecimalSeparator|GroupingSeparator|Symbol)|De(?:cimalSeparator|faultFormat)|ExponentSymbol|FormatWidth|GroupingS(?:eparator|ize)|I(?:n(?:finitySymbol|ternationalCurrencySymbol)|sLenient)|M(?:ax(?:FractionDigits|IntegerDigits|SignificantDigits)|in(?:FractionDigits|IntegerDigits|SignificantDigits|usSign)|ultiplier)|N(?:aNSymbol|egative(?:Prefix|Suffix))|P(?:adding(?:Character|Position)|er(?:MillSymbol|centSymbol)|lusSign|ositive(?:Prefix|Suffix))|Rounding(?:Increment|Mode)|SecondaryGroupingSize|Use(?:GroupingSeparator|SignificantDigits)|ZeroSymbol)|N(?:aN|egativeInfinity)|PositiveInfinity)))|P(?:ersianCalendar|lugIn(?:DynamicRegist(?:erFunctionKey|rationKey)|FactoriesKey|TypesKey|UnloadFunctionKey)|references(?:Any(?:Application|Host|User)|Current(?:Application|Host|User)))|R(?:epublicOfChinaCalendar|unLoop(?:CommonModes|DefaultMode))|S(?:ocket(?:CommandKey|ErrorKey|NameKey|Re(?:gisterCommand|sultKey|trieveCommand)|ValueKey)|tr(?:eamProperty(?:AppendToFile|DataWritten|FileCurrentOffset|Socket(?:NativeHandle|Remote(?:HostName|PortNumber)))|ing(?:BinaryHeapCallBacks|Transform(?:FullwidthHalfwidth|HiraganaKatakana|Latin(?:Arabic|Cyrillic|Greek|H(?:angul|ebrew|iragana)|Katakana|Thai)|MandarinLatin|Strip(?:CombiningMarks|Diacritics)|To(?:Latin|UnicodeName|XMLHex)))))|T(?:imeZoneSystemTimeZoneDidChangeNotification|ype(?:ArrayCallBacks|BagCallBacks|Dictionary(?:KeyCallBacks|ValueCallBacks)|SetCallBacks))|U(?:RL(?:AttributeModificationDateKey|C(?:ontent(?:AccessDateKey|ModificationDateKey)|reationDateKey)|File(?:AllocatedSizeKey|Protection(?:Complete(?:Un(?:lessOpen|tilFirstUserAuthentication))?|Key|None)|Resource(?:IdentifierKey|Type(?:BlockSpecial|CharacterSpecial|Directory|Key|NamedPipe|Regular|S(?:ocket|ymbolicLink)|Unknown))|S(?:ecurityKey|izeKey))|HasHiddenExtensionKey|Is(?:AliasFileKey|DirectoryKey|ExecutableKey|HiddenKey|MountTriggerKey|PackageKey|Re(?:adableKey|gularFileKey)|Sy(?:mbolicLinkKey|stemImmutableKey)|U(?:biquitousItemKey|serImmutableKey)|VolumeKey|WritableKey)|KeysOfUnsetValuesKey|L(?:abelNumberKey|inkCountKey|ocalized(?:LabelKey|NameKey|TypeDescriptionKey))|NameKey|P(?:arentDirectoryURLKey|referredIOBlockSizeKey)|T(?:otalFile(?:AllocatedSizeKey|SizeKey)|ypeIdentifierKey)|UbiquitousItem(?:HasUnresolvedConflictsKey|Is(?:DownloadingKey|Upload(?:edKey|ingKey)))|Volume(?:AvailableCapacityKey|CreationDateKey|I(?:dentifierKey|s(?:AutomountedKey|BrowsableKey|EjectableKey|InternalKey|JournalingKey|LocalKey|Re(?:adOnlyKey|movableKey)))|Localized(?:FormatDescriptionKey|NameKey)|MaximumFileSizeKey|NameKey|ResourceCountKey|Supports(?:AdvisoryFileLockingKey|Case(?:PreservedNamesKey|SensitiveNamesKey)|ExtendedSecurityKey|HardLinksKey|JournalingKey|PersistentIDsKey|R(?:enamingKey|ootDirectoryDatesKey)|S(?:parseFilesKey|ymbolicLinksKey)|VolumeSizesKey|ZeroRunsKey)|TotalCapacityKey|U(?:RL(?:ForRemountingKey|Key)|UIDStringKey)))|serNotification(?:Al(?:ert(?:HeaderKey|MessageKey)|ternateButtonTitleKey)|CheckBoxTitlesKey|DefaultButtonTitleKey|IconURLKey|LocalizationURLKey|OtherButtonTitleKey|P(?:opUp(?:SelectionKey|TitlesKey)|rogressIndicatorValueKey)|SoundURLKey|TextField(?:TitlesKey|ValuesKey)))|XMLTreeError(?:Description|L(?:ineNumber|ocation)|StatusCode))\\b", + "name": "support.variable.cf.c" + }, + { + "match": "\\b(?:daylight|getdate_err|opt(?:arg|err|ind|opt|reset)|s(?:igngam|uboptarg|ys_(?:errlist|nerr|sig(?:list|name)))|t(?:imezone|zname))\\b", + "name": "support.variable.clib.c" + }, + { + "match": "\\bkCGColorSpace(?:ACESCGLinear|D(?:CIP3|isplayP3)|GenericXYZ|ITUR_(?:2020|709)|ROMMRGB)\\b", + "name": "support.variable.quartz.10.11.c" + }, + { + "match": "\\bkCGColor(?:ConversionBlackPointCompensation|Space(?:Extended(?:Gray|Linear(?:Gray|SRGB)|SRGB)|Linear(?:Gray|SRGB)))\\b", + "name": "support.variable.quartz.10.12.c" + }, + { + "match": "\\bkCGDisplayS(?:howDuplicateLowResolutionModes|tream(?:ColorSpace|DestinationRect|MinimumFrameTime|PreserveAspectRatio|QueueDepth|S(?:howCursor|ourceRect)|YCbCrMatrix(?:_(?:ITU_R_(?:601_4|709_2)|SMPTE_240M_1995))?))\\b", + "name": "support.variable.quartz.10.8.c" + }, + { + "match": "\\b(?:CG(?:AffineTransformIdentity|PointZero|Rect(?:Infinite|Null|Zero)|SizeZero)|kCG(?:Color(?:Black|Clear|Space(?:AdobeRGB1998|Generic(?:CMYK|Gray(?:Gamma2_2)?|RGB(?:Linear)?)|SRGB)|White)|Font(?:Index(?:Invalid|Max)|VariationAxis(?:DefaultValue|M(?:axValue|inValue)|Name))|GlyphMax|PDF(?:Context(?:A(?:llows(?:Copying|Printing)|rtBox|uthor)|BleedBox|Cr(?:eator|opBox)|EncryptionKeyLength|Keywords|MediaBox|O(?:utputIntent(?:s)?|wnerPassword)|Subject|T(?:itle|rimBox)|UserPassword)|X(?:DestinationOutputProfile|Info|Output(?:Condition(?:Identifier)?|IntentSubtype)|RegistryName))|Window(?:Alpha|B(?:ackingLocationVideoMemory|ounds)|IsOnscreen|Layer|MemoryUsage|N(?:ame|umber)|Owner(?:Name|PID)|S(?:haringState|toreType))))\\b", + "name": "support.variable.quartz.c" + } + ], + "repository": { + "functions": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.10.support.function.cf.c" + } + }, + "match": "(\\s*)(\\bCF(?:AbsoluteTime(?:AddGregorianUnits|Get(?:D(?:ayOf(?:Week|Year)|ifferenceAsGregorianUnits)|GregorianDate|WeekOfYear))|GregorianDate(?:GetAbsoluteTime|IsValid)|PropertyList(?:Create(?:From(?:Stream|XMLData)|XMLData)|WriteToStream))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.11.support.function.cf.c" + } + }, + "match": "(\\s*)(\\bCFURLCreateStringBy(?:AddingPercentEscapes|ReplacingPercentEscapesUsingEncoding)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.11.support.function.quartz.c" + } + }, + "match": "(\\s*)(\\bCGDisplayModeCopyPixelEncoding\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.12.support.function.clib.c" + } + }, + "match": "(\\s*)(\\bsyscall\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.5.support.function.clib.c" + } + }, + "match": "(\\s*)(\\bdaemon\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.5.support.function.quartz.c" + } + }, + "match": "(\\s*)(\\bCG(?:ContextDrawPDFDocument|PDFDocumentGet(?:ArtBox|BleedBox|CropBox|MediaBox|RotationAngle|TrimBox))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.6.support.function.quartz.c" + } + }, + "match": "(\\s*)(\\bCG(?:ConfigureDisplayMode|Display(?:AvailableModes|BestModeForParameters(?:AndRefreshRate)?|CurrentMode|SwitchToMode)|EnableEventStateCombining|FontCreateWithPlatformFont|InhibitLocalEvents|Post(?:KeyboardEvent|MouseEvent|ScrollWheelEvent)|SetLocalEvents(?:FilterDuringSuppressionState|SuppressionInterval))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.7.support.function.cf.c" + } + }, + "match": "(\\s*)(\\bCFURLEnumeratorGetSourceDidChange\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.8.support.function.cf.c" + } + }, + "match": "(\\s*)(\\bCFXML(?:Node(?:Create(?:Copy)?|Get(?:InfoPtr|String|Type(?:Code|ID)|Version))|Parser(?:Abort|C(?:opyErrorDescription|reate(?:WithDataFromURL)?)|Get(?:C(?:allBacks|ontext)|Document|L(?:ineNumber|ocation)|S(?:ourceURL|tatusCode)|TypeID)|Parse)|Tree(?:Create(?:FromData(?:WithError)?|With(?:DataFromURL|Node)|XMLData)|GetNode))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.8.support.function.mac-classic.c" + } + }, + "match": "(\\s*)(\\b(?:Debug(?:Str|ger)|SysBreak(?:Func|Str)?)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.8.support.function.quartz.c" + } + }, + "match": "(\\s*)(\\bCG(?:Re(?:gisterScreenRefreshCallback|leaseScreenRefreshRects)|Screen(?:RegisterMoveCallback|UnregisterMoveCallback)|UnregisterScreenRefreshCallback|W(?:aitForScreen(?:RefreshRects|UpdateRects)|indowServerCFMachPort))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.9.support.function.cf.c" + } + }, + "match": "(\\s*)(\\bCF(?:PreferencesCopyApplicationList|URL(?:Create(?:DataAndPropertiesFromResource|FromFSRef|PropertyFromResource)|DestroyResource|GetFSRef|WriteDataAndPropertiesToResource))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.9.support.function.clib.c" + } + }, + "match": "(\\s*)(\\b(?:drem|finite|gamma|r(?:inttol|oundtol)|significand)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.9.support.function.dispatch.c" + } + }, + "match": "(\\s*)(\\bdispatch_(?:debug(?:v)?|get_current_queue)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "invalid.deprecated.10.9.support.function.quartz.c" + } + }, + "match": "(\\s*)(\\bCG(?:C(?:ontextS(?:electFont|how(?:Glyphs(?:AtPoint|WithAdvances)?|Text(?:AtPoint)?))|ursorIs(?:DrawnInFramebuffer|Visible))|Display(?:FadeOperationInProgress|I(?:OServicePort|sCaptured)))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.cf.10.12.c" + } + }, + "match": "(\\s*)(\\bCFDateFormatterCreateISO8601Formatter\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.cf.10.8.c" + } + }, + "match": "(\\s*)(\\bCFFileSecurityClearProperties\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.cf.10.9.c" + } + }, + "match": "(\\s*)(\\bCF(?:Autorelease|R(?:eadStream(?:CopyDispatchQueue|SetDispatchQueue)|unLoopTimer(?:GetTolerance|SetTolerance))|URLIsFileReferenceURL|WriteStream(?:CopyDispatchQueue|SetDispatchQueue))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.cf.c" + } + }, + "match": "(\\s*)(\\bCF(?:A(?:bsoluteTimeGetCurrent|llocator(?:Allocate|Create|Deallocate|Get(?:Context|Default|PreferredSizeForSize|TypeID)|Reallocate|SetDefault)|rray(?:App(?:end(?:Array|Value)|lyFunction)|BSearchValues|C(?:ontainsValue|reate(?:Copy|Mutable(?:Copy)?)?)|ExchangeValuesAtIndices|Get(?:Count(?:OfValue)?|FirstIndexOfValue|LastIndexOfValue|TypeID|Value(?:AtIndex|s))|InsertValueAtIndex|Re(?:move(?:AllValues|ValueAtIndex)|placeValues)|S(?:etValueAtIndex|ortValues))|ttributedString(?:BeginEditing|Create(?:Copy|Mutable(?:Copy)?|WithSubstring)?|EndEditing|Get(?:Attribute(?:AndLongestEffectiveRange|s(?:AndLongestEffectiveRange)?)?|Length|MutableString|String|TypeID)|Re(?:moveAttribute|place(?:AttributedString|String))|SetAttribute(?:s)?))|B(?:ag(?:A(?:ddValue|pplyFunction)|C(?:ontainsValue|reate(?:Copy|Mutable(?:Copy)?)?)|Get(?:Count(?:OfValue)?|TypeID|Value(?:IfPresent|s)?)|Re(?:move(?:AllValues|Value)|placeValue)|SetValue)|i(?:naryHeap(?:A(?:ddValue|pplyFunction)|C(?:ontainsValue|reate(?:Copy)?)|Get(?:Count(?:OfValue)?|Minimum(?:IfPresent)?|TypeID|Values)|Remove(?:AllValues|MinimumValue))|tVector(?:C(?:ontainsBit|reate(?:Copy|Mutable(?:Copy)?)?)|FlipBit(?:AtIndex|s)|Get(?:Bit(?:AtIndex|s)|Count(?:OfBit)?|FirstIndexOfBit|LastIndexOfBit|TypeID)|Set(?:AllBits|Bit(?:AtIndex|s)|Count)))|ooleanGet(?:TypeID|Value)|undle(?:C(?:loseBundleResourceMap|opy(?:AuxiliaryExecutableURL|Bu(?:iltInPlugInsURL|ndle(?:Localizations|URL))|Executable(?:Architectures(?:ForURL)?|URL)|InfoDictionary(?:ForURL|InDirectory)|Localiz(?:ationsFor(?:Preferences|URL)|edString)|Pr(?:eferredLocalizationsFromArray|ivateFrameworksURL)|Resource(?:URL(?:ForLocalization|InDirectory|sOfType(?:ForLocalization|InDirectory)?)?|sDirectoryURL)|S(?:hared(?:FrameworksURL|SupportURL)|upportFilesDirectoryURL))|reate(?:BundlesFromDirectory)?)|Get(?:AllBundles|BundleWithIdentifier|D(?:ataPointer(?:ForName|sForNames)|evelopmentRegion)|FunctionPointer(?:ForName|sForNames)|I(?:dentifier|nfoDictionary)|LocalInfoDictionary|MainBundle|P(?:ackageInfo(?:InDirectory)?|lugIn)|TypeID|V(?:alueForInfoDictionaryKey|ersionNumber))|IsExecutableLoaded|LoadExecutable(?:AndReturnError)?|OpenBundleResource(?:Files|Map)|PreflightExecutable|UnloadExecutable)|yteOrderGetCurrent)|C(?:alendar(?:AddComponents|C(?:o(?:mposeAbsoluteTime|py(?:Current|Locale|TimeZone))|reateWithIdentifier)|DecomposeAbsoluteTime|Get(?:ComponentDifference|FirstWeekday|Identifier|M(?:aximumRangeOfUnit|inimum(?:DaysInFirstWeek|RangeOfUnit))|OrdinalityOfUnit|RangeOfUnit|T(?:imeRangeOfUnit|ypeID))|Set(?:FirstWeekday|Locale|MinimumDaysInFirstWeek|TimeZone))|haracterSet(?:AddCharactersIn(?:Range|String)|Create(?:BitmapRepresentation|Copy|InvertedSet|Mutable(?:Copy)?|With(?:BitmapRepresentation|CharactersIn(?:Range|String)))|Get(?:Predefined|TypeID)|HasMemberInPlane|I(?:n(?:tersect|vert)|s(?:CharacterMember|LongCharacterMember|SupersetOfSet))|RemoveCharactersIn(?:Range|String)|Union)|o(?:nvert(?:Double(?:HostToSwapped|SwappedToHost)|Float(?:32(?:HostToSwapped|SwappedToHost)|64(?:HostToSwapped|SwappedToHost)|HostToSwapped|SwappedToHost))|py(?:Description|HomeDirectoryURL|TypeIDDescription)))|D(?:at(?:a(?:AppendBytes|Create(?:Copy|Mutable(?:Copy)?|WithBytesNoCopy)?|DeleteBytes|Find|Get(?:Byte(?:Ptr|s)|Length|MutableBytePtr|TypeID)|IncreaseLength|ReplaceBytes|SetLength)|e(?:C(?:ompare|reate)|Formatter(?:C(?:opyProperty|reate(?:DateF(?:ormatFromTemplate|romString)|StringWith(?:AbsoluteTime|Date))?)|Get(?:AbsoluteTimeFromString|DateStyle|Format|Locale|T(?:imeStyle|ypeID))|Set(?:Format|Property))|Get(?:AbsoluteTime|T(?:imeIntervalSinceDate|ypeID))))|ictionary(?:A(?:ddValue|pplyFunction)|C(?:ontains(?:Key|Value)|reate(?:Copy|Mutable(?:Copy)?)?)|Get(?:Count(?:Of(?:Key|Value))?|KeysAndValues|TypeID|Value(?:IfPresent)?)|Re(?:move(?:AllValues|Value)|placeValue)|SetValue))|E(?:qual|rror(?:C(?:opy(?:Description|FailureReason|RecoverySuggestion|UserInfo)|reate(?:WithUserInfoKeysAndValues)?)|Get(?:Code|Domain|TypeID)))|File(?:Descriptor(?:Create(?:RunLoopSource)?|DisableCallBacks|EnableCallBacks|Get(?:Context|NativeDescriptor|TypeID)|I(?:nvalidate|sValid))|Security(?:C(?:opy(?:AccessControlList|GroupUUID|OwnerUUID)|reate(?:Copy)?)|Get(?:Group|Mode|Owner|TypeID)|Set(?:AccessControlList|Group(?:UUID)?|Mode|Owner(?:UUID)?)))|Get(?:Allocator|RetainCount|TypeID)|Hash|Locale(?:C(?:opy(?:AvailableLocaleIdentifiers|C(?:ommonISOCurrencyCodes|urrent)|DisplayNameForPropertyValue|ISO(?:C(?:ountryCodes|urrencyCodes)|LanguageCodes)|PreferredLanguages)|reate(?:C(?:anonicalL(?:anguageIdentifierFromString|ocaleIdentifierFromS(?:criptManagerCodes|tring))|o(?:mponentsFromLocaleIdentifier|py))|LocaleIdentifierFrom(?:Components|WindowsLocaleCode))?)|Get(?:Identifier|Language(?:CharacterDirection|LineDirection)|System|TypeID|Value|WindowsLocaleCodeFromLocaleIdentifier))|M(?:a(?:chPort(?:Create(?:RunLoopSource|WithPort)?|Get(?:Context|InvalidationCallBack|Port|TypeID)|I(?:nvalidate|sValid)|SetInvalidationCallBack)|keCollectable)|essagePort(?:Create(?:Local|R(?:emote|unLoopSource))|Get(?:Context|InvalidationCallBack|Name|TypeID)|I(?:nvalidate|s(?:Remote|Valid))|Se(?:ndRequest|t(?:DispatchQueue|InvalidationCallBack|Name))))|N(?:otificationCenter(?:AddObserver|Get(?:D(?:arwinNotifyCenter|istributedCenter)|LocalCenter|TypeID)|PostNotification(?:WithOptions)?|Remove(?:EveryObserver|Observer))|u(?:llGetTypeID|mber(?:C(?:ompare|reate)|Formatter(?:C(?:opyProperty|reate(?:NumberFromString|StringWith(?:Number|Value))?)|Get(?:DecimalInfoForCurrencyCode|Format|Locale|Style|TypeID|ValueFromString)|Set(?:Format|Property))|Get(?:ByteSize|Type(?:ID)?|Value)|IsFloatType)))|P(?:lugIn(?:AddInstanceForFactory|Create|FindFactoriesForPlugInType(?:InPlugIn)?|Get(?:Bundle|TypeID)|I(?:nstance(?:Create(?:WithInstanceDataSize)?|Get(?:FactoryName|In(?:stanceData|terfaceFunctionTable)|TypeID))|sLoadOnDemand)|Re(?:gister(?:FactoryFunction(?:ByName)?|PlugInType)|moveInstanceForFactory)|SetLoadOnDemand|Unregister(?:Factory|PlugInType))|r(?:eferences(?:A(?:ddSuitePreferencesToApp|pp(?:Synchronize|ValueIsForced))|Copy(?:AppValue|KeyList|Multiple|Value)|GetApp(?:BooleanValue|IntegerValue)|RemoveSuitePreferencesFromApp|S(?:et(?:AppValue|Multiple|Value)|ynchronize))|opertyList(?:Create(?:D(?:ata|eepCopy)|With(?:Data|Stream))|IsValid|Write)))|R(?:angeMake|e(?:adStream(?:C(?:lose|opy(?:Error|Property)|reateWith(?:BytesNoCopy|File))|Get(?:Buffer|Error|Status|TypeID)|HasBytesAvailable|Open|Read|S(?:cheduleWithRunLoop|et(?:Client|Property))|UnscheduleFromRunLoop)|lease|tain)|unLoop(?:Add(?:CommonMode|Observer|Source|Timer)|Co(?:ntains(?:Observer|Source|Timer)|py(?:AllModes|CurrentMode))|Get(?:Current|Main|NextTimerFireDate|TypeID)|IsWaiting|Observer(?:Create(?:WithHandler)?|DoesRepeat|Get(?:Activities|Context|Order|TypeID)|I(?:nvalidate|sValid))|PerformBlock|R(?:emove(?:Observer|Source|Timer)|un(?:InMode)?)|S(?:ource(?:Create|Get(?:Context|Order|TypeID)|I(?:nvalidate|sValid)|Signal)|top)|Timer(?:Create(?:WithHandler)?|DoesRepeat|Get(?:Context|Interval|NextFireDate|Order|TypeID)|I(?:nvalidate|sValid)|SetNextFireDate)|WakeUp))|S(?:et(?:A(?:ddValue|pplyFunction)|C(?:ontainsValue|reate(?:Copy|Mutable(?:Copy)?)?)|Get(?:Count(?:OfValue)?|TypeID|Value(?:IfPresent|s)?)|Re(?:move(?:AllValues|Value)|placeValue)|SetValue)|how(?:Str)?|ocket(?:C(?:o(?:nnectToAddress|py(?:Address|PeerAddress|Registered(?:SocketSignature|Value)))|reate(?:ConnectedToSocketSignature|RunLoopSource|With(?:Native|SocketSignature))?)|DisableCallBacks|EnableCallBacks|Get(?:Context|DefaultNameRegistryPortNumber|Native|SocketFlags|TypeID)|I(?:nvalidate|sValid)|Register(?:SocketSignature|Value)|Se(?:ndData|t(?:Address|DefaultNameRegistryPortNumber|SocketFlags))|Unregister)|tr(?:eamCreate(?:BoundPair|PairWith(?:PeerSocketSignature|Socket(?:ToHost)?))|ing(?:Append(?:C(?:String|haracters)|Format(?:AndArguments)?|PascalString)?|C(?:apitalize|o(?:mpare(?:WithOptions(?:AndLocale)?)?|nvert(?:EncodingTo(?:IANACharSetName|NSStringEncoding|WindowsCodepage)|IANACharSetNameToEncoding|NSStringEncodingToEncoding|WindowsCodepageToEncoding))|reate(?:Array(?:BySeparatingStrings|WithFindResults)|ByCombiningStrings|Copy|ExternalRepresentation|FromExternalRepresentation|Mutable(?:Copy|WithExternalCharactersNoCopy)?|With(?:Bytes(?:NoCopy)?|C(?:String(?:NoCopy)?|haracters(?:NoCopy)?)|F(?:ileSystemRepresentation|ormat(?:AndArguments)?)|PascalString(?:NoCopy)?|Substring)))|Delete|F(?:ind(?:AndReplace|CharacterFromSet|WithOptions(?:AndLocale)?)?|old)|Get(?:Bytes|C(?:String(?:Ptr)?|haracter(?:AtIndex|FromInlineBuffer|s(?:Ptr)?))|DoubleValue|F(?:astestEncoding|ileSystemRepresentation)|HyphenationLocationBeforeIndex|IntValue|L(?:ength|i(?:neBounds|stOfAvailableEncodings)|ongCharacterForSurrogatePair)|M(?:aximumSize(?:ForEncoding|OfFileSystemRepresentation)|ostCompatibleMacStringEncoding)|NameOfEncoding|Pa(?:ragraphBounds|scalString(?:Ptr)?)|RangeOfComposedCharactersAtIndex|S(?:mallestEncoding|urrogatePairForLongCharacter|ystemEncoding)|TypeID)|Has(?:Prefix|Suffix)|I(?:n(?:itInlineBuffer|sert)|s(?:EncodingAvailable|HyphenationAvailableForLocale|Surrogate(?:HighCharacter|LowCharacter)))|Lowercase|Normalize|Pad|Replace(?:All)?|SetExternalCharactersNoCopy|T(?:okenizer(?:AdvanceToNextToken|C(?:opy(?:BestStringLanguage|CurrentTokenAttribute)|reate)|G(?:et(?:Current(?:SubTokens|TokenRange)|TypeID)|oToTokenAtIndex)|SetString)|r(?:ansform|im(?:Whitespace)?))|Uppercase))|wapInt(?:16(?:BigToHost|HostTo(?:Big|Little)|LittleToHost)?|32(?:BigToHost|HostTo(?:Big|Little)|LittleToHost)?|64(?:BigToHost|HostTo(?:Big|Little)|LittleToHost)?))|T(?:imeZone(?:C(?:opy(?:Abbreviation(?:Dictionary)?|Default|KnownNames|LocalizedName|System)|reate(?:With(?:Name|TimeIntervalFromGMT))?)|Get(?:Da(?:ta|ylightSavingTimeOffset)|N(?:ame|extDaylightSavingTimeTransition)|SecondsFromGMT|TypeID)|IsDaylightSavingTime|ResetSystem|Set(?:AbbreviationDictionary|Default))|ree(?:App(?:endChild|lyFunctionToChildren)|Create|FindRoot|Get(?:C(?:hild(?:AtIndex|Count|ren)|ontext)|FirstChild|NextSibling|Parent|TypeID)|InsertSibling|PrependChild|Remove(?:AllChildren)?|S(?:etContext|ortChildren)))|U(?:RL(?:C(?:anBeDecomposed|learResourcePropertyCache(?:ForKey)?|opy(?:AbsoluteURL|F(?:ileSystemPath|ragment)|HostName|LastPathComponent|NetLocation|Pa(?:rameterString|ssword|th(?:Extension)?)|QueryString|Resource(?:Propert(?:iesForKeys|yForKey)|Specifier)|S(?:cheme|trictPath)|UserName)|reate(?:AbsoluteURLWithBytes|B(?:ookmarkData(?:From(?:AliasRecord|File))?|yResolvingBookmarkData)|Copy(?:AppendingPath(?:Component|Extension)|Deleting(?:LastPathComponent|PathExtension))|Data|F(?:ile(?:PathURL|ReferenceURL)|romFileSystemRepresentation(?:RelativeToBase)?)|ResourcePropert(?:iesForKeysFromBookmarkData|yForKeyFromBookmarkData)|StringByReplacingPercentEscapes|With(?:Bytes|FileSystemPath(?:RelativeToBase)?|String)))|Enumerator(?:CreateFor(?:DirectoryURL|MountedVolumes)|Get(?:DescendentLevel|NextURL|TypeID)|SkipDescendents)|Get(?:B(?:aseURL|yte(?:RangeForComponent|s))|FileSystemRepresentation|PortNumber|String|TypeID)|HasDirectoryPath|ResourceIsReachable|S(?:et(?:ResourcePropert(?:iesForKeys|yForKey)|TemporaryResourcePropertyForKey)|t(?:artAccessingSecurityScopedResource|opAccessingSecurityScopedResource))|WriteBookmarkDataToFile)|UID(?:Create(?:From(?:String|UUIDBytes)|String|WithBytes)?|Get(?:ConstantUUIDWithBytes|TypeID|UUIDBytes))|serNotification(?:C(?:ancel|heckBoxChecked|reate(?:RunLoopSource)?)|Display(?:Alert|Notice)|Get(?:Response(?:Dictionary|Value)|TypeID)|PopUpSelection|ReceiveResponse|SecureTextField|Update))|WriteStream(?:C(?:anAcceptBytes|lose|opy(?:Error|Property)|reateWith(?:AllocatedBuffers|Buffer|File))|Get(?:Error|Status|TypeID)|Open|S(?:cheduleWithRunLoop|et(?:Client|Property))|UnscheduleFromRunLoop|Write)|XMLCreateStringBy(?:EscapingEntities|UnescapingEntities))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.clib.10.10.c" + } + }, + "match": "(\\s*)(\\b(?:f(?:accessat|chownat)|getattrlist(?:at|bulk)|linkat|openat|re(?:adlinkat|nameat)|symlinkat|unlinkat)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.clib.10.12.c" + } + }, + "match": "(\\s*)(\\b(?:clock_(?:get(?:res|time(?:_nsec_np)?)|settime)|mk(?:ostemp(?:s)?|pathat_np)|rename(?:atx_np|x_np)|timingsafe_bcmp)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.clib.10.8.c" + } + }, + "match": "(\\s*)(\\b(?:fsync_volume_np|mkpath_np|sync_volume_np)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.clib.10.9.c" + } + }, + "match": "(\\s*)(\\bf(?:fsll|lsll)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.clib.c" + } + }, + "match": "(\\s*)(\\b(?:a(?:64l|b(?:ort|s)|c(?:c(?:ess(?:x_np)?|t)|os(?:f|h(?:f|l)?|l)?)|dd_profil|l(?:arm|loca)|rc4random(?:_(?:addrandom|buf|stir|uniform))?|s(?:ctime(?:_r)?|in(?:f|h(?:f|l)?|l)?|printf)|t(?:an(?:2(?:f|l)?|f|h(?:f|l)?|l)?|exit(?:_b)?|o(?:f|i|l(?:l)?)))|b(?:c(?:mp|opy)|rk|s(?:d_signal|earch(?:_b)?)|zero)|c(?:alloc|brt(?:f|l)?|eil(?:f|l)?|get(?:c(?:ap|lose)|ent|first|match|n(?:ext|um)|s(?:et|tr)|ustr)|h(?:dir|own|root)|l(?:earerr|o(?:ck|se))|o(?:nfstr|pysign(?:f|l)?|s(?:f|h(?:f|l)?|l)?)|r(?:eat|ypt)|t(?:ermid(?:_r)?|ime(?:_r)?))|d(?:evname(?:_r)?|i(?:fftime|gittoint|spatch_(?:time|walltime)|v)|printf|rand48|up(?:2)?)|e(?:cvt|n(?:crypt|dusershell)|r(?:and48|f(?:c(?:f|l)?|f|l)?)|x(?:changedata|ec(?:l(?:e|p)?|v(?:P|e|p)?)|it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|f(?:abs(?:f|l)?|c(?:h(?:dir|own)|lose|ntl|vt)|d(?:im(?:f|l)?|open)|e(?:of|rror)|f(?:l(?:agstostr|ush)|s(?:ctl|l)?)|get(?:attrlist|c|ln|pos|s)|ile(?:no|sec_(?:dup|free|get_property|init|query_property|set_property|unset_property))|l(?:o(?:ck(?:file)?|or(?:f|l)?)|s(?:l)?)|m(?:a(?:f|l|x(?:f|l)?)?|in(?:f|l)?|od(?:f|l)?|tcheck)|o(?:pen|rk)|p(?:athconf|rintf|u(?:rge|t(?:c|s)))|re(?:ad|e|open|xp(?:f|l)?)|s(?:c(?:anf|tl)|e(?:ek(?:o)?|t(?:attrlist|pos))|ync)|t(?:ell(?:o)?|r(?:uncate|ylockfile))|un(?:lockfile|open)|write)|g(?:cvt|et(?:attrlist|bsize|c(?:_unlocked|har(?:_unlocked)?|wd)?|d(?:ate|elim|irentriesattr|omainname|tablesize)|e(?:gid|nv|uid)|g(?:id|roup(?:list|s))|host(?:id|name)|iopolicy_np|l(?:ine|o(?:adavg|gin(?:_r)?))|mode|opt|p(?:a(?:gesize|ss)|eereid|g(?:id|rp)|id|pid|r(?:iority|ogname))|r(?:limit|usage)|s(?:groups_np|id|ubopt)?|u(?:id|sershell)|w(?:d|groups_np)?)|mtime(?:_r)?|rantpt)|h(?:eapsort(?:_b)?|ypot(?:f|l)?)|i(?:logb(?:f|l)?|n(?:dex|it(?:groups|state))|ruserok(?:_sa)?|s(?:a(?:l(?:num|pha)|scii|tty)|blank|cntrl|digit|graph|hexnumber|ideogram|lower|number|p(?:honogram|rint|unct)|rune|s(?:etugid|p(?:ace|ecial))|upper|xdigit))|j(?:0|1|n|rand48)|kill(?:pg)?|l(?:64a|abs|c(?:hown|ong48)|d(?:exp(?:f|l)?|iv)|gamma(?:f|l)?|ink|l(?:abs|div|r(?:int(?:f|l)?|ound(?:f|l)?))|o(?:c(?:al(?:econv|time(?:_r)?)|kf)|g(?:1(?:0(?:f|l)?|p(?:f|l)?)|2(?:f|l)?|b(?:f|l)?|f|l)?|ngjmp(?:error)?)|r(?:and48|int(?:f|l)?|ound(?:f|l)?)|seek)|m(?:a(?:jor|kedev|lloc)|b(?:len|stowcs|towc)|e(?:m(?:c(?:cpy|hr|mp|py)|m(?:em|ove)|set(?:_pattern(?:16|4|8))?)|rgesort(?:_b)?)|inor|k(?:dtemp|nod|stemp(?:_dprotected_np|s)?|t(?:emp|ime))|odf(?:f|l)?|rand48)|n(?:an(?:f|l|osleep)?|e(?:arbyint(?:f|l)?|xt(?:after(?:f|l)?|toward(?:f|l)?))|fssvc|ice|rand48)|open(?:_dprotected_np|x_np)?|p(?:a(?:thconf|use)|close|error|ipe|o(?:pen|six(?:2time|_(?:memalign|openpt))|w(?:f|l)?)|r(?:ead|intf|ofil)|s(?:elect|ignal|ort(?:_(?:b|r))?)|t(?:hread_(?:getugid_np|kill|s(?:etugid_np|igmask))|sname)|ut(?:c(?:_unlocked|har(?:_unlocked)?)?|env|s|w)|write)|qsort(?:_(?:b|r))?|r(?:a(?:dixsort|ise|nd(?:_r|om)?)|cmd(?:_af)?|e(?:a(?:d(?:link)?|l(?:loc(?:f)?|path))|boot|m(?:ainder(?:f|l)?|ove|quo(?:f|l)?)|name|voke|wind)|in(?:dex|t(?:f|l)?)|mdir|ound(?:f|l)?|resvport(?:_af)?|userok)|s(?:brk|ca(?:lb(?:ln(?:f|l)?|n(?:f|l)?)?|nf)|e(?:archfs|ed48|lect|t(?:attrlist|buf(?:fer)?|domainname|e(?:gid|nv|uid)|g(?:id|roups)|host(?:id|name)|iopolicy_np|jmp|key|l(?:inebuf|o(?:cale|gin))|mode|p(?:g(?:id|rp)|r(?:iority|ogname))|r(?:e(?:gid|uid)|gid|limit|uid)|s(?:groups_np|id|tate)|u(?:id|sershell)|vbuf|wgroups_np))|i(?:g(?:a(?:ction|ddset|ltstack)|block|delset|emptyset|fillset|hold|i(?:gnore|nterrupt|smember)|longjmp|nal|p(?:ause|ending|rocmask)|relse|s(?:et(?:jmp|mask)?|uspend)|vec|wait)|n(?:f|h(?:f|l)?|l)?)|leep|nprintf|printf|qrt(?:f|l)?|ra(?:dixsort|nd(?:48|dev|om(?:dev)?)?)|scanf|t(?:p(?:cpy|ncpy)|r(?:c(?:a(?:se(?:cmp|str)|t)|hr|mp|oll|py|spn)|dup|error(?:_r)?|ftime|l(?:c(?:at|py)|en)|mode|n(?:c(?:a(?:secmp|t)|mp|py)|dup|len|str)|p(?:brk|time)|rchr|s(?:ep|ignal|pn|tr)|to(?:d|f(?:flags)?|k(?:_r)?|l(?:d|l)?|q|u(?:l(?:l)?|q))|xfrm))|wa(?:b|pon)|y(?:mlink|nc|s(?:conf|tem)))|t(?:an(?:f|h(?:f|l)?|l)?|c(?:getpgrp|setpgrp)|empnam|gamma(?:f|l)?|ime(?:2posix|gm|local)?|mp(?:file|nam)|o(?:ascii|lower|upper)|runc(?:ate|f|l)?|ty(?:name(?:_r)?|slot)|zset(?:wall)?)|u(?:alarm|n(?:delete|getc|l(?:ink|ockpt)|setenv|whiteout)|sleep)|v(?:a(?:lloc|sprintf)|dprintf|f(?:ork|printf|scanf)|printf|s(?:canf|nprintf|printf|scanf))|w(?:ait(?:3|4|id|pid)?|c(?:stombs|tomb)|rite)|y(?:0|1|n)|zopen)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.dispatch.10.10.c" + } + }, + "match": "(\\s*)(\\bdispatch_(?:block_(?:c(?:ancel|reate(?:_with_qos_class)?)|notify|perform|testcancel|wait)|queue_(?:attr_make_with_qos_class|get_qos_class))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.dispatch.10.12.c" + } + }, + "match": "(\\s*)(\\bdispatch_(?:a(?:ctivate|ssert_queue(?:_(?:barrier|not))?)|queue_(?:attr_make_(?:initially_inactive|with_autorelease_frequency)|create_with_target))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.dispatch.c" + } + }, + "match": "(\\s*)(\\bdispatch_(?:a(?:fter(?:_f)?|pply(?:_f)?|sync(?:_f)?)|barrier_(?:async(?:_f)?|sync(?:_f)?)|cancel|data_(?:apply|c(?:opy_region|reate(?:_(?:concat|map|subrange))?)|get_size)|g(?:et_(?:context|global_queue|main_queue|specific)|roup_(?:async(?:_f)?|create|enter|leave|notify(?:_f)?|wait))|io_(?:barrier|c(?:lose|reate(?:_with_(?:io|path))?)|get_descriptor|read|set_(?:high_water|interval|low_water)|write)|main|notify|once(?:_f)?|queue_(?:create|get_(?:label|specific)|set_specific)|re(?:ad|lease|sume|tain)|s(?:e(?:maphore_(?:create|signal|wait)|t_(?:context|finalizer_f|target_queue))|ource_(?:c(?:ancel|reate)|get_(?:data|handle|mask)|merge_data|set_(?:cancel_handler(?:_f)?|event_handler(?:_f)?|registration_handler(?:_f)?|timer)|testcancel)|uspend|ync(?:_f)?)|testcancel|w(?:ait|rite))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.mac-classic.c" + } + }, + "match": "(\\s*)(\\bStrLength\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.os.c" + } + }, + "match": "(\\s*)(\\b(?:OS(?:HostByteOrder|ReadSwapInt(?:16|32|64)|WriteSwapInt(?:16|32|64))|gethostuuid)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.pthread.10.10.c" + } + }, + "match": "(\\s*)(\\bpthread_(?:attr_(?:get_qos_class_np|set_qos_class_np)|get_qos_class_np|override_qos_class_(?:end_np|start_np)|set_qos_class_self_np)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.pthread.c" + } + }, + "match": "(\\s*)(\\b(?:pthread_(?:at(?:fork|tr_(?:destroy|get(?:detachstate|guardsize|inheritsched|s(?:c(?:hedp(?:aram|olicy)|ope)|tack(?:addr|size)?))|init|set(?:detachstate|guardsize|inheritsched|s(?:c(?:hedp(?:aram|olicy)|ope)|tack(?:addr|size)?))))|c(?:ancel|ond(?:_(?:broadcast|destroy|init|signal(?:_thread_np)?|timedwait(?:_relative_np)?|wait)|attr_(?:destroy|getpshared|init|setpshared))|reate(?:_suspended_np)?)|detach|e(?:qual|xit)|from_mach_thread_np|get(?:_stack(?:addr_np|size_np)|concurrency|name_np|s(?:chedparam|pecific))|is_threaded_np|join|k(?:ey_(?:create|delete)|ill)|m(?:a(?:ch_thread_np|in_np)|utex(?:_(?:destroy|getprioceiling|init|lock|setprioceiling|trylock|unlock)|attr_(?:destroy|get(?:p(?:r(?:ioceiling|otocol)|shared)|type)|init|set(?:p(?:r(?:ioceiling|otocol)|shared)|type))))|once|rwlock(?:_(?:destroy|init|rdlock|try(?:rdlock|wrlock)|unlock|wrlock)|attr_(?:destroy|getpshared|init|setpshared))|s(?:e(?:lf|t(?:c(?:ancel(?:state|type)|oncurrency)|name_np|s(?:chedparam|pecific)))|igmask)|t(?:estcancel|hreadid_np)|yield_np)|sched_(?:get_priority_m(?:ax|in)|yield))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.quartz.10.11.c" + } + }, + "match": "(\\s*)(\\bCG(?:ColorCreateCopyByMatchingToColorSpace|Event(?:PostToPid|TapCreateForPid)|ImageGetUTType)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.quartz.10.12.c" + } + }, + "match": "(\\s*)(\\bCGColor(?:ConversionInfoCreate(?:FromList)?|Space(?:CopyICCData|IsWideGamutRGB|SupportsOutput))\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.quartz.10.8.c" + } + }, + "match": "(\\s*)(\\bCG(?:Display(?:ModeGetPixel(?:Height|Width)|Stream(?:Create(?:WithDispatchQueue)?|Get(?:RunLoopSource|TypeID)|St(?:art|op)|Update(?:CreateMergedUpdate|Get(?:DropCount|MovedRectsDelta|Rects|TypeID))))|WindowServerCreateServerPort)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.quartz.10.9.c" + } + }, + "match": "(\\s*)(\\bCGPath(?:AddRoundedRect|CreateWithRoundedRect)\\b)" + }, + { + "captures": { + "1": { + "name": "punctuation.whitespace.support.function.leading" + }, + "2": { + "name": "support.function.quartz.c" + } + }, + "match": "(\\s*)(\\bCG(?:A(?:cquireDisplayFadeReservation|ffineTransform(?:Concat|EqualToTransform|I(?:nvert|sIdentity)|Make(?:Rotation|Scale|Translation)?|Rotate|Scale|Translate)|ssociateMouseAndMouseCursorPosition)|B(?:eginDisplayConfiguration|itmapContext(?:Create(?:Image|WithData)?|Get(?:AlphaInfo|B(?:it(?:mapInfo|sPer(?:Component|Pixel))|ytesPerRow)|ColorSpace|Data|Height|Width)))|C(?:a(?:ncelDisplayConfiguration|ptureAllDisplays(?:WithOptions)?)|o(?:lor(?:C(?:onversionInfoGetTypeID|reate(?:Copy(?:WithAlpha)?|Generic(?:CMYK|Gray|RGB)|WithPattern)?)|EqualToColor|Get(?:Alpha|Co(?:lorSpace|mponents|nstantColor)|NumberOfComponents|Pattern|TypeID)|Re(?:lease|tain)|Space(?:C(?:opy(?:ICCProfile|Name)|reate(?:Calibrated(?:Gray|RGB)|Device(?:CMYK|Gray|RGB)|I(?:CCBased|ndexed)|Lab|Pattern|With(?:ICCProfile|Name|PlatformColorSpace)))|Get(?:BaseColorSpace|ColorTable(?:Count)?|Model|NumberOfComponents|TypeID)|Re(?:lease|tain)))|mpleteDisplayConfiguration|n(?:figureDisplay(?:FadeEffect|MirrorOfDisplay|Origin|StereoOperation|WithDisplayMode)|text(?:Add(?:Arc(?:ToPoint)?|CurveToPoint|EllipseInRect|Line(?:ToPoint|s)|Path|QuadCurveToPoint|Rect(?:s)?)|Begin(?:Pa(?:ge|th)|TransparencyLayer(?:WithRect)?)|C(?:l(?:earRect|ip(?:To(?:Mask|Rect(?:s)?))?|osePath)|o(?:n(?:catCTM|vert(?:PointTo(?:DeviceSpace|UserSpace)|RectTo(?:DeviceSpace|UserSpace)|SizeTo(?:DeviceSpace|UserSpace)))|pyPath))|Draw(?:Image|L(?:ayer(?:AtPoint|InRect)|inearGradient)|P(?:DFPage|ath)|RadialGradient|Shading|TiledImage)|E(?:O(?:Clip|FillPath)|nd(?:Page|TransparencyLayer))|F(?:ill(?:EllipseInRect|Path|Rect(?:s)?)|lush)|Get(?:C(?:TM|lipBoundingBox)|InterpolationQuality|Path(?:BoundingBox|CurrentPoint)|T(?:ext(?:Matrix|Position)|ypeID)|UserSpaceToDeviceSpaceTransform)|IsPathEmpty|MoveToPoint|PathContainsPoint|R(?:e(?:lease|placePathWithStrokedPath|storeGState|tain)|otateCTM)|S(?:aveGState|caleCTM|et(?:Al(?:lows(?:Antialiasing|FontS(?:moothing|ubpixel(?:Positioning|Quantization)))|pha)|BlendMode|C(?:MYK(?:FillColor|StrokeColor)|haracterSpacing)|F(?:ill(?:Color(?:Space|WithColor)?|Pattern)|latness|ont(?:Size)?)|Gray(?:FillColor|StrokeColor)|InterpolationQuality|Line(?:Cap|Dash|Join|Width)|MiterLimit|PatternPhase|R(?:GB(?:FillColor|StrokeColor)|enderingIntent)|S(?:h(?:adow(?:WithColor)?|ould(?:Antialias|S(?:moothFonts|ubpixel(?:PositionFonts|QuantizeFonts))))|troke(?:Color(?:Space|WithColor)?|Pattern))|Text(?:DrawingMode|Matrix|Position))|howGlyphsAtPositions|troke(?:EllipseInRect|LineSegments|Path|Rect(?:WithWidth)?)|ynchronize)|TranslateCTM))))|D(?:ata(?:Consumer(?:Create(?:With(?:CFData|URL))?|GetTypeID|Re(?:lease|tain))|Provider(?:C(?:opyData|reate(?:Direct|Sequential|With(?:CFData|Data|Filename|URL)))|GetTypeID|Re(?:lease|tain)))|isplay(?:Bounds|C(?:apture(?:WithOptions)?|opy(?:AllDisplayModes|ColorSpace|DisplayMode)|reateImage(?:ForRect)?)|Fade|G(?:ammaTableCapacity|etDrawingContext)|HideCursor|I(?:DToOpenGLDisplayMask|s(?:A(?:ctive|lwaysInMirrorSet|sleep)|Builtin|In(?:HWMirrorSet|MirrorSet)|Main|Online|Stereo))|M(?:irrorsDisplay|o(?:de(?:Get(?:Height|IO(?:DisplayModeID|Flags)|RefreshRate|TypeID|Width)|IsUsableForDesktopGUI|Re(?:lease|tain)|lNumber)|veCursorToPoint))|P(?:ixels(?:High|Wide)|rimaryDisplay)|R(?:e(?:gisterReconfigurationCallback|lease|moveReconfigurationCallback|storeColorSyncSettings)|otation)|S(?:creenSize|e(?:rialNumber|t(?:DisplayMode|StereoOperation))|howCursor)|U(?:nitNumber|sesOpenGLAcceleration)|VendorNumber))|Event(?:Create(?:Copy|Data|FromData|KeyboardEvent|MouseEvent|S(?:crollWheelEvent|ourceFromEvent))?|Get(?:DoubleValueField|Flags|IntegerValueField|Location|T(?:imestamp|ype(?:ID)?)|UnflippedLocation)|Keyboard(?:GetUnicodeString|SetUnicodeString)|Post(?:ToPSN)?|S(?:et(?:DoubleValueField|Flags|IntegerValueField|Location|Source|T(?:imestamp|ype))|ource(?:ButtonState|C(?:ounterForEventType|reate)|FlagsState|Get(?:KeyboardType|LocalEvents(?:FilterDuringSuppressionState|SuppressionInterval)|PixelsPerLine|SourceStateID|TypeID|UserData)|KeyState|Se(?:condsSinceLastEventType|t(?:KeyboardType|LocalEvents(?:FilterDuringSuppressionState|SuppressionInterval)|PixelsPerLine|UserData))))|Tap(?:Create(?:ForPSN)?|Enable|IsEnabled|PostEvent))|F(?:ont(?:C(?:anCreatePostScriptSubset|opy(?:FullName|GlyphNameForGlyph|PostScriptName|Table(?:ForTag|Tags)|Variation(?:Axes|s))|reate(?:CopyWithVariations|PostScript(?:Encoding|Subset)|With(?:DataProvider|FontName)))|Get(?:Ascent|CapHeight|Descent|FontBBox|Glyph(?:Advances|BBoxes|WithGlyphName)|ItalicAngle|Leading|NumberOfGlyphs|StemV|TypeID|UnitsPerEm|XHeight)|Re(?:lease|tain))|unction(?:Create|GetTypeID|Re(?:lease|tain)))|G(?:et(?:ActiveDisplayList|Display(?:TransferBy(?:Formula|Table)|sWith(?:OpenGLDisplayMask|Point|Rect))|EventTapList|LastMouseDelta|OnlineDisplayList)|radient(?:CreateWithColor(?:Components|s)|GetTypeID|Re(?:lease|tain)))|Image(?:Create(?:Copy(?:WithColorSpace)?|With(?:ImageInRect|JPEGDataProvider|Mask(?:ingColors)?|PNGDataProvider))?|Get(?:AlphaInfo|B(?:it(?:mapInfo|sPer(?:Component|Pixel))|ytesPerRow)|ColorSpace|D(?:ataProvider|ecode)|Height|RenderingIntent|ShouldInterpolate|TypeID|Width)|IsMask|MaskCreate|Re(?:lease|tain))|Layer(?:CreateWithContext|Get(?:Context|Size|TypeID)|Re(?:lease|tain))|MainDisplayID|OpenGLDisplayMaskToDisplayID|P(?:DF(?:ArrayGet(?:Array|Boolean|Count|Dictionary|Integer|N(?:ame|u(?:ll|mber))|Object|Str(?:eam|ing))|Conte(?:ntStream(?:CreateWith(?:Page|Stream)|Get(?:Resource|Streams)|Re(?:lease|tain))|xt(?:AddD(?:estinationAtPoint|ocumentMetadata)|BeginPage|C(?:lose|reate(?:WithURL)?)|EndPage|Set(?:DestinationForRect|URLForRect)))|D(?:ictionary(?:ApplyFunction|Get(?:Array|Boolean|Count|Dictionary|Integer|N(?:ame|umber)|Object|Str(?:eam|ing)))|ocument(?:Allows(?:Copying|Printing)|CreateWith(?:Provider|URL)|Get(?:Catalog|I(?:D|nfo)|NumberOfPages|Page|TypeID|Version)|Is(?:Encrypted|Unlocked)|Re(?:lease|tain)|UnlockWithPassword))|O(?:bjectGet(?:Type|Value)|peratorTable(?:Create|Re(?:lease|tain)|SetCallback))|Page(?:Get(?:BoxRect|D(?:ictionary|ocument|rawingTransform)|PageNumber|RotationAngle|TypeID)|Re(?:lease|tain))|S(?:canner(?:Create|GetContentStream|Pop(?:Array|Boolean|Dictionary|Integer|N(?:ame|umber)|Object|Str(?:eam|ing))|Re(?:lease|tain)|Scan)|tr(?:eam(?:CopyData|GetDictionary)|ing(?:Copy(?:Date|TextString)|Get(?:BytePtr|Length)))))|SConverter(?:Abort|C(?:onvert|reate)|GetTypeID|IsConverting)|at(?:h(?:A(?:dd(?:Arc(?:ToPoint)?|CurveToPoint|EllipseInRect|Line(?:ToPoint|s)|Path|QuadCurveToPoint|Re(?:ct(?:s)?|lativeArc))|pply)|C(?:loseSubpath|ontainsPoint|reate(?:Copy(?:By(?:DashingPath|StrokingPath|TransformingPath))?|Mutable(?:Copy(?:ByTransformingPath)?)?|With(?:EllipseInRect|Rect)))|EqualToPath|Get(?:BoundingBox|CurrentPoint|PathBoundingBox|TypeID)|Is(?:Empty|Rect)|MoveToPoint|Re(?:lease|tain))|tern(?:Create|GetTypeID|Re(?:lease|tain)))|oint(?:ApplyAffineTransform|CreateDictionaryRepresentation|EqualToPoint|Make(?:WithDictionaryRepresentation)?))|Re(?:ct(?:ApplyAffineTransform|C(?:ontains(?:Point|Rect)|reateDictionaryRepresentation)|Divide|EqualToRect|Get(?:Height|M(?:ax(?:X|Y)|i(?:d(?:X|Y)|n(?:X|Y)))|Width)|I(?:n(?:set|te(?:gral|rsect(?:ion|sRect)))|s(?:Empty|Infinite|Null))|Make(?:WithDictionaryRepresentation)?|Offset|Standardize|Union)|lease(?:AllDisplays|DisplayFadeReservation)|storePermanentDisplayConfiguration)|S(?:e(?:ssionCopyCurrentDictionary|tDisplayTransferBy(?:ByteTable|Formula|Table))|h(?:ading(?:Create(?:Axial|Radial)|GetTypeID|Re(?:lease|tain))|ieldingWindow(?:ID|Level))|ize(?:ApplyAffineTransform|CreateDictionaryRepresentation|EqualToSize|Make(?:WithDictionaryRepresentation)?))|VectorMake|W(?:arpMouseCursorPosition|indowL(?:evelForKey|istC(?:opyWindowInfo|reate(?:DescriptionFromArray|Image(?:FromArray)?)?))))\\b)" + } + ] + } + }, + "scopeName": "source.c.platform", + "uuid": "3E3CB242-CEBA-4B61-9806-9A97B5783D2A" +} \ No newline at end of file diff --git a/extensions/css/.vscode/launch.json b/extensions/css/.vscode/launch.json index 2f7deadca42..fa74c4170fc 100644 --- a/extensions/css/.vscode/launch.json +++ b/extensions/css/.vscode/launch.json @@ -29,8 +29,8 @@ "name": "Attach Language Server", "type": "node", "request": "attach", - "protocol": "legacy", - "port": 6004, + "protocol": "inspector", + "port": 6044, "sourceMaps": true, "outFiles": ["${workspaceFolder}/server/out/**/*.js"] } diff --git a/extensions/css/server/.vscode/launch.json b/extensions/css/server/.vscode/launch.json index 764c1456f17..68a18d7bb9e 100644 --- a/extensions/css/server/.vscode/launch.json +++ b/extensions/css/server/.vscode/launch.json @@ -6,9 +6,9 @@ "name": "Attach", "type": "node", "request": "attach", - "port": 6004, + "port": 6044, "sourceMaps": true, - "outDir": "${workspaceFolder}/out" + "outFiles": ["${workspaceFolder}/out/**/*.js"] }, { "name": "Unit Tests", @@ -26,7 +26,7 @@ "runtimeArgs": [], "env": {}, "sourceMaps": true, - "outDir": "${workspaceFolder}/out" + "outFiles": ["${workspaceFolder}/out/**/*.js"] } ] } \ No newline at end of file diff --git a/extensions/css/syntaxes/css.tmLanguage.json b/extensions/css/syntaxes/css.tmLanguage.json index 2658a64ff67..4c734ddba93 100644 --- a/extensions/css/syntaxes/css.tmLanguage.json +++ b/extensions/css/syntaxes/css.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/atom/language-css/commit/b781e2152b677d4a38c4501de477948cb6a04f65", + "version": "https://github.com/atom/language-css/commit/2bc1e294e2440ad91197263cd9f95dc4b00bab2f", "scopeName": "source.css", "name": "CSS", "fileTypes": [ @@ -1343,7 +1343,7 @@ "property-keywords": { "patterns": [ { - "match": "(?xi) (?currentNode; if (propertyNode.terminatorToken diff --git a/extensions/emmet/src/test/toggleComment.test.ts b/extensions/emmet/src/test/toggleComment.test.ts index 46adb42a8d5..8bf3a42a1db 100644 --- a/extensions/emmet/src/test/toggleComment.test.ts +++ b/extensions/emmet/src/test/toggleComment.test.ts @@ -9,8 +9,8 @@ import { Selection } from 'vscode'; import { withRandomFileEditor, closeAllEditors } from './testUtils'; import { toggleComment as toggleCommentImpl } from '../toggleComment'; -function toggleComment(...args): Thenable { - const result = toggleCommentImpl(...args); +function toggleComment(): Thenable { + const result = toggleCommentImpl(); assert.ok(result); return result!; } @@ -201,6 +201,52 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => { }); }); }); + + test('toggle comment with multiple cursors selecting parent and child nodes', () => { + const expectedContents = ` +
+
    +
  • + +
  • Bye
  • +
+ + + +
+ `; + return withRandomFileEditor(contents, 'html', (editor, doc) => { + editor.selections = [ + new Selection(3, 17, 3, 17), // cursor inside the inner span element + new Selection(4, 5, 4, 5), // two cursors: one inside opening tag + new Selection(4, 17, 4, 17), // and the second inside the inner span element + new Selection(7, 3, 7, 3), // two cursors: one inside open tag of
    one of of whose children is already commented + new Selection(9, 10, 9, 10), // and the second inside inner li element, whose parent is selected + new Selection(12, 3, 12, 3), // four nested cursors: one inside the style open tag + new Selection(14, 8, 14, 8), // the second inside the css property inside the style tag + new Selection(18, 3, 18, 3), // the third inside the css rule inside the style tag + new Selection(19, 8, 19, 8) // and the fourth inside the css property inside the style tag + ]; + + return toggleComment().then(() => { + assert.equal(doc.getText(), expectedContents); + + return Promise.resolve(); + }); + }); + }); }); suite('Tests for Toggle Comment action from Emmet (CSS)', () => { @@ -470,6 +516,68 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => { } }`; + test('toggle comment with multiple cursors selecting nested nodes (SCSS)', () => { + const expectedContents = ` + .one { + /*height: 42px;*/ + + /*.two { + width: 42px; + }*/ + + .three { + /*padding: 10px;*/ + } + }`; + return withRandomFileEditor(contents, 'css', (editor, doc) => { + editor.selections = [ + new Selection(2, 5, 2, 5), // cursor inside a property + new Selection(4, 4, 4, 4), // two cursors: one inside a nested rule + new Selection(5, 5, 5, 5), // and the second one inside a nested property + new Selection(9, 5, 9, 5) // cursor inside a property inside a nested rule + ]; + + return toggleComment().then(() => { + assert.equal(doc.getText(), expectedContents); + return toggleComment().then(() => { + assert.equal(doc.getText(), contents); + return Promise.resolve(); + }); + }); + }); + }); + test('toggle comment with multiple cursors selecting several nested nodes (SCSS)', () => { + const expectedContents = ` + /*.one { + height: 42px; + + .two { + width: 42px; + } + + .three { + padding: 10px; + } + }*/`; + return withRandomFileEditor(contents, 'css', (editor, doc) => { + editor.selections = [ + new Selection(1, 3, 1, 3), // cursor in the outside rule. And several cursors inside: + new Selection(2, 5, 2, 5), // cursor inside a property + new Selection(4, 4, 4, 4), // two cursors: one inside a nested rule + new Selection(5, 5, 5, 5), // and the second one inside a nested property + new Selection(9, 5, 9, 5) // cursor inside a property inside a nested rule + ]; + + return toggleComment().then(() => { + assert.equal(doc.getText(), expectedContents); + return toggleComment().then(() => { + assert.equal(doc.getText(), contents); + return Promise.resolve(); + }); + }); + }); + }); + test('toggle comment with multiple cursors, but no selection (SCSS)', () => { const expectedContents = ` .one { diff --git a/extensions/emmet/src/toggleComment.ts b/extensions/emmet/src/toggleComment.ts index b18106d98a2..dc756f5b990 100644 --- a/extensions/emmet/src/toggleComment.ts +++ b/extensions/emmet/src/toggleComment.ts @@ -33,12 +33,29 @@ export function toggleComment(): Thenable | undefined { } return editor.edit(editBuilder => { + let allEdits: vscode.TextEdit[][] = []; editor.selections.reverse().forEach(selection => { let edits = toggleCommentInternal(editor.document, selection, rootNode!); - edits.forEach(x => { - editBuilder.replace(x.range, x.newText); - }); + if (edits.length > 0) { + allEdits.push(edits); + } }); + + // Apply edits in order so we can skip nested ones. + allEdits.sort((arr1, arr2) => { + let result = arr1[0].range.start.line - arr2[0].range.start.line; + return result === 0 ? arr1[0].range.start.character - arr2[0].range.start.character : result; + }); + let lastEditPosition = new vscode.Position(0, 0); + for (let i = 0; i < allEdits.length; i++) { + const edits = allEdits[i]; + if (edits[0].range.end.isAfterOrEqual(lastEditPosition)) { + edits.forEach(x => { + editBuilder.replace(x.range, x.newText); + lastEditPosition = x.range.end; + }); + } + } }); } diff --git a/extensions/emmet/yarn.lock b/extensions/emmet/yarn.lock index 07e78ff4742..9162b566dc1 100644 --- a/extensions/emmet/yarn.lock +++ b/extensions/emmet/yarn.lock @@ -2052,9 +2052,9 @@ vinyl@~2.0.1: remove-trailing-separator "^1.0.1" replace-ext "^1.0.0" -vscode-emmet-helper@^1.1.24: - version "1.1.24" - resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.1.24.tgz#032d3aa3a3e30ed87b7056a902300f1e0eb4016d" +vscode-emmet-helper@^1.1.25: + version "1.1.25" + resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.1.25.tgz#2c43df3e8502d420fb91032826fc0cb6efee5611" dependencies: "@emmetio/extract-abbreviation" "^0.1.4" jsonc-parser "^1.0.0" diff --git a/extensions/fsharp/package.json b/extensions/fsharp/package.json index b97779edbf6..b0ca0ae5af2 100644 --- a/extensions/fsharp/package.json +++ b/extensions/fsharp/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js ionide/ionide-fsgrammar grammar/fsharp.json ./syntaxes/fsharp.json" + "update-grammar": "node ../../build/npm/update-grammar.js ionide/ionide-fsgrammar grammar/fsharp.json ./syntaxes/fsharp.tmLanguage.json" }, "contributes": { "languages": [{ @@ -16,7 +16,7 @@ "grammars": [{ "language": "fsharp", "scopeName": "source.fsharp", - "path": "./syntaxes/fsharp.json" + "path": "./syntaxes/fsharp.tmLanguage.json" }], "snippets": [{ "language": "fsharp", diff --git a/extensions/fsharp/syntaxes/fsharp.json b/extensions/fsharp/syntaxes/fsharp.tmLanguage.json similarity index 100% rename from extensions/fsharp/syntaxes/fsharp.json rename to extensions/fsharp/syntaxes/fsharp.tmLanguage.json diff --git a/extensions/git/package.json b/extensions/git/package.json index 202d73c4c00..0d1fe1fd519 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -396,11 +396,11 @@ }, { "command": "git.clean", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "config.git.enabled && gitOpenRepositoryCount != 0 && !gitFreshRepository" }, { "command": "git.cleanAll", - "when": "config.git.enabled && gitOpenRepositoryCount != 0" + "when": "config.git.enabled && gitOpenRepositoryCount != 0 && !gitFreshRepository" }, { "command": "git.commit", @@ -631,7 +631,7 @@ { "command": "git.cleanAll", "group": "4_stage", - "when": "scmProvider == git" + "when": "scmProvider == git && !gitFreshRepository" }, { "command": "git.stashIncludeUntracked", @@ -689,7 +689,7 @@ }, { "command": "git.cleanAll", - "when": "scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository", "group": "1_modification" }, { @@ -699,7 +699,7 @@ }, { "command": "git.cleanAll", - "when": "scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository", "group": "inline" }, { @@ -781,12 +781,12 @@ }, { "command": "git.clean", - "when": "scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository", "group": "1_modification" }, { "command": "git.clean", - "when": "scmProvider == git && scmResourceGroup == workingTree", + "when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository", "group": "inline" }, { @@ -809,7 +809,7 @@ { "command": "git.openFile", "group": "navigation", - "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != extension && resourceScheme != merge-conflict.conflict-diff" + "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" }, { "command": "git.openChange", @@ -819,17 +819,17 @@ { "command": "git.stageSelectedRanges", "group": "2_git@1", - "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" + "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" }, { "command": "git.unstageSelectedRanges", "group": "2_git@2", - "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" + "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" }, { "command": "git.revertSelectedRanges", "group": "2_git@3", - "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" + "when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" } ], "scm/change/title": [ diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index b7c0719c132..b3bed912bff 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -66,7 +66,7 @@ "config.decorations.enabled": "Controls if Git contributes colors and badges to the explorer and the open editors view.", "config.promptToSaveFilesBeforeCommit": "Controls whether Git should check for unsaved files before committing.", "config.showInlineOpenFileAction": "Controls whether to show an inline Open File action in the Git changes view.", - "config.inputValidation": "Controls when to show input validation the input counter.", + "config.inputValidation": "Controls when to show commit message input validation.", "config.detectSubmodules": "Controls whether to automatically detect git submodules.", "colors.modified": "Color for modified resources.", "colors.deleted": "Color for deleted resources.", diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index fc6fc35262f..7074ab22b90 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -267,6 +267,7 @@ export class GitError { this.message = data.error.message; } else { this.error = void 0; + this.message = ''; } this.message = this.message || data.message || 'Git error'; @@ -679,7 +680,7 @@ export class Repository { return stdout; } - async lstree(treeish: string, path: string): Promise<{ mode: number, object: string, size: number }> { + async lstree(treeish: string, path: string): Promise<{ mode: string, object: string, size: number }> { if (!treeish) { // index const { stdout } = await this.run(['ls-files', '--stage', '--', path]); @@ -693,7 +694,7 @@ export class Repository { const catFile = await this.run(['cat-file', '-s', object]); const size = parseInt(catFile.stdout); - return { mode: parseInt(mode), object, size }; + return { mode, object, size }; } const { stdout } = await this.run(['ls-tree', '-l', treeish, '--', path]); @@ -705,7 +706,7 @@ export class Repository { } const [, mode, , object, size] = match; - return { mode: parseInt(mode), object, size: parseInt(size) }; + return { mode, object, size: parseInt(size) }; } async detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> { @@ -787,7 +788,16 @@ export class Repository { }); } - await this.run(['update-index', '--cacheinfo', '100644', hash, path]); + let mode: string; + + try { + const details = await this.lstree('HEAD', path); + mode = details.mode; + } catch (err) { + mode = '100644'; + } + + await this.run(['update-index', '--cacheinfo', mode, hash, path]); } async checkout(treeish: string, paths: string[]): Promise { diff --git a/extensions/git/src/main.ts b/extensions/git/src/main.ts index 3fdb055e264..a003fe9bcfb 100644 --- a/extensions/git/src/main.ts +++ b/extensions/git/src/main.ts @@ -18,11 +18,9 @@ import { toDisposable, filterEvent, mapEvent, eventToPromise } from './util'; import TelemetryReporter from 'vscode-extension-telemetry'; import { API, createApi } from './api'; -async function init(context: ExtensionContext, outputChannel: OutputChannel, disposables: Disposable[]): Promise { - const { name, version, aiKey } = require(context.asAbsolutePath('./package.json')) as { name: string, version: string, aiKey: string }; - const telemetryReporter: TelemetryReporter = new TelemetryReporter(name, version, aiKey); - disposables.push(telemetryReporter); +let telemetryReporter: TelemetryReporter; +async function init(context: ExtensionContext, outputChannel: OutputChannel, disposables: Disposable[]): Promise { const pathHint = workspace.getConfiguration('git').get('path'); const info = await findGit(pathHint, path => outputChannel.appendLine(localize('looking', "Looking for git in: {0}", path))); const askpass = new Askpass(); @@ -99,6 +97,9 @@ export function activate(context: ExtensionContext): API { const disposables: Disposable[] = []; context.subscriptions.push(new Disposable(() => Disposable.from(...disposables).dispose())); + const { name, version, aiKey } = require(context.asAbsolutePath('./package.json')) as { name: string, version: string, aiKey: string }; + telemetryReporter = new TelemetryReporter(name, version, aiKey); + let activatePromise: Promise; if (enabled) { @@ -146,3 +147,7 @@ async function checkGitVersion(info: IGit): Promise { await config.update('ignoreLegacyWarning', true, true); } } + +export function deactivate(): Promise { + return telemetryReporter ? telemetryReporter.dispose() : Promise.resolve(null); +} diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 893b2ce2939..3824f010265 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -5,7 +5,7 @@ 'use strict'; -import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, SourceControlInputBoxValidation, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData, Memento, SourceControlInputBoxValidationType } from 'vscode'; +import { commands, Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, SourceControlInputBoxValidation, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData, Memento, SourceControlInputBoxValidationType } from 'vscode'; import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, GitError, Submodule, DiffOptions } from './git'; import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant, IDisposable, onceEvent, EmptyDisposable, debounceEvent } from './util'; import { memoize, throttle, debounce } from './decorators'; @@ -798,7 +798,7 @@ export class Repository implements Disposable { }); } - lstree(ref: string, filePath: string): Promise<{ mode: number, object: string, size: number }> { + lstree(ref: string, filePath: string): Promise<{ mode: string, object: string, size: number }> { return this.run(Operation.LSTree, () => this.repository.lstree(ref, filePath)); } @@ -1041,13 +1041,9 @@ export class Repository implements Disposable { this._sourceControl.count = count; - // set context key - let stateContextKey = ''; - - switch (this.state) { - case RepositoryState.Idle: stateContextKey = 'idle'; break; - case RepositoryState.Disposed: stateContextKey = 'norepo'; break; - } + // Disable `Discard All Changes` for "fresh" repositories + // https://github.com/Microsoft/vscode/issues/43066 + commands.executeCommand('setContext', 'gitFreshRepository', !this._HEAD || !this._HEAD.commit); this._onDidChangeStatus.fire(); } diff --git a/extensions/go/package.json b/extensions/go/package.json index 3ad45f01671..920e689e6d9 100644 --- a/extensions/go/package.json +++ b/extensions/go/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js atom/language-go grammars/go.cson ./syntaxes/go.json" + "update-grammar": "node ../../build/npm/update-grammar.js atom/language-go grammars/go.cson ./syntaxes/go.tmLanguage.json" }, "contributes": { "languages": [{ @@ -16,7 +16,7 @@ "grammars": [{ "language": "go", "scopeName": "source.go", - "path": "./syntaxes/go.json" + "path": "./syntaxes/go.tmLanguage.json" }], "configurationDefaults": { "[go]": { diff --git a/extensions/go/syntaxes/go.json b/extensions/go/syntaxes/go.tmLanguage.json similarity index 100% rename from extensions/go/syntaxes/go.json rename to extensions/go/syntaxes/go.tmLanguage.json diff --git a/extensions/hlsl/package.json b/extensions/hlsl/package.json index ec3d71bab11..280c4563828 100644 --- a/extensions/hlsl/package.json +++ b/extensions/hlsl/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js tgjones/shaders-tmLanguage grammars/hlsl.json ./syntaxes/hlsl.json" + "update-grammar": "node ../../build/npm/update-grammar.js tgjones/shaders-tmLanguage grammars/hlsl.json ./syntaxes/hlsl.tmLanguage.json" }, "contributes": { "languages": [{ @@ -15,7 +15,7 @@ }], "grammars": [{ "language": "hlsl", - "path": "./syntaxes/hlsl.json", + "path": "./syntaxes/hlsl.tmLanguage.json", "scopeName":"source.hlsl" }] } diff --git a/extensions/hlsl/syntaxes/hlsl.json b/extensions/hlsl/syntaxes/hlsl.tmLanguage.json similarity index 100% rename from extensions/hlsl/syntaxes/hlsl.json rename to extensions/hlsl/syntaxes/hlsl.tmLanguage.json diff --git a/extensions/html/.vscode/launch.json b/extensions/html/.vscode/launch.json index 753220eccdf..cc7a4d92853 100644 --- a/extensions/html/.vscode/launch.json +++ b/extensions/html/.vscode/launch.json @@ -29,8 +29,8 @@ "name": "Attach Language Server", "type": "node", "request": "attach", - "port": 6004, - "protocol": "legacy", + "port": 6045, + "protocol": "inspector", "sourceMaps": true, "outFiles": ["${workspaceFolder}/server/out/**/*.js"] } diff --git a/extensions/html/client/src/htmlMain.ts b/extensions/html/client/src/htmlMain.ts index a3bc91466ea..6bcce08f9d6 100644 --- a/extensions/html/client/src/htmlMain.ts +++ b/extensions/html/client/src/htmlMain.ts @@ -26,14 +26,13 @@ interface IPackageInfo { aiKey: string; } +let telemetryReporter: TelemetryReporter | null; + export function activate(context: ExtensionContext) { let toDispose = context.subscriptions; let packageInfo = getPackageInfo(context); - let telemetryReporter: TelemetryReporter | null = packageInfo && new TelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey); - if (telemetryReporter) { - toDispose.push(telemetryReporter); - } + telemetryReporter = packageInfo && new TelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey); // The server is implemented in node let serverModule = context.asAbsolutePath(path.join('server', 'out', 'htmlServerMain.js')); @@ -200,3 +199,7 @@ function getPackageInfo(context: ExtensionContext): IPackageInfo | null { } return null; } + +export function deactivate(): Promise { + return telemetryReporter ? telemetryReporter.dispose() : Promise.resolve(null); +} \ No newline at end of file diff --git a/extensions/html/package.json b/extensions/html/package.json index a8bbb91b761..21fc673bf67 100644 --- a/extensions/html/package.json +++ b/extensions/html/package.json @@ -16,7 +16,7 @@ "scripts": { "compile": "gulp compile-extension:html-client && gulp compile-extension:html-server", "postinstall": "cd server && yarn install", - "update-grammar": "node ../../build/npm/update-grammar.js textmate/html.tmbundle Syntaxes/HTML.plist ./syntaxes/html.json", + "update-grammar": "node ../../build/npm/update-grammar.js textmate/html.tmbundle Syntaxes/HTML.plist ./syntaxes/html.tmLanguage.json", "install-client-next": "yarn add vscode-languageclient@next" }, "contributes": { @@ -57,7 +57,7 @@ { "language": "html", "scopeName": "text.html.basic", - "path": "./syntaxes/html.json", + "path": "./syntaxes/html.tmLanguage.json", "embeddedLanguages": { "text.html": "html", "source.css": "css", diff --git a/extensions/html/server/.vscode/launch.json b/extensions/html/server/.vscode/launch.json index 764c1456f17..8ca29fac876 100644 --- a/extensions/html/server/.vscode/launch.json +++ b/extensions/html/server/.vscode/launch.json @@ -6,9 +6,9 @@ "name": "Attach", "type": "node", "request": "attach", - "port": 6004, + "port": 6045, "sourceMaps": true, - "outDir": "${workspaceFolder}/out" + "outFiles": ["${workspaceFolder}/out/**/*.js"] }, { "name": "Unit Tests", @@ -26,7 +26,7 @@ "runtimeArgs": [], "env": {}, "sourceMaps": true, - "outDir": "${workspaceFolder}/out" + "outFiles": ["${workspaceFolder}/out/**/*.js"] } ] } \ No newline at end of file diff --git a/extensions/html/syntaxes/html.json b/extensions/html/syntaxes/html.tmLanguage.json similarity index 100% rename from extensions/html/syntaxes/html.json rename to extensions/html/syntaxes/html.tmLanguage.json diff --git a/extensions/java/syntaxes/java.tmLanguage.json b/extensions/java/syntaxes/java.tmLanguage.json index 07553c758aa..5be7bc9f4ee 100644 --- a/extensions/java/syntaxes/java.tmLanguage.json +++ b/extensions/java/syntaxes/java.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/atom/language-java/commit/cf96ae95ea2e2f4cfd5e6e685e6d7db039859cc6", + "version": "https://github.com/atom/language-java/commit/5c2863da1425d61914d2e04ef31b86f8c5883c5f", "scopeName": "source.java", "name": "Java", "fileTypes": [ @@ -36,9 +36,13 @@ "name": "invalid.illegal.character_not_allowed_here.java" }, { - "match": "(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js entity.name.function.js" @@ -526,7 +526,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js" @@ -753,7 +753,7 @@ }, { "name": "meta.definition.property.js entity.name.function.js", - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))" + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))" }, { "name": "meta.definition.property.js variable.object.property.js", @@ -1016,7 +1016,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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -1725,7 +1725,7 @@ "include": "#comment" }, { - "match": "(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.js" @@ -2347,18 +2350,18 @@ "patterns": [ { "name": "constant.numeric.hex.js", - "match": "\\b(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.js" @@ -2882,6 +2885,9 @@ { "include": "#type-object" }, + { + "include": "#type-conditional" + }, { "include": "#type-operators" }, @@ -2988,6 +2994,17 @@ } ] }, + "type-conditional": { + "match": "(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.js.jsx entity.name.function.js.jsx" @@ -526,7 +526,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.js.jsx" @@ -753,7 +753,7 @@ }, { "name": "meta.definition.property.js.jsx entity.name.function.js.jsx", - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))" + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))" }, { "name": "meta.definition.property.js.jsx variable.object.property.js.jsx", @@ -1016,7 +1016,7 @@ }, { "name": "meta.arrow.js.jsx", - "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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js.jsx" @@ -1725,7 +1725,7 @@ "include": "#comment" }, { - "match": "(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.js.jsx" @@ -2347,18 +2350,18 @@ "patterns": [ { "name": "constant.numeric.hex.js.jsx", - "match": "\\b(?)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.js.jsx" @@ -2882,6 +2885,9 @@ { "include": "#type-object" }, + { + "include": "#type-conditional" + }, { "include": "#type-operators" }, @@ -2988,6 +2994,17 @@ } ] }, + "type-conditional": { + "match": "(? handleContentChange(d.uri))); client.sendNotification(SchemaAssociationNotification.type, getSchemaAssociation(context)); - - // register color provider - toDispose.push(languages.registerColorProvider(documentSelector, { - provideDocumentColors(document: TextDocument): Thenable { - let params: DocumentColorParams = { - textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document) - }; - return client.sendRequest(DocumentColorRequest.type, params).then(symbols => { - return symbols.map(symbol => { - let range = client.protocol2CodeConverter.asRange(symbol.range); - let color = new Color(symbol.color.red, symbol.color.green, symbol.color.blue, symbol.color.alpha); - return new ColorInformation(range, color); - }); - }); - }, - provideColorPresentations(color: Color, context): Thenable { - let params: ColorPresentationParams = { - textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(context.document), - color: color, - range: client.code2ProtocolConverter.asRange(context.range) - }; - return client.sendRequest(ColorPresentationRequest.type, params).then(presentations => { - return presentations.map(p => { - let presentation = new ColorPresentation(p.label); - presentation.textEdit = p.textEdit && client.protocol2CodeConverter.asTextEdit(p.textEdit); - presentation.additionalTextEdits = p.additionalTextEdits && client.protocol2CodeConverter.asTextEdits(p.additionalTextEdits); - return presentation; - }); - }); - } - })); }); let languageConfiguration: LanguageConfiguration = { @@ -169,6 +137,10 @@ export function activate(context: ExtensionContext) { languages.setLanguageConfiguration('jsonc', languageConfiguration); } +export function deactivate(): Promise { + return telemetryReporter ? telemetryReporter.dispose() : Promise.resolve(null); +} + function getSchemaAssociation(context: ExtensionContext): ISchemaAssociations { let associations: ISchemaAssociations = {}; extensions.all.forEach(extension => { @@ -225,14 +197,14 @@ function getSettings(): Settings { let schemaSetting = schemaSettingsById[url]; if (!schemaSetting) { schemaSetting = schemaSettingsById[url] = { url, fileMatch: [] }; - settings.json.schemas.push(schemaSetting); + settings.json!.schemas!.push(schemaSetting); } let fileMatches = setting.fileMatch; if (Array.isArray(fileMatches)) { if (fileMatchPrefix) { fileMatches = fileMatches.map(m => fileMatchPrefix + m); } - schemaSetting.fileMatch.push(...fileMatches); + schemaSetting.fileMatch!.push(...fileMatches); } if (setting.schema) { schemaSetting.schema = setting.schema; @@ -250,7 +222,7 @@ function getSettings(): Settings { for (let folder of folders) { let folderUri = folder.uri; let schemaConfigInfo = workspace.getConfiguration('json', folderUri).inspect('schemas'); - let folderSchemas = schemaConfigInfo.workspaceFolderValue; + let folderSchemas = schemaConfigInfo!.workspaceFolderValue; if (Array.isArray(folderSchemas)) { let folderPath = folderUri.toString(); if (folderPath[folderPath.length - 1] !== '/') { @@ -275,7 +247,7 @@ function getSchemaId(schema: JSONSchemaSettings, rootPath?: string) { return url; } -function getPackageInfo(context: ExtensionContext): IPackageInfo { +function getPackageInfo(context: ExtensionContext): IPackageInfo | undefined { let extensionPackage = require(context.asAbsolutePath('./package.json')); if (extensionPackage) { return { @@ -284,5 +256,5 @@ function getPackageInfo(context: ExtensionContext): IPackageInfo { aiKey: extensionPackage.aiKey }; } - return null; + return void 0; } diff --git a/extensions/json/client/tsconfig.json b/extensions/json/client/tsconfig.json index d2f8f6376fe..494973432ef 100644 --- a/extensions/json/client/tsconfig.json +++ b/extensions/json/client/tsconfig.json @@ -1,11 +1,10 @@ { "compilerOptions": { - "target": "es5", + "target": "es6", "module": "commonjs", "outDir": "./out", "noUnusedLocals": true, - "lib": [ - "es5", "es2015.promise" - ] + "lib": [ "es2016" ], + "strict": true } } \ No newline at end of file diff --git a/extensions/json/package.json b/extensions/json/package.json index 5b9b79b5c11..f551c4f5de8 100644 --- a/extensions/json/package.json +++ b/extensions/json/package.json @@ -163,7 +163,7 @@ }, "dependencies": { "vscode-extension-telemetry": "0.0.11", - "vscode-languageclient": "^3.5.0", + "vscode-languageclient": "^4.0.0-next.7", "vscode-nls": "^3.2.1" }, "devDependencies": { diff --git a/extensions/json/server/package.json b/extensions/json/server/package.json index 6a27caaa942..34d3b370410 100644 --- a/extensions/json/server/package.json +++ b/extensions/json/server/package.json @@ -8,10 +8,10 @@ "node": "*" }, "dependencies": { - "jsonc-parser": "^1.0.0", + "jsonc-parser": "^1.0.1", "request-light": "^0.2.2", - "vscode-json-languageservice": "^3.0.4", - "vscode-languageserver": "^3.5.0", + "vscode-json-languageservice": "^3.0.7", + "vscode-languageserver": "^4.0.0-next.3", "vscode-nls": "^3.2.1", "vscode-uri": "^1.0.1" }, @@ -22,8 +22,8 @@ "compile": "gulp compile-extension:json-server", "watch": "gulp watch-extension:json-server", "install-service-next": "yarn add vscode-json-languageservice@next", - "install-service-local": "npm install ../../../../vscode-json-languageservice -f", + "install-service-local": "yarn link vscode-json-languageservice", "install-server-next": "yarn add vscode-languageserver@next", - "install-server-local": "npm install ../../../../vscode-languageserver-node/server -f" + "install-server-local": "yarn link vscode-languageserver-server" } } diff --git a/extensions/json/server/src/jsonServerMain.ts b/extensions/json/server/src/jsonServerMain.ts index 3137b954d36..1adbcfbf546 100644 --- a/extensions/json/server/src/jsonServerMain.ts +++ b/extensions/json/server/src/jsonServerMain.ts @@ -17,8 +17,8 @@ import fs = require('fs'); import URI from 'vscode-uri'; import * as URL from 'url'; import Strings = require('./utils/strings'); -import { formatError, runSafe } from './utils/errors'; -import { JSONDocument, JSONSchema, LanguageSettings, getLanguageService, DocumentLanguageSettings } from 'vscode-json-languageservice'; +import { formatError, runSafe, runSafeAsync } from './utils/errors'; +import { JSONDocument, JSONSchema, getLanguageService, DocumentLanguageSettings, SchemaConfiguration } from 'vscode-json-languageservice'; import { getLanguageModelCache } from './languageModelCache'; interface ISchemaAssociations { @@ -40,7 +40,7 @@ namespace SchemaContentChangeNotification { // Create a connection for the server let connection: IConnection = createConnection(); -process.on('unhandledRejection', e => { +process.on('unhandledRejection', (e: any) => { connection.console.error(formatError(`Unhandled exception`, e)); }); @@ -62,7 +62,7 @@ let clientDynamicRegisterSupport = false; connection.onInitialize((params: InitializeParams): InitializeResult => { function hasClientCapability(...keys: string[]) { - let c = params.capabilities; + let c = params.capabilities as any; for (let i = 0; c && i < keys.length; i++) { c = c[keys[i]]; } @@ -74,7 +74,7 @@ connection.onInitialize((params: InitializeParams): InitializeResult => { let capabilities: ServerCapabilities & CPServerCapabilities = { // Tell the client that the server works in FULL text document sync mode textDocumentSync: documents.syncKind, - completionProvider: clientSnippetSupport ? { resolveProvider: true, triggerCharacters: ['"', ':'] } : null, + completionProvider: clientSnippetSupport ? { resolveProvider: true, triggerCharacters: ['"', ':'] } : void 0, hoverProvider: true, documentSymbolProvider: true, documentRangeFormattingProvider: false, @@ -146,9 +146,9 @@ interface JSONSchemaSettings { schema?: JSONSchema; } -let jsonConfigurationSettings: JSONSchemaSettings[] = void 0; -let schemaAssociations: ISchemaAssociations = void 0; -let formatterRegistration: Thenable = null; +let jsonConfigurationSettings: JSONSchemaSettings[] | undefined = void 0; +let schemaAssociations: ISchemaAssociations | undefined = void 0; +let formatterRegistration: Thenable | null = null; // The settings have changed. Is send on server activation as well. connection.onDidChangeConfiguration((change) => { @@ -184,10 +184,10 @@ connection.onNotification(SchemaContentChangeNotification.type, uri => { }); function updateConfiguration() { - let languageSettings: LanguageSettings = { + let languageSettings = { validate: true, allowComments: true, - schemas: [] + schemas: new Array() }; if (schemaAssociations) { for (var pattern in schemaAssociations) { @@ -292,7 +292,7 @@ function getJSONDocument(document: TextDocument): JSONDocument { } connection.onCompletion(textDocumentPosition => { - return runSafe(() => { + return runSafeAsync(() => { let document = documents.get(textDocumentPosition.textDocument.uri); let jsonDocument = getJSONDocument(document); return languageService.doComplete(document, textDocumentPosition.position, jsonDocument); @@ -300,13 +300,13 @@ connection.onCompletion(textDocumentPosition => { }); connection.onCompletionResolve(completionItem => { - return runSafe(() => { + return runSafeAsync(() => { return languageService.doResolve(completionItem); - }, null, `Error while resolving completion proposal`); + }, completionItem, `Error while resolving completion proposal`); }); connection.onHover(textDocumentPositionParams => { - return runSafe(() => { + return runSafeAsync(() => { let document = documents.get(textDocumentPositionParams.textDocument.uri); let jsonDocument = getJSONDocument(document); return languageService.doHover(document, textDocumentPositionParams.position, jsonDocument); @@ -329,13 +329,13 @@ connection.onDocumentRangeFormatting(formatParams => { }); connection.onRequest(DocumentColorRequest.type, params => { - return runSafe(() => { + return runSafeAsync(() => { let document = documents.get(params.textDocument.uri); if (document) { let jsonDocument = getJSONDocument(document); return languageService.findDocumentColors(document, jsonDocument); } - return []; + return Promise.resolve([]); }, [], `Error while computing document colors for ${params.textDocument.uri}`); }); diff --git a/extensions/json/server/src/languageModelCache.ts b/extensions/json/server/src/languageModelCache.ts index b12f77b52a6..7496244c3bb 100644 --- a/extensions/json/server/src/languageModelCache.ts +++ b/extensions/json/server/src/languageModelCache.ts @@ -16,7 +16,7 @@ export function getLanguageModelCache(maxEntries: number, cleanupIntervalTime let languageModels: { [uri: string]: { version: number, languageId: string, cTime: number, languageModel: T } } = {}; let nModels = 0; - let cleanupInterval = void 0; + let cleanupInterval: NodeJS.Timer | undefined = void 0; if (cleanupIntervalTimeInSec > 0) { cleanupInterval = setInterval(() => { let cutoffTime = Date.now() - cleanupIntervalTimeInSec * 1000; diff --git a/extensions/json/server/src/utils/errors.ts b/extensions/json/server/src/utils/errors.ts index d5a0c8e7d05..27ece60c051 100644 --- a/extensions/json/server/src/utils/errors.ts +++ b/extensions/json/server/src/utils/errors.ts @@ -16,16 +16,16 @@ export function formatError(message: string, err: any): string { return message; } -export function runSafe(func: () => Thenable | T, errorVal: T, errorMessage: string): Thenable | T { +export function runSafeAsync(func: () => Thenable, errorVal: T, errorMessage: string): Thenable { + let t = func(); + return t.then(void 0, e => { + console.error(formatError(errorMessage, e)); + return errorVal; + }); +} +export function runSafe(func: () => T, errorVal: T, errorMessage: string): T { try { - let t = func(); - if (t instanceof Promise) { - return t.then(void 0, e => { - console.error(formatError(errorMessage, e)); - return errorVal; - }); - } - return t; + return func(); } catch (e) { console.error(formatError(errorMessage, e)); return errorVal; diff --git a/extensions/json/server/tsconfig.json b/extensions/json/server/tsconfig.json index e085b24514b..5f15678fc54 100644 --- a/extensions/json/server/tsconfig.json +++ b/extensions/json/server/tsconfig.json @@ -8,7 +8,8 @@ "noUnusedLocals": true, "lib": [ "es5", "es2015.promise" - ] + ], + "strict": true }, "include": [ "src/**/*" diff --git a/extensions/json/server/yarn.lock b/extensions/json/server/yarn.lock index fde3e6efbe8..169311dfdf0 100644 --- a/extensions/json/server/yarn.lock +++ b/extensions/json/server/yarn.lock @@ -48,9 +48,9 @@ https-proxy-agent@2.1.1: agent-base "^4.1.0" debug "^3.1.0" -jsonc-parser@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-1.0.0.tgz#ddcc864ae708e60a7a6dd36daea00172fa8d9272" +jsonc-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-1.0.1.tgz#7f8f296414e6e7c4a33b9e4914fc8c47e4421675" ms@2.0.0: version "2.0.0" @@ -64,35 +64,35 @@ request-light@^0.2.2: https-proxy-agent "2.1.1" vscode-nls "^2.0.2" -vscode-json-languageservice@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.0.4.tgz#293970ef3179d7793ffd25887acf158d93ff8733" +vscode-json-languageservice@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.0.7.tgz#dc00117d51d4a7ac3bde9204afa701f962f00736" dependencies: - jsonc-parser "^1.0.0" - vscode-languageserver-types "^3.5.0" + jsonc-parser "^1.0.1" + vscode-languageserver-types "^3.6.0-next.1" vscode-nls "^2.0.2" vscode-uri "^1.0.1" -vscode-jsonrpc@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.5.0.tgz#87239d9e166b2d7352245b8a813597804c1d63aa" +vscode-jsonrpc@^3.6.0-next.1: + version "3.6.0-next.1" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.6.0-next.1.tgz#3cb463dffe5842d6aec16718ca9252708cd6aabe" -vscode-languageserver-protocol@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.5.0.tgz#067c5cbe27709795398d119692c97ebba1452209" +vscode-languageserver-protocol@^3.6.0-next.3: + version "3.6.0-next.4" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.6.0-next.4.tgz#5b9940e4d6afafd5b63f9731dbd3a9bcc65b3719" dependencies: - vscode-jsonrpc "^3.5.0" - vscode-languageserver-types "^3.5.0" + vscode-jsonrpc "^3.6.0-next.1" + vscode-languageserver-types "^3.6.0-next.1" -vscode-languageserver-types@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz#e48d79962f0b8e02de955e3f524908e2b19c0374" +vscode-languageserver-types@^3.6.0-next.1: + version "3.6.0-next.1" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.6.0-next.1.tgz#98e488d3f87b666b4ee1a3d89f0023e246d358f3" -vscode-languageserver@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-3.5.0.tgz#d28099bc6ddda8c1dd16b707e454e1b1ddae0dba" +vscode-languageserver@^4.0.0-next.3: + version "4.0.0-next.3" + resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-4.0.0-next.3.tgz#89a9ce5078e3a86a78e3551c3766194ce4295611" dependencies: - vscode-languageserver-protocol "^3.5.0" + vscode-languageserver-protocol "^3.6.0-next.3" vscode-uri "^1.0.1" vscode-nls@^2.0.2: diff --git a/extensions/json/yarn.lock b/extensions/json/yarn.lock index 47c5c2e51b7..8c75b70d8f0 100644 --- a/extensions/json/yarn.lock +++ b/extensions/json/yarn.lock @@ -34,26 +34,26 @@ vscode-extension-telemetry@0.0.11: dependencies: applicationinsights "1.0.1" -vscode-jsonrpc@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.5.0.tgz#87239d9e166b2d7352245b8a813597804c1d63aa" +vscode-jsonrpc@^3.6.0-next.1: + version "3.6.0-next.1" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.6.0-next.1.tgz#3cb463dffe5842d6aec16718ca9252708cd6aabe" -vscode-languageclient@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-3.5.0.tgz#36d02cc186a8365a4467719a290fb200a9ae490a" +vscode-languageclient@^4.0.0-next.7: + version "4.0.0-next.7" + resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-4.0.0-next.7.tgz#d4d22937a46ad6c0884a678158c4d4a2269a747e" dependencies: - vscode-languageserver-protocol "^3.5.0" + vscode-languageserver-protocol "^3.6.0-next.4" -vscode-languageserver-protocol@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.5.0.tgz#067c5cbe27709795398d119692c97ebba1452209" +vscode-languageserver-protocol@^3.6.0-next.4: + version "3.6.0-next.4" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.6.0-next.4.tgz#5b9940e4d6afafd5b63f9731dbd3a9bcc65b3719" dependencies: - vscode-jsonrpc "^3.5.0" - vscode-languageserver-types "^3.5.0" + vscode-jsonrpc "^3.6.0-next.1" + vscode-languageserver-types "^3.6.0-next.1" -vscode-languageserver-types@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz#e48d79962f0b8e02de955e3f524908e2b19c0374" +vscode-languageserver-types@^3.6.0-next.1: + version "3.6.0-next.1" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.6.0-next.1.tgz#98e488d3f87b666b4ee1a3d89f0023e246d358f3" vscode-nls@^3.2.1: version "3.2.1" diff --git a/extensions/log/syntaxes/log.tmLanguage.json b/extensions/log/syntaxes/log.tmLanguage.json index ec06fad00fd..deb8ac61113 100644 --- a/extensions/log/syntaxes/log.tmLanguage.json +++ b/extensions/log/syntaxes/log.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/emilast/vscode-logfile-highlighter/commit/3f3ea0a69165bc95f62bb487fda73e925ae229a6", + "version": "https://github.com/emilast/vscode-logfile-highlighter/commit/8196aa2cc8dd9b1eda431203857e5317866facec", "scopeName": "text.log", "fileTypes": [ "log" @@ -52,9 +52,13 @@ "name": "comment log.date" }, { - "match": "\\d{2}:\\d{2}(:\\d{2}([.,]\\d{3,6})?)?(Z| ?[+-]\\d{2}:\\d{2})?\\b", + "match": "\\d{2}:\\d{2}(:\\d{2}([.,]\\d{3,})?)?(Z| ?[+-]\\d{2}:\\d{2})?\\b", "name": "comment log.date" }, + { + "match": "\\b([0-9a-fA-F]{40}|[0-9a-fA-F]{10}|[0-9a-fA-F]{7})\\b", + "name": "constant.language" + }, { "match": "[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}", "name": "constant.language log.constant" @@ -73,7 +77,7 @@ }, { "match": "\\b([a-zA-Z.]*Exception)\\b", - "name": "string.regexp, emphasis log.type" + "name": "string.regexp, emphasis log.exceptiontype" }, { "begin": "^[\\t ]*at", @@ -84,6 +88,10 @@ "match": "\\b(http|https|ftp|file)://\\S+\\b/?", "name": "constant.language log.constant" }, + { + "match": "(([A-Za-z]\\:(\\\\|/))|(\\.(\\\\|/))|(\\.\\.(\\\\|/)){1,}|(\\\\\\\\|//)[\\w -]+(\\\\|/))([\\w -]+(\\\\|/))*", + "name": "constant.language log.constant" + }, { "match": "\\b([\\w]+\\.)+(\\w)+\\b", "name": "constant.language log.constant" diff --git a/extensions/lua/package.json b/extensions/lua/package.json index d2388e2352d..067fde1aeee 100644 --- a/extensions/lua/package.json +++ b/extensions/lua/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js textmate/lua.tmbundle Syntaxes/Lua.plist ./syntaxes/lua.json" + "update-grammar": "node ../../build/npm/update-grammar.js textmate/lua.tmbundle Syntaxes/Lua.plist ./syntaxes/lua.tmLanguage.json" }, "contributes": { "languages": [{ @@ -16,7 +16,7 @@ "grammars": [{ "language": "lua", "scopeName": "source.lua", - "path": "./syntaxes/lua.json" + "path": "./syntaxes/lua.tmLanguage.json" }] } } \ No newline at end of file diff --git a/extensions/lua/syntaxes/lua.json b/extensions/lua/syntaxes/lua.tmLanguage.json similarity index 100% rename from extensions/lua/syntaxes/lua.json rename to extensions/lua/syntaxes/lua.tmLanguage.json diff --git a/extensions/make/package.json b/extensions/make/package.json index 1447119db85..59ed17b7955 100644 --- a/extensions/make/package.json +++ b/extensions/make/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js fadeevab/make.tmbundle Syntaxes/Makefile.plist ./syntaxes/Makefile.json" + "update-grammar": "node ../../build/npm/update-grammar.js fadeevab/make.tmbundle Syntaxes/Makefile.plist ./syntaxes/make.tmLanguage.json" }, "contributes": { @@ -19,7 +19,7 @@ "grammars": [{ "language": "makefile", "scopeName": "source.makefile", - "path": "./syntaxes/Makefile.json" + "path": "./syntaxes/make.tmLanguage.json" }], "configurationDefaults": { "[makefile]": { diff --git a/extensions/make/syntaxes/Makefile.json b/extensions/make/syntaxes/make.tmLanguage.json similarity index 100% rename from extensions/make/syntaxes/Makefile.json rename to extensions/make/syntaxes/make.tmLanguage.json diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index ec99b44b91d..3d21ee28667 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -6,7 +6,7 @@ "publisher": "Microsoft", "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", "engines": { - "vscode": "^1.0.0" + "vscode": "^1.20.0" }, "main": "./out/extension", "categories": [ @@ -41,7 +41,7 @@ { "language": "markdown", "scopeName": "text.html.markdown", - "path": "./syntaxes/markdown.tmLanguage", + "path": "./syntaxes/markdown.tmLanguage.json", "embeddedLanguages": { "meta.embedded.block.html": "html", "source.js": "javascript", @@ -92,10 +92,7 @@ "commands": [ { "command": "markdown.showPreview", - "title": { - "original": "Open Preview", - "value": "%markdown.preview.title%" - }, + "title": "%markdown.preview.title%", "category": "Markdown", "icon": { "light": "./media/Preview.svg", @@ -104,10 +101,7 @@ }, { "command": "markdown.showPreviewToSide", - "title": { - "original": "Open Preview to the Side", - "value": "%markdown.previewSide.title%" - }, + "title": "%markdown.previewSide.title%", "category": "Markdown", "icon": { "light": "./media/PreviewOnRightPane_16x.svg", @@ -116,10 +110,7 @@ }, { "command": "markdown.showSource", - "title": { - "original": "Show Source", - "value": "%markdown.showSource.title%" - }, + "title": "%markdown.showSource.title%", "category": "Markdown", "icon": { "light": "./media/ViewSource.svg", @@ -128,18 +119,12 @@ }, { "command": "markdown.refreshPreview", - "title": { - "original": "Refresh Preview", - "value": "%markdown.refreshPreview.title%" - }, + "title": "%markdown.refreshPreview.title%", "category": "Markdown" }, { "command": "markdown.showPreviewSecuritySelector", - "title": { - "original": "Change Preview Security Settings", - "value": "%markdown.showPreviewSecuritySelector.title%" - }, + "title": "%markdown.showPreviewSecuritySelector.title%", "category": "Markdown" } ], @@ -322,7 +307,7 @@ }, "scripts": { "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown ./tsconfig.json", - "update-grammar": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ./syntaxes/gulpfile.js" + "update-grammar": "node ../../build/npm/update-grammar.js microsoft/vscode-markdown-tm-grammar syntaxes/markdown.tmLanguage ./syntaxes/markdown.tmLanguage.json" }, "dependencies": { "highlight.js": "9.5.0", @@ -335,7 +320,6 @@ "@types/highlight.js": "9.1.10", "@types/markdown-it": "0.0.2", "@types/node": "7.0.43", - "gulp-rename": "^1.2.2", - "gulp-replace": "^0.5.4" + "vscode": "^1.1.10" } } \ No newline at end of file diff --git a/extensions/markdown/src/commands.ts b/extensions/markdown/src/commands.ts deleted file mode 100644 index 583c0f85292..00000000000 --- a/extensions/markdown/src/commands.ts +++ /dev/null @@ -1,301 +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 'vscode-nls'; -const localize = nls.loadMessageBundle(); - -import * as vscode from 'vscode'; -import * as path from 'path'; - -import { Command } from './commandManager'; -import { ExtensionContentSecurityPolicyArbiter, PreviewSecuritySelector } from './security'; -import { getMarkdownUri, MDDocumentContentProvider, isMarkdownFile } from './features/previewContentProvider'; -import { Logger } from './logger'; -import { TableOfContentsProvider } from './tableOfContentsProvider'; -import { MarkdownEngine } from './markdownEngine'; -import { TelemetryReporter } from './telemetryReporter'; - - -function getViewColumn(sideBySide: boolean): vscode.ViewColumn | undefined { - const active = vscode.window.activeTextEditor; - if (!active) { - return vscode.ViewColumn.One; - } - - if (!sideBySide) { - return active.viewColumn; - } - - switch (active.viewColumn) { - case vscode.ViewColumn.One: - return vscode.ViewColumn.Two; - case vscode.ViewColumn.Two: - return vscode.ViewColumn.Three; - } - - return active.viewColumn; -} - -function showPreview( - cspArbiter: ExtensionContentSecurityPolicyArbiter, - telemetryReporter: TelemetryReporter, - uri?: vscode.Uri, - sideBySide: boolean = false, -) { - let resource = uri; - if (!(resource instanceof vscode.Uri)) { - if (vscode.window.activeTextEditor) { - // we are relaxed and don't check for markdown files - resource = vscode.window.activeTextEditor.document.uri; - } - } - - if (!(resource instanceof vscode.Uri)) { - if (!vscode.window.activeTextEditor) { - // this is most likely toggling the preview - return vscode.commands.executeCommand('markdown.showSource'); - } - // nothing found that could be shown or toggled - return; - } - - const thenable = vscode.commands.executeCommand('vscode.previewHtml', - getMarkdownUri(resource), - getViewColumn(sideBySide), - localize('previewTitle', 'Preview {0}', path.basename(resource.fsPath)), - { - allowScripts: true, - allowSvgs: cspArbiter.shouldAllowSvgsForResource(resource) - }); - - telemetryReporter.sendTelemetryEvent('openPreview', { - where: sideBySide ? 'sideBySide' : 'inPlace', - how: (uri instanceof vscode.Uri) ? 'action' : 'pallete' - }); - - return thenable; -} - -export class ShowPreviewCommand implements Command { - public readonly id = 'markdown.showPreview'; - - public constructor( - private readonly cspArbiter: ExtensionContentSecurityPolicyArbiter, - private readonly telemetryReporter: TelemetryReporter - ) { } - - public execute(uri?: vscode.Uri) { - showPreview(this.cspArbiter, this.telemetryReporter, uri, false); - } -} - -export class ShowPreviewToSideCommand implements Command { - public readonly id = 'markdown.showPreviewToSide'; - - public constructor( - private readonly cspArbiter: ExtensionContentSecurityPolicyArbiter, - private readonly telemetryReporter: TelemetryReporter - ) { } - - public execute(uri?: vscode.Uri) { - showPreview(this.cspArbiter, this.telemetryReporter, uri, true); - } -} - -export class ShowSourceCommand implements Command { - public readonly id = 'markdown.showSource'; - - public execute(mdUri?: vscode.Uri) { - if (!mdUri) { - return vscode.commands.executeCommand('workbench.action.navigateBack'); - } - - const docUri = vscode.Uri.parse(mdUri.query); - for (const editor of vscode.window.visibleTextEditors) { - if (editor.document.uri.scheme === docUri.scheme && editor.document.uri.toString() === docUri.toString()) { - return vscode.window.showTextDocument(editor.document, editor.viewColumn); - } - } - - return vscode.workspace.openTextDocument(docUri) - .then(vscode.window.showTextDocument); - } -} - -export class RefreshPreviewCommand implements Command { - public readonly id = 'markdown.refreshPreview'; - - public constructor( - private readonly contentProvider: MDDocumentContentProvider - ) { } - - public execute(resource: string | undefined) { - if (resource) { - const source = vscode.Uri.parse(resource); - this.contentProvider.update(source); - } else if (vscode.window.activeTextEditor && isMarkdownFile(vscode.window.activeTextEditor.document)) { - this.contentProvider.update(getMarkdownUri(vscode.window.activeTextEditor.document.uri)); - } else { - // update all generated md documents - for (const document of vscode.workspace.textDocuments) { - if (document.uri.scheme === MDDocumentContentProvider.scheme) { - this.contentProvider.update(document.uri); - } - } - } - } -} - -export class ShowPreviewSecuritySelectorCommand implements Command { - public readonly id = 'markdown.showPreviewSecuritySelector'; - - public constructor( - private readonly previewSecuritySelector: PreviewSecuritySelector - ) { } - - public execute(resource: string | undefined) { - if (resource) { - const source = vscode.Uri.parse(resource).query; - this.previewSecuritySelector.showSecutitySelectorForResource(vscode.Uri.parse(source)); - } else { - if (vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.languageId === 'markdown') { - this.previewSecuritySelector.showSecutitySelectorForResource(vscode.window.activeTextEditor.document.uri); - } - } - } -} - -export class RevealLineCommand implements Command { - public readonly id = '_markdown.revealLine'; - - public constructor( - private logger: Logger - ) { } - - public execute(uri: string, line: number) { - const sourceUri = vscode.Uri.parse(decodeURIComponent(uri)); - this.logger.log('revealLine', { uri, sourceUri: sourceUri.toString(), line }); - - vscode.window.visibleTextEditors - .filter(editor => isMarkdownFile(editor.document) && editor.document.uri.toString() === sourceUri.toString()) - .forEach(editor => { - const sourceLine = Math.floor(line); - const fraction = line - sourceLine; - const text = editor.document.lineAt(sourceLine).text; - const start = Math.floor(fraction * text.length); - editor.revealRange( - new vscode.Range(sourceLine, start, sourceLine + 1, 0), - vscode.TextEditorRevealType.AtTop); - }); - } -} - -export class DidClickCommand implements Command { - public readonly id = '_markdown.didClick'; - - public execute(uri: string, line: number) { - const sourceUri = vscode.Uri.parse(decodeURIComponent(uri)); - return vscode.workspace.openTextDocument(sourceUri) - .then(document => vscode.window.showTextDocument(document)) - .then(editor => - vscode.commands.executeCommand('revealLine', { lineNumber: Math.floor(line), at: 'center' }) - .then(() => editor)) - .then(editor => { - if (editor) { - editor.selection = new vscode.Selection( - new vscode.Position(Math.floor(line), 0), - new vscode.Position(Math.floor(line), 0)); - } - }); - } -} - -export class MoveCursorToPositionCommand implements Command { - public readonly id = '_markdown.moveCursorToPosition'; - - public execute(line: number, character: number) { - if (!vscode.window.activeTextEditor) { - return; - } - const position = new vscode.Position(line, character); - const selection = new vscode.Selection(position, position); - vscode.window.activeTextEditor.revealRange(selection); - vscode.window.activeTextEditor.selection = selection; - } -} - -export class OnPreviewStyleLoadErrorCommand implements Command { - public readonly id = '_markdown.onPreviewStyleLoadError'; - - public execute(resources: string[]) { - vscode.window.showWarningMessage(localize('onPreviewStyleLoadError', "Could not load 'markdown.styles': {0}", resources.join(', '))); - } -} - -export interface OpenDocumentLinkArgs { - path: string; - fragment: string; -} - -export class OpenDocumentLinkCommand implements Command { - private static readonly id = '_markdown.openDocumentLink'; - public readonly id = OpenDocumentLinkCommand.id; - - public static createCommandUri( - path: string, - fragment: string - ): vscode.Uri { - return vscode.Uri.parse(`command:${OpenDocumentLinkCommand.id}?${encodeURIComponent(JSON.stringify({ path, fragment }))}`); - } - - public constructor( - private readonly engine: MarkdownEngine - ) { } - - public execute(args: OpenDocumentLinkArgs) { - const tryRevealLine = async (editor: vscode.TextEditor) => { - if (editor && args.fragment) { - const toc = new TableOfContentsProvider(this.engine, editor.document); - const line = await toc.lookup(args.fragment); - if (!isNaN(line)) { - return editor.revealRange( - new vscode.Range(line, 0, line, 0), - vscode.TextEditorRevealType.AtTop); - } - - const lineNumberFragment = args.fragment.match(/^L(\d+)$/); - if (lineNumberFragment) { - const line = +lineNumberFragment[1] - 1; - if (!isNaN(line)) { - return editor.revealRange( - new vscode.Range(line, 0, line, 0), - vscode.TextEditorRevealType.AtTop); - } - } - } - }; - - const tryOpen = async (path: string) => { - if (vscode.window.activeTextEditor && isMarkdownFile(vscode.window.activeTextEditor.document) && vscode.window.activeTextEditor.document.uri.fsPath === path) { - return tryRevealLine(vscode.window.activeTextEditor); - } else { - const resource = vscode.Uri.file(path); - return vscode.workspace.openTextDocument(resource) - .then(vscode.window.showTextDocument) - .then(tryRevealLine); - } - }; - - return tryOpen(args.path).catch(() => { - if (path.extname(args.path) === '') { - return tryOpen(args.path + '.md'); - } - const resource = vscode.Uri.file(args.path); - return Promise.resolve(void 0) - .then(() => vscode.commands.executeCommand('vscode.open', resource)) - .then(() => void 0); - }); - } -} diff --git a/extensions/markdown/src/commands/didClick.ts b/extensions/markdown/src/commands/didClick.ts new file mode 100644 index 00000000000..a96df7ab8db --- /dev/null +++ b/extensions/markdown/src/commands/didClick.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. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { Command } from '../commandManager'; + +export class DidClickCommand implements Command { + public readonly id = '_markdown.didClick'; + + public execute(uri: string, line: number) { + const sourceUri = vscode.Uri.parse(decodeURIComponent(uri)); + return vscode.workspace.openTextDocument(sourceUri) + .then(document => vscode.window.showTextDocument(document)) + .then(editor => + vscode.commands.executeCommand('revealLine', { lineNumber: Math.floor(line), at: 'center' }) + .then(() => editor)) + .then(editor => { + if (editor) { + editor.selection = new vscode.Selection( + new vscode.Position(Math.floor(line), 0), + new vscode.Position(Math.floor(line), 0)); + } + }); + } +} \ No newline at end of file diff --git a/extensions/markdown/src/commands/index.ts b/extensions/markdown/src/commands/index.ts new file mode 100644 index 00000000000..ce28594d586 --- /dev/null +++ b/extensions/markdown/src/commands/index.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. + *--------------------------------------------------------------------------------------------*/ + +export { OpenDocumentLinkCommand } from './openDocumentLink'; +export { OnPreviewStyleLoadErrorCommand } from './onPreviewStyleLoadError'; +export { ShowPreviewCommand, ShowPreviewToSideCommand } from './showPreview'; +export { ShowSourceCommand } from './showSource'; +export { RefreshPreviewCommand } from './refreshPreview'; +export { ShowPreviewSecuritySelectorCommand } from './showPreviewSecuritySelector'; +export { RevealLineCommand } from './revealLine'; +export { DidClickCommand } from './didClick'; +export { MoveCursorToPositionCommand } from './moveCursorToPosition'; diff --git a/extensions/markdown/src/commands/moveCursorToPosition.ts b/extensions/markdown/src/commands/moveCursorToPosition.ts new file mode 100644 index 00000000000..bcc9e56f0c5 --- /dev/null +++ b/extensions/markdown/src/commands/moveCursorToPosition.ts @@ -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. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; + +import { Command } from '../commandManager'; + +export class MoveCursorToPositionCommand implements Command { + public readonly id = '_markdown.moveCursorToPosition'; + + public execute(line: number, character: number) { + if (!vscode.window.activeTextEditor) { + return; + } + const position = new vscode.Position(line, character); + const selection = new vscode.Selection(position, position); + vscode.window.activeTextEditor.revealRange(selection); + vscode.window.activeTextEditor.selection = selection; + } +} diff --git a/extensions/markdown/src/commands/onPreviewStyleLoadError.ts b/extensions/markdown/src/commands/onPreviewStyleLoadError.ts new file mode 100644 index 00000000000..9ea6fceb930 --- /dev/null +++ b/extensions/markdown/src/commands/onPreviewStyleLoadError.ts @@ -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. + *--------------------------------------------------------------------------------------------*/ +import * as nls from 'vscode-nls'; +const localize = nls.loadMessageBundle(); + +import * as vscode from 'vscode'; + +import { Command } from '../commandManager'; + +export class OnPreviewStyleLoadErrorCommand implements Command { + public readonly id = '_markdown.onPreviewStyleLoadError'; + + public execute(resources: string[]) { + vscode.window.showWarningMessage(localize('onPreviewStyleLoadError', "Could not load 'markdown.styles': {0}", resources.join(', '))); + } +} diff --git a/extensions/markdown/src/commands/openDocumentLink.ts b/extensions/markdown/src/commands/openDocumentLink.ts new file mode 100644 index 00000000000..03e59dfffe6 --- /dev/null +++ b/extensions/markdown/src/commands/openDocumentLink.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. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as path from 'path'; + +import { Command } from '../commandManager'; +import { MarkdownEngine } from '../markdownEngine'; +import { TableOfContentsProvider } from '../tableOfContentsProvider'; +import { isMarkdownFile } from '../features/previewContentProvider'; + + +export interface OpenDocumentLinkArgs { + path: string; + fragment: string; +} + +export class OpenDocumentLinkCommand implements Command { + private static readonly id = '_markdown.openDocumentLink'; + public readonly id = OpenDocumentLinkCommand.id; + + public static createCommandUri( + path: string, + fragment: string + ): vscode.Uri { + return vscode.Uri.parse(`command:${OpenDocumentLinkCommand.id}?${encodeURIComponent(JSON.stringify({ path, fragment }))}`); + } + + public constructor( + private readonly engine: MarkdownEngine + ) { } + + public execute(args: OpenDocumentLinkArgs) { + return this.tryOpen(args.path, args).catch(() => { + if (path.extname(args.path) === '') { + return this.tryOpen(args.path + '.md', args); + } + const resource = vscode.Uri.file(args.path); + return Promise.resolve(void 0) + .then(() => vscode.commands.executeCommand('vscode.open', resource)) + .then(() => void 0); + }); + } + + private async tryOpen(path: string, args: OpenDocumentLinkArgs) { + if (vscode.window.activeTextEditor && isMarkdownFile(vscode.window.activeTextEditor.document) && vscode.window.activeTextEditor.document.uri.fsPath === path) { + return this.tryRevealLine(vscode.window.activeTextEditor, args.fragment); + } else { + const resource = vscode.Uri.file(path); + return vscode.workspace.openTextDocument(resource) + .then(vscode.window.showTextDocument) + .then(editor => this.tryRevealLine(editor, args.fragment)); + } + } + + private async tryRevealLine(editor: vscode.TextEditor, fragment?: string) { + if (editor && fragment) { + const toc = new TableOfContentsProvider(this.engine, editor.document); + const entry = await toc.lookup(fragment); + if (entry) { + return editor.revealRange(new vscode.Range(entry.line, 0, entry.line, 0), vscode.TextEditorRevealType.AtTop); + } + const lineNumberFragment = fragment.match(/^L(\d+)$/); + if (lineNumberFragment) { + const line = +lineNumberFragment[1] - 1; + if (!isNaN(line)) { + return editor.revealRange(new vscode.Range(line, 0, line, 0), vscode.TextEditorRevealType.AtTop); + } + } + } + } +} diff --git a/extensions/markdown/src/commands/refreshPreview.ts b/extensions/markdown/src/commands/refreshPreview.ts new file mode 100644 index 00000000000..93cc0fcf761 --- /dev/null +++ b/extensions/markdown/src/commands/refreshPreview.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. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { Command } from '../commandManager'; +import { isMarkdownFile, MDDocumentContentProvider, getMarkdownUri } from '../features/previewContentProvider'; + +export class RefreshPreviewCommand implements Command { + public readonly id = 'markdown.refreshPreview'; + + public constructor( + private readonly contentProvider: MDDocumentContentProvider + ) { } + + public execute(resource: string | undefined) { + if (resource) { + const source = vscode.Uri.parse(resource); + this.contentProvider.update(source); + } else if (vscode.window.activeTextEditor && isMarkdownFile(vscode.window.activeTextEditor.document)) { + this.contentProvider.update(getMarkdownUri(vscode.window.activeTextEditor.document.uri)); + } else { + // update all generated md documents + for (const document of vscode.workspace.textDocuments) { + if (document.uri.scheme === MDDocumentContentProvider.scheme) { + this.contentProvider.update(document.uri); + } + } + } + } +} \ No newline at end of file diff --git a/extensions/markdown/src/commands/revealLine.ts b/extensions/markdown/src/commands/revealLine.ts new file mode 100644 index 00000000000..7587f7763ed --- /dev/null +++ b/extensions/markdown/src/commands/revealLine.ts @@ -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. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { Command } from '../commandManager'; +import { Logger } from '../logger'; +import { isMarkdownFile } from '../features/previewContentProvider'; + +export class RevealLineCommand implements Command { + public readonly id = '_markdown.revealLine'; + + public constructor( + private logger: Logger + ) { } + + public execute(uri: string, line: number) { + const sourceUri = vscode.Uri.parse(decodeURIComponent(uri)); + this.logger.log('revealLine', { uri, sourceUri: sourceUri.toString(), line }); + + vscode.window.visibleTextEditors + .filter(editor => isMarkdownFile(editor.document) && editor.document.uri.toString() === sourceUri.toString()) + .forEach(editor => { + const sourceLine = Math.floor(line); + const fraction = line - sourceLine; + const text = editor.document.lineAt(sourceLine).text; + const start = Math.floor(fraction * text.length); + editor.revealRange( + new vscode.Range(sourceLine, start, sourceLine + 1, 0), + vscode.TextEditorRevealType.AtTop); + }); + } +} \ No newline at end of file diff --git a/extensions/markdown/src/commands/showPreview.ts b/extensions/markdown/src/commands/showPreview.ts new file mode 100644 index 00000000000..e3cb65f0a3f --- /dev/null +++ b/extensions/markdown/src/commands/showPreview.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 * as nls from 'vscode-nls'; +const localize = nls.loadMessageBundle(); + +import * as vscode from 'vscode'; +import * as path from 'path'; + +import { Command } from '../commandManager'; +import { ExtensionContentSecurityPolicyArbiter } from '../security'; +import { getMarkdownUri, } from '../features/previewContentProvider'; +import { TelemetryReporter } from '../telemetryReporter'; + + +function getViewColumn(sideBySide: boolean): vscode.ViewColumn | undefined { + const active = vscode.window.activeTextEditor; + if (!active) { + return vscode.ViewColumn.One; + } + + if (!sideBySide) { + return active.viewColumn; + } + + switch (active.viewColumn) { + case vscode.ViewColumn.One: + return vscode.ViewColumn.Two; + case vscode.ViewColumn.Two: + return vscode.ViewColumn.Three; + } + + return active.viewColumn; +} + +function showPreview( + cspArbiter: ExtensionContentSecurityPolicyArbiter, + telemetryReporter: TelemetryReporter, + uri?: vscode.Uri, + sideBySide: boolean = false, +) { + let resource = uri; + if (!(resource instanceof vscode.Uri)) { + if (vscode.window.activeTextEditor) { + // we are relaxed and don't check for markdown files + resource = vscode.window.activeTextEditor.document.uri; + } + } + + if (!(resource instanceof vscode.Uri)) { + if (!vscode.window.activeTextEditor) { + // this is most likely toggling the preview + return vscode.commands.executeCommand('markdown.showSource'); + } + // nothing found that could be shown or toggled + return; + } + + const thenable = vscode.commands.executeCommand('vscode.previewHtml', + getMarkdownUri(resource), + getViewColumn(sideBySide), + localize('previewTitle', 'Preview {0}', path.basename(resource.fsPath)), + { + allowScripts: true, + allowSvgs: cspArbiter.shouldAllowSvgsForResource(resource) + }); + + telemetryReporter.sendTelemetryEvent('openPreview', { + where: sideBySide ? 'sideBySide' : 'inPlace', + how: (uri instanceof vscode.Uri) ? 'action' : 'pallete' + }); + + return thenable; +} + +export class ShowPreviewCommand implements Command { + public readonly id = 'markdown.showPreview'; + + public constructor( + private readonly cspArbiter: ExtensionContentSecurityPolicyArbiter, + private readonly telemetryReporter: TelemetryReporter + ) { } + + public execute(mainUri?: vscode.Uri, allUris?: vscode.Uri[]) { + for (const uri of (allUris || [mainUri])) { + showPreview(this.cspArbiter, this.telemetryReporter, uri, false); + } + } +} + +export class ShowPreviewToSideCommand implements Command { + public readonly id = 'markdown.showPreviewToSide'; + + public constructor( + private readonly cspArbiter: ExtensionContentSecurityPolicyArbiter, + private readonly telemetryReporter: TelemetryReporter + ) { } + + public execute(uri?: vscode.Uri) { + showPreview(this.cspArbiter, this.telemetryReporter, uri, true); + } +} diff --git a/extensions/markdown/src/commands/showPreviewSecuritySelector.ts b/extensions/markdown/src/commands/showPreviewSecuritySelector.ts new file mode 100644 index 00000000000..30d214aefe1 --- /dev/null +++ b/extensions/markdown/src/commands/showPreviewSecuritySelector.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. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { Command } from '../commandManager'; +import { PreviewSecuritySelector } from '../security'; + +export class ShowPreviewSecuritySelectorCommand implements Command { + public readonly id = 'markdown.showPreviewSecuritySelector'; + + public constructor( + private readonly previewSecuritySelector: PreviewSecuritySelector + ) { } + + public execute(resource: string | undefined) { + if (resource) { + const source = vscode.Uri.parse(resource).query; + this.previewSecuritySelector.showSecutitySelectorForResource(vscode.Uri.parse(source)); + } else { + if (vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.languageId === 'markdown') { + this.previewSecuritySelector.showSecutitySelectorForResource(vscode.window.activeTextEditor.document.uri); + } + } + } +} \ No newline at end of file diff --git a/extensions/markdown/src/commands/showSource.ts b/extensions/markdown/src/commands/showSource.ts new file mode 100644 index 00000000000..6c49788fb80 --- /dev/null +++ b/extensions/markdown/src/commands/showSource.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. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { Command } from '../commandManager'; + +export class ShowSourceCommand implements Command { + public readonly id = 'markdown.showSource'; + + public execute(mdUri?: vscode.Uri) { + if (!mdUri) { + return vscode.commands.executeCommand('workbench.action.navigateBack'); + } + + const docUri = vscode.Uri.parse(mdUri.query); + for (const editor of vscode.window.visibleTextEditors) { + if (editor.document.uri.scheme === docUri.scheme && editor.document.uri.toString() === docUri.toString()) { + return vscode.window.showTextDocument(editor.document, editor.viewColumn); + } + } + + return vscode.workspace.openTextDocument(docUri) + .then(vscode.window.showTextDocument); + } +} \ No newline at end of file diff --git a/extensions/markdown/src/extension.ts b/extensions/markdown/src/extension.ts index 44694ae41a7..2c64c561fe9 100644 --- a/extensions/markdown/src/extension.ts +++ b/extensions/markdown/src/extension.ts @@ -9,7 +9,7 @@ import { MarkdownEngine } from './markdownEngine'; import { ExtensionContentSecurityPolicyArbiter, PreviewSecuritySelector } from './security'; import { Logger } from './logger'; import { CommandManager } from './commandManager'; -import * as commands from './commands'; +import * as commands from './commands/index'; import { loadDefaultTelemetryReporter } from './telemetryReporter'; import { loadMarkdownExtensions } from './markdownExtensions'; import LinkProvider from './features/documentLinkProvider'; diff --git a/extensions/markdown/src/features/documentLinkProvider.ts b/extensions/markdown/src/features/documentLinkProvider.ts index 8ad3619b32d..a51df3686b1 100644 --- a/extensions/markdown/src/features/documentLinkProvider.ts +++ b/extensions/markdown/src/features/documentLinkProvider.ts @@ -3,11 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as vscode from 'vscode'; import * as path from 'path'; -import { OpenDocumentLinkCommand } from '../commands'; +import { OpenDocumentLinkCommand } from '../commands/openDocumentLink'; function normalizeLink( document: vscode.TextDocument, diff --git a/extensions/markdown/src/features/documentSymbolProvider.ts b/extensions/markdown/src/features/documentSymbolProvider.ts index 53213f0661d..c40a62b352d 100644 --- a/extensions/markdown/src/features/documentSymbolProvider.ts +++ b/extensions/markdown/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 * as vscode from 'vscode'; import { MarkdownEngine } from '../markdownEngine'; @@ -13,7 +11,7 @@ import { TableOfContentsProvider } from '../tableOfContentsProvider'; export default class MDDocumentSymbolProvider implements vscode.DocumentSymbolProvider { constructor( - private engine: MarkdownEngine + private readonly engine: MarkdownEngine ) { } public async provideDocumentSymbols(document: vscode.TextDocument): Promise { diff --git a/extensions/markdown/src/features/previewContentProvider.ts b/extensions/markdown/src/features/previewContentProvider.ts index 27f1aa753fb..c2d984b7d74 100644 --- a/extensions/markdown/src/features/previewContentProvider.ts +++ b/extensions/markdown/src/features/previewContentProvider.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 * as path from 'path'; import { MarkdownEngine } from '../markdownEngine'; diff --git a/extensions/markdown/src/logger.ts b/extensions/markdown/src/logger.ts index 2c22c65069b..f5a4a776533 100644 --- a/extensions/markdown/src/logger.ts +++ b/extensions/markdown/src/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, workspace } from 'vscode'; enum Trace { @@ -32,8 +30,8 @@ function isString(value: any): value is string { } export class Logger { - private trace: Trace; - private _output: OutputChannel; + private trace?: Trace; + private _output?: OutputChannel; constructor() { this.updateConfiguration(); @@ -43,7 +41,7 @@ export class Logger { if (this.trace === Trace.Verbose) { this.output.appendLine(`[Log - ${(new Date().toLocaleTimeString())}] ${message}`); if (data) { - this.output.appendLine(this.data2String(data)); + this.output.appendLine(Logger.data2String(data)); } } } @@ -63,7 +61,7 @@ export class Logger { return Trace.fromString(workspace.getConfiguration().get('markdown.trace', 'off')); } - private data2String(data: any): string { + private static data2String(data: any): string { if (data instanceof Error) { if (isString(data.stack)) { return data.stack; diff --git a/extensions/markdown/src/markdownEngine.ts b/extensions/markdown/src/markdownEngine.ts index a4be37ed984..8650479e524 100644 --- a/extensions/markdown/src/markdownEngine.ts +++ b/extensions/markdown/src/markdownEngine.ts @@ -5,17 +5,17 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import { TableOfContentsProvider } from './tableOfContentsProvider'; +import { Slug } from './tableOfContentsProvider'; import { MarkdownIt, Token } from 'markdown-it'; const FrontMatterRegex = /^---\s*[^]*?(-{3}|\.{3})\s*/; export class MarkdownEngine { - private md: MarkdownIt; + private md?: MarkdownIt; - private firstLine: number; + private firstLine?: number; - private currentDocument: vscode.Uri; + private currentDocument?: vscode.Uri; private plugins: Array<(md: any) => any> = []; @@ -51,10 +51,10 @@ export class MarkdownEngine { return `
    ${hljs.highlight(lang, str, true).value}
    `; } catch (error) { } } - return `
    ${this.md.utils.escapeHtml(str)}
    `; + return `
    ${this.md!.utils.escapeHtml(str)}
    `; } }).use(mdnh, { - slugify: (header: string) => TableOfContentsProvider.slugify(header) + slugify: (header: string) => Slug.fromHeading(header).value }); for (const plugin of this.plugins) { @@ -141,12 +141,12 @@ export class MarkdownEngine { // Assume it must be a file const fragment = uri.fragment; if (uri.path[0] === '/') { - const root = vscode.workspace.getWorkspaceFolder(this.currentDocument); + const root = vscode.workspace.getWorkspaceFolder(this.currentDocument!); if (root) { uri = vscode.Uri.file(path.join(root.uri.fsPath, uri.path)); } } else { - uri = vscode.Uri.file(path.join(path.dirname(this.currentDocument.path), uri.path)); + uri = vscode.Uri.file(path.join(path.dirname(this.currentDocument!.path), uri.path)); } if (fragment) { diff --git a/extensions/markdown/src/markdownExtensions.ts b/extensions/markdown/src/markdownExtensions.ts index b01a14b994b..4504cf3dfe0 100644 --- a/extensions/markdown/src/markdownExtensions.ts +++ b/extensions/markdown/src/markdownExtensions.ts @@ -58,8 +58,7 @@ function tryLoadPreviewScripts( for (const script of scripts) { try { contentProvider.addScript(resolveExtensionResources(extension, script)); - } - catch (e) { + } catch (e) { // noop } } @@ -76,8 +75,7 @@ function tryLoadPreviewStyles( for (const style of styles) { try { contentProvider.addStyle(resolveExtensionResources(extension, style)); - } - catch (e) { + } catch (e) { // noop } } diff --git a/extensions/markdown/src/security.ts b/extensions/markdown/src/security.ts index 56312a59d5f..c4625250af0 100644 --- a/extensions/markdown/src/security.ts +++ b/extensions/markdown/src/security.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 vscode from 'vscode'; diff --git a/extensions/markdown/src/tableOfContentsProvider.ts b/extensions/markdown/src/tableOfContentsProvider.ts index c93dd25f6e7..7de1c8a725f 100644 --- a/extensions/markdown/src/tableOfContentsProvider.ts +++ b/extensions/markdown/src/tableOfContentsProvider.ts @@ -3,22 +3,41 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as vscode from 'vscode'; import { MarkdownEngine } from './markdownEngine'; +export class Slug { + public static fromHeading(heading: string): Slug { + const slugifiedHeading = encodeURI(heading.trim() + .toLowerCase() + .replace(/[\]\[\!\"\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~\`]/g, '') + .replace(/\s+/g, '-') + .replace(/^\-+/, '') + .replace(/\-+$/, '')); + + return new Slug(slugifiedHeading); + } + + private constructor( + public readonly value: string + ) { } + + public equals(other: Slug): boolean { + return this.value === other.value; + } +} + export interface TocEntry { - slug: string; - text: string; - level: number; - line: number; - location: vscode.Location; + readonly slug: Slug; + readonly text: string; + readonly level: number; + readonly line: number; + readonly location: vscode.Location; } export class TableOfContentsProvider { - private toc: TocEntry[]; + private toc?: TocEntry[]; public constructor( private engine: MarkdownEngine, @@ -36,14 +55,10 @@ export class TableOfContentsProvider { return this.toc; } - public async lookup(fragment: string): Promise { - const slug = TableOfContentsProvider.slugify(fragment); - for (const entry of await this.getToc()) { - if (entry.slug === slug) { - return entry.line; - } - } - return NaN; + public async lookup(fragment: string): Promise { + const toc = await this.getToc(); + const slug = Slug.fromHeading(fragment); + return toc.find(entry => entry.slug.equals(slug)); } private async buildToc(document: vscode.TextDocument): Promise { @@ -53,17 +68,13 @@ export class TableOfContentsProvider { for (const heading of tokens.filter(token => token.type === 'heading_open')) { const lineNumber = heading.map[0]; const line = document.lineAt(lineNumber); - const href = TableOfContentsProvider.slugify(line.text); - const level = TableOfContentsProvider.getHeaderLevel(heading.markup); - if (href) { - toc.push({ - slug: href, - text: TableOfContentsProvider.getHeaderText(line.text), - level: level, - line: lineNumber, - location: new vscode.Location(document.uri, line.range) - }); - } + toc.push({ + slug: Slug.fromHeading(line.text), + text: TableOfContentsProvider.getHeaderText(line.text), + level: TableOfContentsProvider.getHeaderLevel(heading.markup), + line: lineNumber, + location: new vscode.Location(document.uri, line.range) + }); } return toc; } @@ -81,14 +92,4 @@ export class TableOfContentsProvider { private static getHeaderText(header: string): string { return header.replace(/^\s*#+\s*(.*?)\s*#*$/, (_, word) => word.trim()); } - - public static slugify(header: string): string { - return encodeURI(header.trim() - .toLowerCase() - .replace(/[\]\[\!\"\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~\`]/g, '') - .replace(/\s+/g, '-') - .replace(/^\-+/, '') - .replace(/\-+$/, '')); - } } - diff --git a/extensions/markdown/src/test/index.ts b/extensions/markdown/src/test/index.ts new file mode 100644 index 00000000000..f65a756a8de --- /dev/null +++ b/extensions/markdown/src/test/index.ts @@ -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. + *--------------------------------------------------------------------------------------------*/ + +// +// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING +// +// This file is providing the test runner to use when running extension tests. +// By default the test runner in use is Mocha based. +// +// You can provide your own test runner if you want to override it by exporting +// a function run(testRoot: string, clb: (error:Error) => void) that the extension +// host can call to run the tests. The test runner is expected to use console.log +// to report the results back to the caller. When the tests are finished, return +// a possible error to the callback or null if none. + +const testRunner = require('vscode/lib/testrunner'); + +// You can directly control Mocha options by uncommenting the following lines +// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info +testRunner.configure({ + ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.) + useColors: process.platform !== 'win32', // colored output from test results (only windows cannot handle) + timeout: 60000 +}); + +export = testRunner; diff --git a/extensions/markdown/src/test/tableOfContentsProvider.test.ts b/extensions/markdown/src/test/tableOfContentsProvider.test.ts new file mode 100644 index 00000000000..e2b2bfde85d --- /dev/null +++ b/extensions/markdown/src/test/tableOfContentsProvider.test.ts @@ -0,0 +1,131 @@ +/*--------------------------------------------------------------------------------------------- + * 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 * as vscode from 'vscode'; +import 'mocha'; + +import { TableOfContentsProvider } from '../tableOfContentsProvider'; +import { MarkdownEngine } from '../markdownEngine'; + +const testFileName = vscode.Uri.parse('test.md'); + +suite('markdown.TableOfContentsProvider', () => { + test('Lookup should not return anything for empty document', async () => { + const doc = new InMemoryDocument(testFileName, ''); + const provider = new TableOfContentsProvider(new MarkdownEngine(), doc); + + assert.strictEqual(await provider.lookup(''), undefined); + assert.strictEqual(await provider.lookup('foo'), undefined); + }); + + test('Lookup should not return anything for document with no headers', async () => { + const doc = new InMemoryDocument(testFileName, 'a *b*\nc'); + const provider = new TableOfContentsProvider(new MarkdownEngine(), doc); + + assert.strictEqual(await provider.lookup(''), undefined); + assert.strictEqual(await provider.lookup('foo'), undefined); + assert.strictEqual(await provider.lookup('a'), undefined); + assert.strictEqual(await provider.lookup('b'), undefined); + }); + + test('Lookup should return basic #header', async () => { + const doc = new InMemoryDocument(testFileName, `# a\nx\n# c`); + const provider = new TableOfContentsProvider(new MarkdownEngine(), doc); + + { + const entry = await provider.lookup('a'); + assert.ok(entry); + assert.strictEqual(entry!.line, 0); + } + { + assert.strictEqual(await provider.lookup('x'), undefined); + } + { + const entry = await provider.lookup('c'); + assert.ok(entry); + assert.strictEqual(entry!.line, 2); + } + }); + + test('Lookups should be case in-sensitive', async () => { + const doc = new InMemoryDocument(testFileName, `# fOo\n`); + const provider = new TableOfContentsProvider(new MarkdownEngine(), doc); + + assert.strictEqual((await provider.lookup('fOo'))!.line, 0); + assert.strictEqual((await provider.lookup('foo'))!.line, 0); + assert.strictEqual((await provider.lookup('FOO'))!.line, 0); + }); + + test('Lookups should ignore leading and trailing white-space, and collapse internal whitespace', async () => { + const doc = new InMemoryDocument(testFileName, `# f o o \n`); + const provider = new TableOfContentsProvider(new MarkdownEngine(), doc); + + assert.strictEqual((await provider.lookup('f o o'))!.line, 0); + assert.strictEqual((await provider.lookup(' f o o'))!.line, 0); + assert.strictEqual((await provider.lookup(' f o o '))!.line, 0); + assert.strictEqual((await provider.lookup('f o o'))!.line, 0); + assert.strictEqual((await provider.lookup('f o o'))!.line, 0); + + assert.strictEqual(await provider.lookup('f'), undefined); + assert.strictEqual(await provider.lookup('foo'), undefined); + assert.strictEqual(await provider.lookup('fo o'), undefined); + }); +}); + +class InMemoryDocument implements vscode.TextDocument { + private readonly _lines: string[]; + + constructor( + public readonly uri: vscode.Uri, + private readonly _contents: string + ) { + this._lines = this._contents.split(/\n/g); + } + + fileName: string = ''; + isUntitled: boolean = false; + languageId: string = ''; + version: number = 1; + isDirty: boolean = false; + isClosed: boolean = false; + eol: vscode.EndOfLine = vscode.EndOfLine.LF; + + get lineCount(): number { + return this._lines.length; + } + + lineAt(line: any): vscode.TextLine { + return { + lineNumber: line, + text: this._lines[line], + range: new vscode.Range(0, 0, 0, 0), + firstNonWhitespaceCharacterIndex: 0, + rangeIncludingLineBreak: new vscode.Range(0, 0, 0, 0), + isEmptyOrWhitespace: false + }; + } + offsetAt(_position: vscode.Position): never { + throw new Error('Method not implemented.'); + } + positionAt(_offset: number): never { + throw new Error('Method not implemented.'); + } + getText(_range?: vscode.Range | undefined): string { + return this._contents; + } + getWordRangeAtPosition(_position: vscode.Position, _regex?: RegExp | undefined): never { + throw new Error('Method not implemented.'); + } + validateRange(_range: vscode.Range): never { + throw new Error('Method not implemented.'); + } + validatePosition(_position: vscode.Position): never { + throw new Error('Method not implemented.'); + } + save(): never { + throw new Error('Method not implemented.'); + } +} diff --git a/extensions/markdown/syntaxes/gulpfile.js b/extensions/markdown/syntaxes/gulpfile.js deleted file mode 100644 index 9371f0ddc18..00000000000 --- a/extensions/markdown/syntaxes/gulpfile.js +++ /dev/null @@ -1,164 +0,0 @@ -// @ts-check - -var gulp = require('gulp'); -var util = require("gulp-util"); -var replace = require('gulp-replace'); -var rename = require('gulp-rename'); - -const languages = [ - { name: 'css', language: 'css', identifiers: ['css', 'css.erb'], source: 'source.css' }, - { name: 'basic', language: 'html', identifiers: ['html', 'htm', 'shtml', 'xhtml', 'inc', 'tmpl', 'tpl'], source: 'text.html.basic' }, - { name: 'ini', language: 'ini', identifiers: ['ini', 'conf'], source: 'source.ini' }, - { name: 'java', language: 'java', identifiers: ['java', 'bsh'], source: 'source.java' }, - { name: 'lua', language: 'lua', identifiers: ['lua'], source: 'source.lua' }, - { name: 'makefile', language: 'makefile', identifiers: ['Makefile', 'makefile', 'GNUmakefile', 'OCamlMakefile'], source: 'source.makefile' }, - { name: 'perl', language: 'perl', identifiers: ['perl', 'pl', 'pm', 'pod', 't', 'PL', 'psgi', 'vcl'], source: 'source.perl' }, - { name: 'r', language: 'r', identifiers: ['R', 'r', 's', 'S', 'Rprofile'], source: 'source.r' }, - { name: 'ruby', language: 'ruby', identifiers: ['ruby', 'rb', 'rbx', 'rjs', 'Rakefile', 'rake', 'cgi', 'fcgi', 'gemspec', 'irbrc', 'Capfile', 'ru', 'prawn', 'Cheffile', 'Gemfile', 'Guardfile', 'Hobofile', 'Vagrantfile', 'Appraisals', 'Rantfile', 'Berksfile', 'Berksfile.lock', 'Thorfile', 'Puppetfile'], source: 'source.ruby' }, - // Left to its own devices, the PHP grammar will match HTML as a combination of operators - // and constants. Therefore, HTML must take precedence over PHP in order to get proper - // syntax highlighting. - { name: 'php', language: 'php', identifiers: ['php', 'php3', 'php4', 'php5', 'phpt', 'phtml', 'aw', 'ctp'], source: ['text.html.basic', 'text.html.php#language'] }, - { name: 'sql', language: 'sql', identifiers: ['sql', 'ddl', 'dml'], source: 'source.sql' }, - { name: 'vs_net', language: 'vs_net', identifiers: ['vb'], source: 'source.asp.vb.net' }, - { name: 'xml', language: 'xml', identifiers: ['xml', 'xsd', 'tld', 'jsp', 'pt', 'cpt', 'dtml', 'rss', 'opml'], source: 'text.xml' }, - { name: 'xsl', language: 'xsl', identifiers: ['xsl', 'xslt'], source: 'text.xml.xsl' }, - { name: 'yaml', language: 'yaml', identifiers: ['yaml', 'yml'], source: 'source.yaml' }, - { name: 'dosbatch', language: 'dosbatch', identifiers: ['bat', 'batch'], source: 'source.dosbatch' }, - { name: 'clojure', language: 'clojure', identifiers: ['clj', 'cljs', 'clojure'], source: 'source.clojure' }, - { name: 'coffee', language: 'coffee', identifiers: ['coffee', 'Cakefile', 'coffee.erb'], source: 'source.coffee' }, - { name: 'c', language: 'c', identifiers: ['c', 'h'], source: 'source.c' }, - { name: 'cpp', language: 'cpp', identifiers: ['cpp', 'c\\+\\+', 'cxx'], source: 'source.cpp' }, - { name: 'diff', language: 'diff', identifiers: ['patch', 'diff', 'rej'], source: 'source.diff' }, - { name: 'dockerfile', language: 'dockerfile', identifiers: ['dockerfile', 'Dockerfile'], source: 'source.dockerfile' }, - { name: 'git_commit', identifiers: ['COMMIT_EDITMSG', 'MERGE_MSG'], source: 'text.git-commit' }, - { name: 'git_rebase', identifiers: ['git-rebase-todo'], source: 'text.git-rebase' }, - { name: 'go', language: 'go', identifiers: ['go', 'golang'], source: 'source.go' }, - { name: 'groovy', language: 'groovy', identifiers: ['groovy', 'gvy'], source: 'source.groovy' }, - { name: 'jade', language: 'jade', identifiers: ['jade', 'pug'], source: 'text.jade' }, - - { name: 'js', language: 'javascript', identifiers: ['js', 'jsx', 'javascript', 'es6', 'mjs'], source: 'source.js' }, - { name: 'js_regexp', identifiers: ['regexp'], source: 'source.js.regexp' }, - { name: 'json', language: 'json', identifiers: ['json', 'sublime-settings', 'sublime-menu', 'sublime-keymap', 'sublime-mousemap', 'sublime-theme', 'sublime-build', 'sublime-project', 'sublime-completions'], source: 'source.json' }, - { name: 'less', language: 'less', identifiers: ['less'], source: 'source.css.less' }, - { name: 'objc', language: 'objc', identifiers: ['objectivec', 'objective-c', 'mm', 'objc', 'obj-c', 'm', 'h'], source: 'source.objc' }, - { name: 'scss', language: 'scss', identifiers: ['scss'], source: 'source.css.scss' }, - - { name: 'perl6', language: 'perl6', identifiers: ['perl6', 'p6', 'pl6', 'pm6', 'nqp'], source: 'source.perl.6' }, - { name: 'powershell', language: 'powershell', identifiers: ['powershell', 'ps1', 'psm1', 'psd1'], source: 'source.powershell' }, - { name: 'python', language: 'python', identifiers: ['python', 'py', 'py3', 'rpy', 'pyw', 'cpy', 'SConstruct', 'Sconstruct', 'sconstruct', 'SConscript', 'gyp', 'gypi'], source: 'source.python' }, - { name: 'regexp_python', identifiers: ['re'], source: 'source.regexp.python' }, - { name: 'rust', language: 'rust', identifiers: ['rust', 'rs'], source: 'source.rust' }, - { name: 'scala', language: 'scala', identifiers: ['scala', 'sbt'], source: 'source.scala' }, - { name: 'shell', language: 'shellscript', identifiers: ['shell', 'sh', 'bash', 'zsh', 'bashrc', 'bash_profile', 'bash_login', 'profile', 'bash_logout', '.textmate_init'], source: 'source.shell' }, - { name: 'ts', language: 'typescript', identifiers: ['typescript', 'ts'], source: 'source.ts' }, - { name: 'tsx', language: 'typescriptreact', identifiers: ['tsx'], source: 'source.tsx' }, - { name: 'csharp', language: 'csharp', identifiers: ['cs', 'csharp', 'c#'], source: 'source.cs' }, - { name: 'fsharp', language: 'fsharp', identifiers: ['fs', 'fsharp', 'f#'], source: 'source.fsharp' }, -]; - -const fencedCodeBlockDefinition = (name, identifiers, sourceScope, language) => { - if (!Array.isArray(sourceScope)) { - sourceScope = [sourceScope]; - } - - language = language || name - - const scopes = sourceScope.map(scope => - ` - include - ${scope} -`).join('\n'); - - return `fenced_code_block_${name} - - begin - (^|\\G)(\\s*)(\`{3,}|~{3,})\\s*(?i:(${identifiers.join('|')})(\\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*$) - contentName - meta.embedded.block.${language} - patterns - -${indent(4, scopes)} - - - -`; -}; - -const indent = (count, text) => { - const indent = new Array(count + 1).join('\t'); - return text.replace(/^/gm, indent); -}; - -const fencedCodeBlockInclude = (name) => - ` - include - #fenced_code_block_${name} -`; - - -const fencedCodeBlockDefinitions = () => - languages - .map(language => fencedCodeBlockDefinition(language.name, language.identifiers, language.source, language.language)) - .join('\n'); - - - -const fencedCodeBlockIncludes = () => - languages - .map(language => fencedCodeBlockInclude(language.name)) - .join('\n'); - - -gulp.task('default', function () { - gulp.src(['markdown.tmLanguage.base']) - .pipe(replace('{{languageIncludes}}', indent(4, fencedCodeBlockIncludes()))) - .pipe(replace('{{languageDefinitions}}', indent(4, fencedCodeBlockDefinitions()))) - .pipe(rename('markdown.tmLanguage')) - .pipe(gulp.dest('.')); -}); - -gulp.task('embedded', function () { - const out = {} - for (const lang of languages.filter(x => x.language)) { - out['meta.embedded.block.' +lang.language] = lang.language; - } - util.log(JSON.stringify(out, undefined, 4)); -}); diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage b/extensions/markdown/syntaxes/markdown.tmLanguage deleted file mode 100644 index bb0e0c36761..00000000000 --- a/extensions/markdown/syntaxes/markdown.tmLanguage +++ /dev/null @@ -1,3702 +0,0 @@ - - - - - fileTypes - - md - mdown - markdown - markdn - - keyEquivalent - ^~M - name - Markdown - patterns - - - include - #frontMatter - - - include - #block - - - repository - - block - - patterns - - - include - #separator - - - include - #heading - - - include - #blockquote - - - include - #lists - - - include - #fenced_code_block_css - - - include - #fenced_code_block_basic - - - include - #fenced_code_block_ini - - - include - #fenced_code_block_java - - - include - #fenced_code_block_lua - - - include - #fenced_code_block_makefile - - - include - #fenced_code_block_perl - - - include - #fenced_code_block_r - - - include - #fenced_code_block_ruby - - - include - #fenced_code_block_php - - - include - #fenced_code_block_sql - - - include - #fenced_code_block_vs_net - - - include - #fenced_code_block_xml - - - include - #fenced_code_block_xsl - - - include - #fenced_code_block_yaml - - - include - #fenced_code_block_dosbatch - - - include - #fenced_code_block_clojure - - - include - #fenced_code_block_coffee - - - include - #fenced_code_block_c - - - include - #fenced_code_block_cpp - - - include - #fenced_code_block_diff - - - include - #fenced_code_block_dockerfile - - - include - #fenced_code_block_git_commit - - - include - #fenced_code_block_git_rebase - - - include - #fenced_code_block_go - - - include - #fenced_code_block_groovy - - - include - #fenced_code_block_jade - - - include - #fenced_code_block_js - - - include - #fenced_code_block_js_regexp - - - include - #fenced_code_block_json - - - include - #fenced_code_block_less - - - include - #fenced_code_block_objc - - - include - #fenced_code_block_scss - - - include - #fenced_code_block_perl6 - - - include - #fenced_code_block_powershell - - - include - #fenced_code_block_python - - - include - #fenced_code_block_regexp_python - - - include - #fenced_code_block_rust - - - include - #fenced_code_block_scala - - - include - #fenced_code_block_shell - - - include - #fenced_code_block_ts - - - include - #fenced_code_block_tsx - - - include - #fenced_code_block_csharp - - - include - #fenced_code_block_fsharp - - - include - #fenced_code_block_unknown - - - include - #raw_block - - - include - #link-def - - - include - #html - - - include - #paragraph - - - repository - - blockquote - - begin - (^|\G)[ ]{0,3}(>) ? - captures - - 2 - - name - beginning.punctuation.definition.quote.markdown - - - name - markup.quote.markdown - patterns - - - include - #block - - - while - (^|\G)\s*(>) ? - - heading - - begin - (?:^|\G)[ ]{0,3}(#{1,6})\s*(?=[\S[^#]]) - captures - - 1 - - name - punctuation.definition.heading.markdown - - - contentName - entity.name.section.markdown - end - \s*(#{1,6})?$\n? - name - markup.heading.markdown - patterns - - - include - #inline - - - - heading-setext - - patterns - - - match - ^(={3,})(?=[ \t]*$\n?) - name - markup.heading.setext.1.markdown - - - match - ^(-{3,})(?=[ \t]*$\n?) - name - markup.heading.setext.2.markdown - - - - html - - patterns - - - begin - (^|\G)\s*(<!--) - end - (-->) - name - comment.block.html - captures - - 1 - - name - punctuation.definition.comment.html - - 2 - - name - punctuation.definition.comment.html - - - - - begin - (^|\G)\s*(?=<(script|style|pre)(\s|$|>)(?!.*?</(script|style|pre)>)) - patterns - - - begin - (\s*|$) - patterns - - - include - text.html.basic - - - while - ^(?!.*</(script|style|pre)>) - - - end - (?=.*</(script|style|pre)>) - - - begin - (^|\G)\s*(?=</?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(\s|$|/?>)) - patterns - - - include - text.html.basic - - - while - ^(?!\s*$) - - - begin - (^|\G)\s*(?=(<[a-zA-Z0-9\-](/?>|\s.*?>)|</[a-zA-Z0-9\-]>)\s*$) - patterns - - - include - text.html.basic - - - while - ^(?!\s*$) - - - - link-def - - captures - - 1 - - name - punctuation.definition.constant.markdown - - 10 - - name - punctuation.definition.string.end.markdown - - 11 - - name - string.other.link.description.title.markdown - - 12 - - name - punctuation.definition.string.begin.markdown - - 13 - - name - punctuation.definition.string.end.markdown - - 2 - - name - constant.other.reference.link.markdown - - 3 - - name - punctuation.definition.constant.markdown - - 4 - - name - punctuation.separator.key-value.markdown - - 5 - - name - punctuation.definition.link.markdown - - 6 - - name - markup.underline.link.markdown - - 7 - - name - punctuation.definition.link.markdown - - 8 - - name - string.other.link.description.title.markdown - - 9 - - name - punctuation.definition.string.begin.markdown - - - match - ^(?x: - \s* # Leading whitespace - (\[)(.+?)(\])(:) # Reference name - [ \t]* # Optional whitespace - (<?)(\S+?)(>?) # The url - [ \t]* # Optional whitespace - (?: - ((\().+?(\))) # Match title in quotes… - | ((").+?(")) # or in parens. - )? # Title is optional - \s* # Optional whitespace - $ - ) - name - meta.link.reference.def.markdown - - list_paragraph - - begin - (^|\G)(?=\S)(?![*+->]\s|[0-9]+\.\s) - name - meta.paragraph.markdown - patterns - - - include - #inline - - - include - text.html.basic - - - include - #heading-setext - - - while - (^|\G)(?!\s*$|#|[ ]{0,3}([-*_>][ ]{2,}){3,}[ \t]*$\n?|[ ]{0,3}[*+->]|[ ]{0,3}[0-9]+\.) - - lists - - patterns - - - begin - (^|\G)([ ]{0,3})([*+-])([ ]{1,3}|\t) - beginCaptures - - 3 - - name - beginning.punctuation.definition.list.markdown - - - comment - Currently does not support un-indented second lines. - name - markup.list.unnumbered.markdown - patterns - - - include - #block - - - include - #list_paragraph - - - while - ((^|\G)([ ]{4}|\t))|(^[ \t]*$) - - - begin - (^|\G)([ ]{0,3})([0-9]+\.)([ ]{1,3}|\t) - beginCaptures - - 3 - - name - beginning.punctuation.definition.list.markdown - - - name - markup.list.numbered.markdown - patterns - - - include - #block - - - include - #list_paragraph - - - while - ((^|\G)([ ]{4}|\t))|(^[ \t]*$) - - - - paragraph - - begin - (^|\G)[ ]{0,3}(?=\S) - name - meta.paragraph.markdown - patterns - - - include - #inline - - - include - text.html.basic - - - include - #heading-setext - - - while - (^|\G)((?=\s*[-=]{3,}\s*$)|[ ]{4,}(?=\S)) - - fenced_code_block_css - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(css|css.erb)(\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*$) - contentName - meta.embedded.block.css - patterns - - - include - source.css - - - - - - fenced_code_block_basic - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(html|htm|shtml|xhtml|inc|tmpl|tpl)(\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*$) - contentName - meta.embedded.block.html - patterns - - - include - text.html.basic - - - - - - fenced_code_block_ini - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(ini|conf)(\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*$) - contentName - meta.embedded.block.ini - patterns - - - include - source.ini - - - - - - fenced_code_block_java - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(java|bsh)(\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*$) - contentName - meta.embedded.block.java - patterns - - - include - source.java - - - - - - fenced_code_block_lua - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(lua)(\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*$) - contentName - meta.embedded.block.lua - patterns - - - include - source.lua - - - - - - fenced_code_block_makefile - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(Makefile|makefile|GNUmakefile|OCamlMakefile)(\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*$) - contentName - meta.embedded.block.makefile - patterns - - - include - source.makefile - - - - - - fenced_code_block_perl - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(perl|pl|pm|pod|t|PL|psgi|vcl)(\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*$) - contentName - meta.embedded.block.perl - patterns - - - include - source.perl - - - - - - fenced_code_block_r - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(R|r|s|S|Rprofile)(\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*$) - contentName - meta.embedded.block.r - patterns - - - include - source.r - - - - - - fenced_code_block_ruby - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(ruby|rb|rbx|rjs|Rakefile|rake|cgi|fcgi|gemspec|irbrc|Capfile|ru|prawn|Cheffile|Gemfile|Guardfile|Hobofile|Vagrantfile|Appraisals|Rantfile|Berksfile|Berksfile.lock|Thorfile|Puppetfile)(\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*$) - contentName - meta.embedded.block.ruby - patterns - - - include - source.ruby - - - - - - fenced_code_block_php - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(php|php3|php4|php5|phpt|phtml|aw|ctp)(\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*$) - contentName - meta.embedded.block.php - patterns - - - include - text.html.basic - - - include - text.html.php#language - - - - - - fenced_code_block_sql - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(sql|ddl|dml)(\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*$) - contentName - meta.embedded.block.sql - patterns - - - include - source.sql - - - - - - fenced_code_block_vs_net - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(vb)(\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*$) - contentName - meta.embedded.block.vs_net - patterns - - - include - source.asp.vb.net - - - - - - fenced_code_block_xml - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(xml|xsd|tld|jsp|pt|cpt|dtml|rss|opml)(\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*$) - contentName - meta.embedded.block.xml - patterns - - - include - text.xml - - - - - - fenced_code_block_xsl - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(xsl|xslt)(\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*$) - contentName - meta.embedded.block.xsl - patterns - - - include - text.xml.xsl - - - - - - fenced_code_block_yaml - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(yaml|yml)(\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*$) - contentName - meta.embedded.block.yaml - patterns - - - include - source.yaml - - - - - - fenced_code_block_dosbatch - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(bat|batch)(\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*$) - contentName - meta.embedded.block.dosbatch - patterns - - - include - source.dosbatch - - - - - - fenced_code_block_clojure - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(clj|cljs|clojure)(\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*$) - contentName - meta.embedded.block.clojure - patterns - - - include - source.clojure - - - - - - fenced_code_block_coffee - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(coffee|Cakefile|coffee.erb)(\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*$) - contentName - meta.embedded.block.coffee - patterns - - - include - source.coffee - - - - - - fenced_code_block_c - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(c|h)(\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*$) - contentName - meta.embedded.block.c - patterns - - - include - source.c - - - - - - fenced_code_block_cpp - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(cpp|c\+\+|cxx)(\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*$) - contentName - meta.embedded.block.cpp - patterns - - - include - source.cpp - - - - - - fenced_code_block_diff - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(patch|diff|rej)(\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*$) - contentName - meta.embedded.block.diff - patterns - - - include - source.diff - - - - - - fenced_code_block_dockerfile - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(dockerfile|Dockerfile)(\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*$) - contentName - meta.embedded.block.dockerfile - patterns - - - include - source.dockerfile - - - - - - fenced_code_block_git_commit - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(COMMIT_EDITMSG|MERGE_MSG)(\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*$) - contentName - meta.embedded.block.git_commit - patterns - - - include - text.git-commit - - - - - - fenced_code_block_git_rebase - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(git-rebase-todo)(\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*$) - contentName - meta.embedded.block.git_rebase - patterns - - - include - text.git-rebase - - - - - - fenced_code_block_go - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(go|golang)(\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*$) - contentName - meta.embedded.block.go - patterns - - - include - source.go - - - - - - fenced_code_block_groovy - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(groovy|gvy)(\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*$) - contentName - meta.embedded.block.groovy - patterns - - - include - source.groovy - - - - - - fenced_code_block_jade - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(jade|pug)(\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*$) - contentName - meta.embedded.block.jade - patterns - - - include - text.jade - - - - - - fenced_code_block_js - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(js|jsx|javascript|es6|mjs)(\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*$) - contentName - meta.embedded.block.javascript - patterns - - - include - source.js - - - - - - fenced_code_block_js_regexp - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(regexp)(\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*$) - contentName - meta.embedded.block.js_regexp - patterns - - - include - source.js.regexp - - - - - - fenced_code_block_json - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(json|sublime-settings|sublime-menu|sublime-keymap|sublime-mousemap|sublime-theme|sublime-build|sublime-project|sublime-completions)(\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*$) - contentName - meta.embedded.block.json - patterns - - - include - source.json - - - - - - fenced_code_block_less - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(less)(\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*$) - contentName - meta.embedded.block.less - patterns - - - include - source.css.less - - - - - - fenced_code_block_objc - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(objectivec|objective-c|mm|objc|obj-c|m|h)(\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*$) - contentName - meta.embedded.block.objc - patterns - - - include - source.objc - - - - - - fenced_code_block_scss - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(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*$) - contentName - meta.embedded.block.scss - patterns - - - include - source.css.scss - - - - - - fenced_code_block_perl6 - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(perl6|p6|pl6|pm6|nqp)(\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*$) - contentName - meta.embedded.block.perl6 - patterns - - - include - source.perl.6 - - - - - - fenced_code_block_powershell - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(powershell|ps1|psm1|psd1)(\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*$) - contentName - meta.embedded.block.powershell - patterns - - - include - source.powershell - - - - - - fenced_code_block_python - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(python|py|py3|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gyp|gypi)(\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*$) - contentName - meta.embedded.block.python - patterns - - - include - source.python - - - - - - fenced_code_block_regexp_python - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(re)(\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*$) - contentName - meta.embedded.block.regexp_python - patterns - - - include - source.regexp.python - - - - - - fenced_code_block_rust - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(rust|rs)(\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*$) - contentName - meta.embedded.block.rust - patterns - - - include - source.rust - - - - - - fenced_code_block_scala - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(scala|sbt)(\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*$) - contentName - meta.embedded.block.scala - patterns - - - include - source.scala - - - - - - fenced_code_block_shell - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(shell|sh|bash|zsh|bashrc|bash_profile|bash_login|profile|bash_logout|.textmate_init)(\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*$) - contentName - meta.embedded.block.shellscript - patterns - - - include - source.shell - - - - - - fenced_code_block_ts - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(typescript|ts)(\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*$) - contentName - meta.embedded.block.typescript - patterns - - - include - source.ts - - - - - - fenced_code_block_tsx - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(tsx)(\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*$) - contentName - meta.embedded.block.typescriptreact - patterns - - - include - source.tsx - - - - - - fenced_code_block_csharp - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(cs|csharp|c#)(\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*$) - contentName - meta.embedded.block.csharp - patterns - - - include - source.cs - - - - - - fenced_code_block_fsharp - - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?i:(fs|fsharp|f#)(\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*$) - contentName - meta.embedded.block.fsharp - patterns - - - include - source.fsharp - - - - - - fenced_code_block_unknown - - name - markup.fenced_code.block.markdown - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?=([^`~]*)?$) - end - (^|\G)(\2|\s{0,3})(\3)\s*$ - beginCaptures - - 3 - - name - punctuation.definition.markdown - - 4 - - name - fenced_code.block.language - - - endCaptures - - 3 - - name - punctuation.definition.markdown - - - - raw_block - - begin - (^|\G)([ ]{4}|\t) - name - markup.raw.block.markdown - while - (^|\G)([ ]{4}|\t) - - separator - - match - (^|\G)[ ]{0,3}([*-_])([ ]{0,2}\2){2,}[ \t]*$\n? - name - meta.separator.markdown - - - - inline - - patterns - - - include - #ampersand - - - include - #bracket - - - include - #bold - - - include - #italic - - - include - #raw - - - include - #escape - - - include - #image-inline - - - include - #image-ref - - - include - #link-email - - - include - #link-inet - - - include - #link-inline - - - include - #link-ref - - - include - #link-ref-literal - - - repository - - ampersand - - comment - - Markdown will convert this for us. We match it so that the - HTML grammar will not mark it up as invalid. - - match - &(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);) - name - meta.other.valid-ampersand.markdown - - bold - - begin - (?x) - (\*\*|__)(?=\S) # Open - (?= - ( - <[^>]*+> # HTML tags - | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw> - # Raw - | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes - | \[ - ( - (?<square> # Named group - [^\[\]\\] # Match most chars - | \\. # Escaped chars - | \[ \g<square>*+ \] # Nested brackets - )*+ - \] - ( - ( # Reference Link - [ ]? # Optional space - \[[^\]]*+\] # Ref name - ) - | ( # Inline Link - \( # Opening paren - [ \t]*+ # Optional whitespace - <?(.*?)>? # URL - [ \t]*+ # Optional whitespace - ( # Optional Title - (?<title>['"]) - (.*?) - \k<title> - )? - \) - ) - ) - ) - | (?!(?<=\S)\1). # Everything besides - # style closer - )++ - (?<=\S)\1 # Close - ) - - captures - - 1 - - name - punctuation.definition.bold.markdown - - - end - (?<=\S)(\1) - name - markup.bold.markdown - patterns - - - applyEndPatternLast - 1 - begin - (?=<[^>]*?>) - end - (?<=>) - patterns - - - include - text.html.basic - - - - - include - #escape - - - include - #ampersand - - - include - #bracket - - - include - #raw - - - include - #italic - - - include - #image-inline - - - include - #link-inline - - - include - #link-inet - - - include - #link-email - - - include - #image-ref - - - include - #link-ref-literal - - - include - #link-ref - - - - bracket - - comment - - Markdown will convert this for us. We match it so that the - HTML grammar will not mark it up as invalid. - - match - <(?![a-z/?\$!]) - name - meta.other.valid-bracket.markdown - - escape - - match - \\[-`*_#+.!(){}\[\]\\>] - name - constant.character.escape.markdown - - image-inline - - captures - - 1 - - name - punctuation.definition.string.begin.markdown - - 9 - - name - string.other.link.description.title.markdown - - 10 - - name - punctuation.definition.string.markdown - - 11 - - name - punctuation.definition.string.markdown - - 12 - - name - string.other.link.description.title.markdown - - 13 - - name - punctuation.definition.string.markdown - - 14 - - name - punctuation.definition.string.markdown - - 15 - - name - punctuation.definition.metadata.markdown - - 2 - - name - string.other.link.description.markdown - - 4 - - name - punctuation.definition.string.end.markdown - - 5 - - name - punctuation.definition.metadata.markdown - - 6 - - name - punctuation.definition.link.markdown - - 7 - - name - markup.underline.link.image.markdown - - 8 - - name - punctuation.definition.link.markdown - - - match - (?x: - (\!\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\]) - # Match the link text. - (\() # Opening paren for url - (<?)(\S+?)(>?) # The url - [ \t]* # Optional whitespace - (?: - ((\().+?(\))) # Match title in parens… - | ((").+?(")) # or in quotes. - )? # Title is optional - \s* # Optional whitespace - (\)) - ) - name - meta.image.inline.markdown - - image-ref - - captures - - 1 - - name - punctuation.definition.string.begin.markdown - - 2 - - name - string.other.link.description.markdown - - 4 - - name - punctuation.definition.string.begin.markdown - - 5 - - name - punctuation.definition.constant.markdown - - 6 - - name - constant.other.reference.link.markdown - - 7 - - name - punctuation.definition.constant.markdown - - - match - (\!\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(.*?)(\]) - name - meta.image.reference.markdown - - italic - - begin - (?x) - \b(\*|_)(?=\S) # Open - (?= - ( - <[^>]*+> # HTML tags - | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw> - # Raw - | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes - | \[ - ( - (?<square> # Named group - [^\[\]\\] # Match most chars - | \\. # Escaped chars - | \[ \g<square>*+ \] # Nested brackets - )*+ - \] - ( - ( # Reference Link - [ ]? # Optional space - \[[^\]]*+\] # Ref name - ) - | ( # Inline Link - \( # Opening paren - [ \t]*+ # Optional whtiespace - <?(.*?)>? # URL - [ \t]*+ # Optional whtiespace - ( # Optional Title - (?<title>['"]) - (.*?) - \k<title> - )? - \) - ) - ) - ) - | \1\1 # Must be bold closer - | (?!(?<=\S)\1). # Everything besides - # style closer - )++ - (?<=\S)\1 # Close - ) - - captures - - 1 - - name - punctuation.definition.italic.markdown - - - end - (?<=\S)(\1)((?!\1)|(?=\1\1))\b - name - markup.italic.markdown - patterns - - - applyEndPatternLast - 1 - begin - (?=<[^>]*?>) - end - (?<=>) - patterns - - - include - text.html.basic - - - - - include - #escape - - - include - #ampersand - - - include - #bracket - - - include - #raw - - - include - #bold - - - include - #image-inline - - - include - #link-inline - - - include - #link-inet - - - include - #link-email - - - include - #image-ref - - - include - #link-ref-literal - - - include - #link-ref - - - - link-email - - captures - - 1 - - name - punctuation.definition.link.markdown - - 2 - - name - markup.underline.link.markdown - - 4 - - name - punctuation.definition.link.markdown - - - match - (<)((?:mailto:)?[-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(>) - name - meta.link.email.lt-gt.markdown - - link-inet - - captures - - 1 - - name - punctuation.definition.link.markdown - - 2 - - name - markup.underline.link.markdown - - 3 - - name - punctuation.definition.link.markdown - - - match - (<)((?:https?|ftp)://.*?)(>) - name - meta.link.inet.markdown - - link-inline - - captures - - 1 - - name - punctuation.definition.string.begin.markdown - - 9 - - name - string.other.link.description.title.markdown - - 10 - - name - punctuation.definition.string.begin.markdown - - 11 - - name - punctuation.definition.string.end.markdown - - 12 - - name - string.other.link.description.title.markdown - - 13 - - name - punctuation.definition.string.begin.markdown - - 14 - - name - punctuation.definition.string.end.markdown - - 15 - - name - punctuation.definition.metadata.markdown - - 2 - - name - string.other.link.title.markdown - - 4 - - name - punctuation.definition.string.end.markdown - - 5 - - name - punctuation.definition.metadata.markdown - - 6 - - name - punctuation.definition.link.markdown - - 7 - - name - markup.underline.link.markdown - - 8 - - name - punctuation.definition.link.markdown - - - match - (?x: - (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\]) - # Match the link text. - (\() # Opening paren for url - (<?)(.*?)(>?) # The url - [ \t]* # Optional whitespace - (?: - ((\().+?(\))) # Match title in parens… - | ((").+?(")) # or in quotes. - )? # Title is optional - \s* # Optional whitespace - (\)) - ) - name - meta.link.inline.markdown - - link-ref - - captures - - 1 - - name - punctuation.definition.string.begin.markdown - - 2 - - name - string.other.link.title.markdown - - 4 - - name - punctuation.definition.string.end.markdown - - 5 - - name - punctuation.definition.constant.begin.markdown - - 6 - - name - constant.other.reference.link.markdown - - 7 - - name - punctuation.definition.constant.end.markdown - - - match - (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])(\[)([^\]]*+)(\]) - name - meta.link.reference.markdown - - link-ref-literal - - captures - - 1 - - name - punctuation.definition.string.begin.markdown - - 2 - - name - string.other.link.title.markdown - - 4 - - name - punctuation.definition.string.end.markdown - - 5 - - name - punctuation.definition.constant.begin.markdown - - 6 - - name - punctuation.definition.constant.end.markdown - - - match - (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(\]) - name - meta.link.reference.literal.markdown - - raw - - captures - - 1 - - name - punctuation.definition.raw.markdown - - 3 - - name - punctuation.definition.raw.markdown - - - match - (`+)([^`]|(?!(?<!`)\1(?!`))`)*+(\1) - name - markup.inline.raw.string.markdown - - - - frontMatter - - contentName - meta.embedded.block.frontmatter - begin - \A-{3}\s*$ - while - ^(?!(-{3}|\.{3})\s*$) - patterns - - - include - source.yaml - - - - - scopeName - text.html.markdown - uuid - 0A1D9874-B448-11D9-BD50-000D93B6E43C - - diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage.base b/extensions/markdown/syntaxes/markdown.tmLanguage.base deleted file mode 100644 index 442b45acce8..00000000000 --- a/extensions/markdown/syntaxes/markdown.tmLanguage.base +++ /dev/null @@ -1,1192 +0,0 @@ - - - - - fileTypes - - md - mdown - markdown - markdn - - keyEquivalent - ^~M - name - Markdown - patterns - - - include - #frontMatter - - - include - #block - - - repository - - block - - patterns - - - include - #separator - - - include - #heading - - - include - #blockquote - - - include - #lists - -{{languageIncludes}} - - include - #fenced_code_block_unknown - - - include - #raw_block - - - include - #link-def - - - include - #html - - - include - #paragraph - - - repository - - blockquote - - begin - (^|\G)[ ]{0,3}(>) ? - captures - - 2 - - name - beginning.punctuation.definition.quote.markdown - - - name - markup.quote.markdown - patterns - - - include - #block - - - while - (^|\G)\s*(>) ? - - heading - - begin - (?:^|\G)[ ]{0,3}(#{1,6})\s*(?=[\S[^#]]) - captures - - 1 - - name - punctuation.definition.heading.markdown - - - contentName - entity.name.section.markdown - end - \s*(#{1,6})?$\n? - name - markup.heading.markdown - patterns - - - include - #inline - - - - heading-setext - - patterns - - - match - ^(={3,})(?=[ \t]*$\n?) - name - markup.heading.setext.1.markdown - - - match - ^(-{3,})(?=[ \t]*$\n?) - name - markup.heading.setext.2.markdown - - - - html - - patterns - - - begin - (^|\G)\s*(<!--) - end - (-->) - name - comment.block.html - captures - - 1 - - name - punctuation.definition.comment.html - - 2 - - name - punctuation.definition.comment.html - - - - - begin - (^|\G)\s*(?=<(script|style|pre)(\s|$|>)(?!.*?</(script|style|pre)>)) - patterns - - - begin - (\s*|$) - patterns - - - include - text.html.basic - - - while - ^(?!.*</(script|style|pre)>) - - - end - (?=.*</(script|style|pre)>) - - - begin - (^|\G)\s*(?=</?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(\s|$|/?>)) - patterns - - - include - text.html.basic - - - while - ^(?!\s*$) - - - begin - (^|\G)\s*(?=(<[a-zA-Z0-9\-](/?>|\s.*?>)|</[a-zA-Z0-9\-]>)\s*$) - patterns - - - include - text.html.basic - - - while - ^(?!\s*$) - - - - link-def - - captures - - 1 - - name - punctuation.definition.constant.markdown - - 10 - - name - punctuation.definition.string.end.markdown - - 11 - - name - string.other.link.description.title.markdown - - 12 - - name - punctuation.definition.string.begin.markdown - - 13 - - name - punctuation.definition.string.end.markdown - - 2 - - name - constant.other.reference.link.markdown - - 3 - - name - punctuation.definition.constant.markdown - - 4 - - name - punctuation.separator.key-value.markdown - - 5 - - name - punctuation.definition.link.markdown - - 6 - - name - markup.underline.link.markdown - - 7 - - name - punctuation.definition.link.markdown - - 8 - - name - string.other.link.description.title.markdown - - 9 - - name - punctuation.definition.string.begin.markdown - - - match - ^(?x: - \s* # Leading whitespace - (\[)(.+?)(\])(:) # Reference name - [ \t]* # Optional whitespace - (<?)(\S+?)(>?) # The url - [ \t]* # Optional whitespace - (?: - ((\().+?(\))) # Match title in quotes… - | ((").+?(")) # or in parens. - )? # Title is optional - \s* # Optional whitespace - $ - ) - name - meta.link.reference.def.markdown - - list_paragraph - - begin - (^|\G)(?=\S)(?![*+->]\s|[0-9]+\.\s) - name - meta.paragraph.markdown - patterns - - - include - #inline - - - include - text.html.basic - - - include - #heading-setext - - - while - (^|\G)(?!\s*$|#|[ ]{0,3}([-*_>][ ]{2,}){3,}[ \t]*$\n?|[ ]{0,3}[*+->]|[ ]{0,3}[0-9]+\.) - - lists - - patterns - - - begin - (^|\G)([ ]{0,3})([*+-])([ ]{1,3}|\t) - beginCaptures - - 3 - - name - beginning.punctuation.definition.list.markdown - - - comment - Currently does not support un-indented second lines. - name - markup.list.unnumbered.markdown - patterns - - - include - #block - - - include - #list_paragraph - - - while - ((^|\G)([ ]{4}|\t))|(^[ \t]*$) - - - begin - (^|\G)([ ]{0,3})([0-9]+\.)([ ]{1,3}|\t) - beginCaptures - - 3 - - name - beginning.punctuation.definition.list.markdown - - - name - markup.list.numbered.markdown - patterns - - - include - #block - - - include - #list_paragraph - - - while - ((^|\G)([ ]{4}|\t))|(^[ \t]*$) - - - - paragraph - - begin - (^|\G)[ ]{0,3}(?=\S) - name - meta.paragraph.markdown - patterns - - - include - #inline - - - include - text.html.basic - - - include - #heading-setext - - - while - (^|\G)((?=\s*[-=]{3,}\s*$)|[ ]{4,}(?=\S)) - -{{languageDefinitions}} - fenced_code_block_unknown - - name - markup.fenced_code.block.markdown - begin - (^|\G)(\s*)(`{3,}|~{3,})\s*(?=([^`~]*)?$) - end - (^|\G)(\2|\s{0,3})(\3)\s*$ - beginCaptures - - 3 - - name - punctuation.definition.markdown - - 4 - - name - fenced_code.block.language - - - endCaptures - - 3 - - name - punctuation.definition.markdown - - - - raw_block - - begin - (^|\G)([ ]{4}|\t) - name - markup.raw.block.markdown - while - (^|\G)([ ]{4}|\t) - - separator - - match - (^|\G)[ ]{0,3}([*-_])([ ]{0,2}\2){2,}[ \t]*$\n? - name - meta.separator.markdown - - - - inline - - patterns - - - include - #ampersand - - - include - #bracket - - - include - #bold - - - include - #italic - - - include - #raw - - - include - #escape - - - include - #image-inline - - - include - #image-ref - - - include - #link-email - - - include - #link-inet - - - include - #link-inline - - - include - #link-ref - - - include - #link-ref-literal - - - repository - - ampersand - - comment - - Markdown will convert this for us. We match it so that the - HTML grammar will not mark it up as invalid. - - match - &(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);) - name - meta.other.valid-ampersand.markdown - - bold - - begin - (?x) - (\*\*|__)(?=\S) # Open - (?= - ( - <[^>]*+> # HTML tags - | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw> - # Raw - | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes - | \[ - ( - (?<square> # Named group - [^\[\]\\] # Match most chars - | \\. # Escaped chars - | \[ \g<square>*+ \] # Nested brackets - )*+ - \] - ( - ( # Reference Link - [ ]? # Optional space - \[[^\]]*+\] # Ref name - ) - | ( # Inline Link - \( # Opening paren - [ \t]*+ # Optional whitespace - <?(.*?)>? # URL - [ \t]*+ # Optional whitespace - ( # Optional Title - (?<title>['"]) - (.*?) - \k<title> - )? - \) - ) - ) - ) - | (?!(?<=\S)\1). # Everything besides - # style closer - )++ - (?<=\S)\1 # Close - ) - - captures - - 1 - - name - punctuation.definition.bold.markdown - - - end - (?<=\S)(\1) - name - markup.bold.markdown - patterns - - - applyEndPatternLast - 1 - begin - (?=<[^>]*?>) - end - (?<=>) - patterns - - - include - text.html.basic - - - - - include - #escape - - - include - #ampersand - - - include - #bracket - - - include - #raw - - - include - #italic - - - include - #image-inline - - - include - #link-inline - - - include - #link-inet - - - include - #link-email - - - include - #image-ref - - - include - #link-ref-literal - - - include - #link-ref - - - - bracket - - comment - - Markdown will convert this for us. We match it so that the - HTML grammar will not mark it up as invalid. - - match - <(?![a-z/?\$!]) - name - meta.other.valid-bracket.markdown - - escape - - match - \\[-`*_#+.!(){}\[\]\\>] - name - constant.character.escape.markdown - - image-inline - - captures - - 1 - - name - punctuation.definition.string.begin.markdown - - 9 - - name - string.other.link.description.title.markdown - - 10 - - name - punctuation.definition.string.markdown - - 11 - - name - punctuation.definition.string.markdown - - 12 - - name - string.other.link.description.title.markdown - - 13 - - name - punctuation.definition.string.markdown - - 14 - - name - punctuation.definition.string.markdown - - 15 - - name - punctuation.definition.metadata.markdown - - 2 - - name - string.other.link.description.markdown - - 4 - - name - punctuation.definition.string.end.markdown - - 5 - - name - punctuation.definition.metadata.markdown - - 6 - - name - punctuation.definition.link.markdown - - 7 - - name - markup.underline.link.image.markdown - - 8 - - name - punctuation.definition.link.markdown - - - match - (?x: - (\!\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\]) - # Match the link text. - (\() # Opening paren for url - (<?)(\S+?)(>?) # The url - [ \t]* # Optional whitespace - (?: - ((\().+?(\))) # Match title in parens… - | ((").+?(")) # or in quotes. - )? # Title is optional - \s* # Optional whitespace - (\)) - ) - name - meta.image.inline.markdown - - image-ref - - captures - - 1 - - name - punctuation.definition.string.begin.markdown - - 2 - - name - string.other.link.description.markdown - - 4 - - name - punctuation.definition.string.begin.markdown - - 5 - - name - punctuation.definition.constant.markdown - - 6 - - name - constant.other.reference.link.markdown - - 7 - - name - punctuation.definition.constant.markdown - - - match - (\!\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(.*?)(\]) - name - meta.image.reference.markdown - - italic - - begin - (?x) - \b(\*|_)(?=\S) # Open - (?= - ( - <[^>]*+> # HTML tags - | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw> - # Raw - | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes - | \[ - ( - (?<square> # Named group - [^\[\]\\] # Match most chars - | \\. # Escaped chars - | \[ \g<square>*+ \] # Nested brackets - )*+ - \] - ( - ( # Reference Link - [ ]? # Optional space - \[[^\]]*+\] # Ref name - ) - | ( # Inline Link - \( # Opening paren - [ \t]*+ # Optional whtiespace - <?(.*?)>? # URL - [ \t]*+ # Optional whtiespace - ( # Optional Title - (?<title>['"]) - (.*?) - \k<title> - )? - \) - ) - ) - ) - | \1\1 # Must be bold closer - | (?!(?<=\S)\1). # Everything besides - # style closer - )++ - (?<=\S)\1 # Close - ) - - captures - - 1 - - name - punctuation.definition.italic.markdown - - - end - (?<=\S)(\1)((?!\1)|(?=\1\1))\b - name - markup.italic.markdown - patterns - - - applyEndPatternLast - 1 - begin - (?=<[^>]*?>) - end - (?<=>) - patterns - - - include - text.html.basic - - - - - include - #escape - - - include - #ampersand - - - include - #bracket - - - include - #raw - - - include - #bold - - - include - #image-inline - - - include - #link-inline - - - include - #link-inet - - - include - #link-email - - - include - #image-ref - - - include - #link-ref-literal - - - include - #link-ref - - - - link-email - - captures - - 1 - - name - punctuation.definition.link.markdown - - 2 - - name - markup.underline.link.markdown - - 4 - - name - punctuation.definition.link.markdown - - - match - (<)((?:mailto:)?[-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(>) - name - meta.link.email.lt-gt.markdown - - link-inet - - captures - - 1 - - name - punctuation.definition.link.markdown - - 2 - - name - markup.underline.link.markdown - - 3 - - name - punctuation.definition.link.markdown - - - match - (<)((?:https?|ftp)://.*?)(>) - name - meta.link.inet.markdown - - link-inline - - captures - - 1 - - name - punctuation.definition.string.begin.markdown - - 9 - - name - string.other.link.description.title.markdown - - 10 - - name - punctuation.definition.string.begin.markdown - - 11 - - name - punctuation.definition.string.end.markdown - - 12 - - name - string.other.link.description.title.markdown - - 13 - - name - punctuation.definition.string.begin.markdown - - 14 - - name - punctuation.definition.string.end.markdown - - 15 - - name - punctuation.definition.metadata.markdown - - 2 - - name - string.other.link.title.markdown - - 4 - - name - punctuation.definition.string.end.markdown - - 5 - - name - punctuation.definition.metadata.markdown - - 6 - - name - punctuation.definition.link.markdown - - 7 - - name - markup.underline.link.markdown - - 8 - - name - punctuation.definition.link.markdown - - - match - (?x: - (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\]) - # Match the link text. - (\() # Opening paren for url - (<?)(.*?)(>?) # The url - [ \t]* # Optional whitespace - (?: - ((\().+?(\))) # Match title in parens… - | ((").+?(")) # or in quotes. - )? # Title is optional - \s* # Optional whitespace - (\)) - ) - name - meta.link.inline.markdown - - link-ref - - captures - - 1 - - name - punctuation.definition.string.begin.markdown - - 2 - - name - string.other.link.title.markdown - - 4 - - name - punctuation.definition.string.end.markdown - - 5 - - name - punctuation.definition.constant.begin.markdown - - 6 - - name - constant.other.reference.link.markdown - - 7 - - name - punctuation.definition.constant.end.markdown - - - match - (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])(\[)([^\]]*+)(\]) - name - meta.link.reference.markdown - - link-ref-literal - - captures - - 1 - - name - punctuation.definition.string.begin.markdown - - 2 - - name - string.other.link.title.markdown - - 4 - - name - punctuation.definition.string.end.markdown - - 5 - - name - punctuation.definition.constant.begin.markdown - - 6 - - name - punctuation.definition.constant.end.markdown - - - match - (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(\]) - name - meta.link.reference.literal.markdown - - raw - - captures - - 1 - - name - punctuation.definition.raw.markdown - - 3 - - name - punctuation.definition.raw.markdown - - - match - (`+)([^`]|(?!(?<!`)\1(?!`))`)*+(\1) - name - markup.inline.raw.string.markdown - - - - frontMatter - - contentName - meta.embedded.block.frontmatter - begin - \A-{3}\s*$ - while - ^(?!(-{3}|\.{3})\s*$) - patterns - - - include - source.yaml - - - - - scopeName - text.html.markdown - uuid - 0A1D9874-B448-11D9-BD50-000D93B6E43C - - diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage.json b/extensions/markdown/syntaxes/markdown.tmLanguage.json new file mode 100644 index 00000000000..957f09e64fc --- /dev/null +++ b/extensions/markdown/syntaxes/markdown.tmLanguage.json @@ -0,0 +1,2278 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/microsoft/vscode-markdown-tm-grammar/blob/master/syntaxes/markdown.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." + ], + "version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/1ba9efd21c29c70dd87d8402a92ef64666dcb25e", + "fileTypes": [ + "md", + "mdown", + "markdown", + "markdn" + ], + "keyEquivalent": "^~M", + "name": "Markdown", + "patterns": [ + { + "include": "#frontMatter" + }, + { + "include": "#block" + } + ], + "repository": { + "block": { + "patterns": [ + { + "include": "#separator" + }, + { + "include": "#heading" + }, + { + "include": "#blockquote" + }, + { + "include": "#lists" + }, + { + "include": "#fenced_code_block_css" + }, + { + "include": "#fenced_code_block_basic" + }, + { + "include": "#fenced_code_block_ini" + }, + { + "include": "#fenced_code_block_java" + }, + { + "include": "#fenced_code_block_lua" + }, + { + "include": "#fenced_code_block_makefile" + }, + { + "include": "#fenced_code_block_perl" + }, + { + "include": "#fenced_code_block_r" + }, + { + "include": "#fenced_code_block_ruby" + }, + { + "include": "#fenced_code_block_php" + }, + { + "include": "#fenced_code_block_sql" + }, + { + "include": "#fenced_code_block_vs_net" + }, + { + "include": "#fenced_code_block_xml" + }, + { + "include": "#fenced_code_block_xsl" + }, + { + "include": "#fenced_code_block_yaml" + }, + { + "include": "#fenced_code_block_dosbatch" + }, + { + "include": "#fenced_code_block_clojure" + }, + { + "include": "#fenced_code_block_coffee" + }, + { + "include": "#fenced_code_block_c" + }, + { + "include": "#fenced_code_block_cpp" + }, + { + "include": "#fenced_code_block_diff" + }, + { + "include": "#fenced_code_block_dockerfile" + }, + { + "include": "#fenced_code_block_git_commit" + }, + { + "include": "#fenced_code_block_git_rebase" + }, + { + "include": "#fenced_code_block_go" + }, + { + "include": "#fenced_code_block_groovy" + }, + { + "include": "#fenced_code_block_jade" + }, + { + "include": "#fenced_code_block_js" + }, + { + "include": "#fenced_code_block_js_regexp" + }, + { + "include": "#fenced_code_block_json" + }, + { + "include": "#fenced_code_block_less" + }, + { + "include": "#fenced_code_block_objc" + }, + { + "include": "#fenced_code_block_scss" + }, + { + "include": "#fenced_code_block_perl6" + }, + { + "include": "#fenced_code_block_powershell" + }, + { + "include": "#fenced_code_block_python" + }, + { + "include": "#fenced_code_block_regexp_python" + }, + { + "include": "#fenced_code_block_rust" + }, + { + "include": "#fenced_code_block_scala" + }, + { + "include": "#fenced_code_block_shell" + }, + { + "include": "#fenced_code_block_ts" + }, + { + "include": "#fenced_code_block_tsx" + }, + { + "include": "#fenced_code_block_csharp" + }, + { + "include": "#fenced_code_block_fsharp" + }, + { + "include": "#fenced_code_block_unknown" + }, + { + "include": "#raw_block" + }, + { + "include": "#link-def" + }, + { + "include": "#html" + }, + { + "include": "#paragraph" + } + ], + "repository": { + "blockquote": { + "begin": "(^|\\G)[ ]{0,3}(>) ?", + "captures": { + "2": { + "name": "beginning.punctuation.definition.quote.markdown" + } + }, + "name": "markup.quote.markdown", + "patterns": [ + { + "include": "#block" + } + ], + "while": "(^|\\G)\\s*(>) ?" + }, + "fenced_code_block_unknown": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?=([^`~]*)?$)", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language" + } + }, + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "name": "markup.fenced_code.block.markdown" + }, + "heading": { + "begin": "(?:^|\\G)[ ]{0,3}(#{1,6})\\s*(?=[\\S[^#]])", + "captures": { + "1": { + "name": "punctuation.definition.heading.markdown" + } + }, + "contentName": "entity.name.section.markdown", + "end": "\\s*(#{1,6})?$\\n?", + "name": "markup.heading.markdown", + "patterns": [ + { + "include": "#inline" + } + ] + }, + "heading-setext": { + "patterns": [ + { + "match": "^(={3,})(?=[ \\t]*$\\n?)", + "name": "markup.heading.setext.1.markdown" + }, + { + "match": "^(-{3,})(?=[ \\t]*$\\n?)", + "name": "markup.heading.setext.2.markdown" + } + ] + }, + "html": { + "patterns": [ + { + "begin": "(^|\\G)\\s*()", + "name": "comment.block.html" + }, + { + "begin": "(^|\\G)\\s*(?=<(script|style|pre)(\\s|$|>)(?!.*?))", + "end": "(?=.*)", + "patterns": [ + { + "begin": "(\\s*|$)", + "patterns": [ + { + "include": "text.html.basic" + } + ], + "while": "^(?!.*)" + } + ] + }, + { + "begin": "(^|\\G)\\s*(?=))", + "patterns": [ + { + "include": "text.html.basic" + } + ], + "while": "^(?!\\s*$)" + }, + { + "begin": "(^|\\G)\\s*(?=(<[a-zA-Z0-9\\-](/?>|\\s.*?>)|)\\s*$)", + "patterns": [ + { + "include": "text.html.basic" + } + ], + "while": "^(?!\\s*$)" + } + ] + }, + "link-def": { + "captures": { + "1": { + "name": "punctuation.definition.constant.markdown" + }, + "2": { + "name": "constant.other.reference.link.markdown" + }, + "3": { + "name": "punctuation.definition.constant.markdown" + }, + "4": { + "name": "punctuation.separator.key-value.markdown" + }, + "5": { + "name": "punctuation.definition.link.markdown" + }, + "6": { + "name": "markup.underline.link.markdown" + }, + "7": { + "name": "punctuation.definition.link.markdown" + }, + "8": { + "name": "string.other.link.description.title.markdown" + }, + "9": { + "name": "punctuation.definition.string.begin.markdown" + }, + "10": { + "name": "punctuation.definition.string.end.markdown" + }, + "11": { + "name": "string.other.link.description.title.markdown" + }, + "12": { + "name": "punctuation.definition.string.begin.markdown" + }, + "13": { + "name": "punctuation.definition.string.end.markdown" + } + }, + "match": "^(?x:\n \\s*\t\t\t\t\t\t# Leading whitespace\n (\\[)(.+?)(\\])(:)\t\t# Reference name\n [ \\t]*\t\t\t\t\t# Optional whitespace\n (?)\t\t\t# The url\n [ \\t]*\t\t\t\t\t# Optional whitespace\n (?:\n ((\\().+?(\\)))\t\t# Match title in quotes…\n | ((\").+?(\"))\t\t# or in parens.\n )?\t\t\t\t\t\t# Title is optional\n \\s*\t\t\t\t\t\t# Optional whitespace\n $\n)\n", + "name": "meta.link.reference.def.markdown" + }, + "list_paragraph": { + "begin": "(^|\\G)(?=\\S)(?![*+->]\\s|[0-9]+\\.\\s)", + "name": "meta.paragraph.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.basic" + }, + { + "include": "#heading-setext" + } + ], + "while": "(^|\\G)(?!\\s*$|#|[ ]{0,3}([-*_>][ ]{2,}){3,}[ \\t]*$\\n?|[ ]{0,3}[*+->]|[ ]{0,3}[0-9]+\\.)" + }, + "lists": { + "patterns": [ + { + "begin": "(^|\\G)([ ]{0,3})([*+-])([ ]{1,3}|\\t)", + "beginCaptures": { + "3": { + "name": "beginning.punctuation.definition.list.markdown" + } + }, + "comment": "Currently does not support un-indented second lines.", + "name": "markup.list.unnumbered.markdown", + "patterns": [ + { + "include": "#block" + }, + { + "include": "#list_paragraph" + } + ], + "while": "((^|\\G)([ ]{4}|\\t))|(^[ \\t]*$)" + }, + { + "begin": "(^|\\G)([ ]{0,3})([0-9]+\\.)([ ]{1,3}|\\t)", + "beginCaptures": { + "3": { + "name": "beginning.punctuation.definition.list.markdown" + } + }, + "name": "markup.list.numbered.markdown", + "patterns": [ + { + "include": "#block" + }, + { + "include": "#list_paragraph" + } + ], + "while": "((^|\\G)([ ]{4}|\\t))|(^[ \\t]*$)" + } + ] + }, + "paragraph": { + "begin": "(^|\\G)[ ]{0,3}(?=\\S)", + "name": "meta.paragraph.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.basic" + }, + { + "include": "#heading-setext" + } + ], + "while": "(^|\\G)((?=\\s*[-=]{3,}\\s*$)|[ ]{4,}(?=\\S))" + }, + "raw_block": { + "begin": "(^|\\G)([ ]{4}|\\t)", + "name": "markup.raw.block.markdown", + "while": "(^|\\G)([ ]{4}|\\t)" + }, + "separator": { + "match": "(^|\\G)[ ]{0,3}([*-_])([ ]{0,2}\\2){2,}[ \\t]*$\\n?", + "name": "meta.separator.markdown" + } + } + }, + "frontMatter": { + "begin": "\\A-{3}\\s*$", + "contentName": "meta.embedded.block.frontmatter", + "patterns": [ + { + "include": "source.yaml" + } + ], + "while": "^(?!(-{3}|\\.{3})\\s*$)" + }, + "inline": { + "patterns": [ + { + "include": "#ampersand" + }, + { + "include": "#bracket" + }, + { + "include": "#bold" + }, + { + "include": "#italic" + }, + { + "include": "#raw" + }, + { + "include": "#escape" + }, + { + "include": "#image-inline" + }, + { + "include": "#image-ref" + }, + { + "include": "#link-email" + }, + { + "include": "#link-inet" + }, + { + "include": "#link-inline" + }, + { + "include": "#link-ref" + }, + { + "include": "#link-ref-literal" + } + ], + "repository": { + "ampersand": { + "comment": "Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.", + "match": "&(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);)", + "name": "meta.other.valid-ampersand.markdown" + }, + "bold": { + "begin": "(?x)\n (\\*\\*|__)(?=\\S)\t\t\t\t\t\t\t\t# Open\n (?=\n (\n <[^>]*+>\t\t\t\t\t\t\t# HTML tags\n | (?`+)([^`]|(?!(?(?!`))`)*+\\k\n # Raw\n | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+\t\t\t# Escapes\n | \\[\n (\n (?\t\t\t\t\t# Named group\n [^\\[\\]\\\\]\t\t\t\t# Match most chars\n | \\\\.\t\t\t\t\t\t# Escaped chars\n | \\[ \\g*+ \\]\t\t# Nested brackets\n )*+\n \\]\n (\n (\t\t\t\t\t\t\t# Reference Link\n [ ]?\t\t\t\t\t# Optional space\n \\[[^\\]]*+\\]\t\t\t\t# Ref name\n )\n | (\t\t\t\t\t\t\t# Inline Link\n \\(\t\t\t\t\t\t# Opening paren\n [ \\t]*+\t\t\t\t# Optional whitespace\n ?\t\t\t# URL\n [ \\t]*+\t\t\t\t# Optional whitespace\n (\t\t\t\t\t# Optional Title\n (?['\"])\n (.*?)\n \\k<title>\n )?\n \\)\n )\n )\n )\n | (?!(?<=\\S)\\1).\t\t\t\t\t\t# Everything besides\n # style closer\n )++\n (?<=\\S)\\1\t\t\t\t\t\t\t\t# Close\n )\n", + "captures": { + "1": { + "name": "punctuation.definition.bold.markdown" + } + }, + "end": "(?<=\\S)(\\1)", + "name": "markup.bold.markdown", + "patterns": [ + { + "applyEndPatternLast": 1, + "begin": "(?=<[^>]*?>)", + "end": "(?<=>)", + "patterns": [ + { + "include": "text.html.basic" + } + ] + }, + { + "include": "#escape" + }, + { + "include": "#ampersand" + }, + { + "include": "#bracket" + }, + { + "include": "#raw" + }, + { + "include": "#italic" + }, + { + "include": "#image-inline" + }, + { + "include": "#link-inline" + }, + { + "include": "#link-inet" + }, + { + "include": "#link-email" + }, + { + "include": "#image-ref" + }, + { + "include": "#link-ref-literal" + }, + { + "include": "#link-ref" + } + ] + }, + "bracket": { + "comment": "Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.", + "match": "<(?![a-z/?\\$!])", + "name": "meta.other.valid-bracket.markdown" + }, + "escape": { + "match": "\\\\[-`*_#+.!(){}\\[\\]\\\\>]", + "name": "constant.character.escape.markdown" + }, + "image-inline": { + "captures": { + "1": { + "name": "punctuation.definition.string.begin.markdown" + }, + "2": { + "name": "string.other.link.description.markdown" + }, + "4": { + "name": "punctuation.definition.string.end.markdown" + }, + "5": { + "name": "punctuation.definition.metadata.markdown" + }, + "6": { + "name": "punctuation.definition.link.markdown" + }, + "7": { + "name": "markup.underline.link.image.markdown" + }, + "8": { + "name": "punctuation.definition.link.markdown" + }, + "9": { + "name": "string.other.link.description.title.markdown" + }, + "10": { + "name": "punctuation.definition.string.markdown" + }, + "11": { + "name": "punctuation.definition.string.markdown" + }, + "12": { + "name": "string.other.link.description.title.markdown" + }, + "13": { + "name": "punctuation.definition.string.markdown" + }, + "14": { + "name": "punctuation.definition.string.markdown" + }, + "15": { + "name": "punctuation.definition.metadata.markdown" + } + }, + "match": "(?x:\n (\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\()\t\t\t\t\t\t# Opening paren for url\n (<?)(\\S+?)(>?)\t\t\t# The url\n [ \\t]*\t\t\t\t\t# Optional whitespace\n (?:\n ((\\().+?(\\)))\t\t# Match title in parens…\n | ((\").+?(\"))\t\t# or in quotes.\n )?\t\t\t\t\t\t# Title is optional\n \\s*\t\t\t\t\t\t# Optional whitespace\n (\\))\n)\n", + "name": "meta.image.inline.markdown" + }, + "image-ref": { + "captures": { + "1": { + "name": "punctuation.definition.string.begin.markdown" + }, + "2": { + "name": "string.other.link.description.markdown" + }, + "4": { + "name": "punctuation.definition.string.begin.markdown" + }, + "5": { + "name": "punctuation.definition.constant.markdown" + }, + "6": { + "name": "constant.other.reference.link.markdown" + }, + "7": { + "name": "punctuation.definition.constant.markdown" + } + }, + "match": "(\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])[ ]?(\\[)(.*?)(\\])", + "name": "meta.image.reference.markdown" + }, + "italic": { + "begin": "(?x) (\\*\\b|\\b_)(?=\\S)\t\t\t\t\t\t\t\t# Open\n (?=\n (\n <[^>]*+>\t\t\t\t\t\t\t# HTML tags\n | (?<raw>`+)([^`]|(?!(?<!`)\\k<raw>(?!`))`)*+\\k<raw>\n # Raw\n | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+\t\t\t# Escapes\n | \\[\n (\n (?<square>\t\t\t\t\t# Named group\n [^\\[\\]\\\\]\t\t\t\t# Match most chars\n | \\\\.\t\t\t\t\t\t# Escaped chars\n | \\[ \\g<square>*+ \\]\t\t# Nested brackets\n )*+\n \\]\n (\n (\t\t\t\t\t\t\t# Reference Link\n [ ]?\t\t\t\t\t# Optional space\n \\[[^\\]]*+\\]\t\t\t\t# Ref name\n )\n | (\t\t\t\t\t\t\t# Inline Link\n \\(\t\t\t\t\t\t# Opening paren\n [ \\t]*+\t\t\t\t# Optional whtiespace\n <?(.*?)>?\t\t\t# URL\n [ \\t]*+\t\t\t\t# Optional whtiespace\n (\t\t\t\t\t# Optional Title\n (?<title>['\"])\n (.*?)\n \\k<title>\n )?\n \\)\n )\n )\n )\n | \\1\\1\t\t\t\t\t\t\t\t# Must be bold closer\n | (?!(?<=\\S)\\1).\t\t\t\t\t\t# Everything besides\n # style closer\n )++\n (?<=\\S)\\1\t\t\t\t\t\t\t\t# Close\n )\n", + "captures": { + "1": { + "name": "punctuation.definition.italic.markdown" + } + }, + "end": "(?<=\\S)(\\1)((?!\\1)|(?=\\1\\1))", + "name": "markup.italic.markdown", + "patterns": [ + { + "applyEndPatternLast": 1, + "begin": "(?=<[^>]*?>)", + "end": "(?<=>)", + "patterns": [ + { + "include": "text.html.basic" + } + ] + }, + { + "include": "#escape" + }, + { + "include": "#ampersand" + }, + { + "include": "#bracket" + }, + { + "include": "#raw" + }, + { + "include": "#bold" + }, + { + "include": "#image-inline" + }, + { + "include": "#link-inline" + }, + { + "include": "#link-inet" + }, + { + "include": "#link-email" + }, + { + "include": "#image-ref" + }, + { + "include": "#link-ref-literal" + }, + { + "include": "#link-ref" + } + ] + }, + "link-email": { + "captures": { + "1": { + "name": "punctuation.definition.link.markdown" + }, + "2": { + "name": "markup.underline.link.markdown" + }, + "4": { + "name": "punctuation.definition.link.markdown" + } + }, + "match": "(<)((?:mailto:)?[-.\\w]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)(>)", + "name": "meta.link.email.lt-gt.markdown" + }, + "link-inet": { + "captures": { + "1": { + "name": "punctuation.definition.link.markdown" + }, + "2": { + "name": "markup.underline.link.markdown" + }, + "3": { + "name": "punctuation.definition.link.markdown" + } + }, + "match": "(<)((?:https?|ftp)://.*?)(>)", + "name": "meta.link.inet.markdown" + }, + "link-inline": { + "captures": { + "1": { + "name": "punctuation.definition.string.begin.markdown" + }, + "2": { + "name": "string.other.link.title.markdown" + }, + "4": { + "name": "punctuation.definition.string.end.markdown" + }, + "5": { + "name": "punctuation.definition.metadata.markdown" + }, + "6": { + "name": "punctuation.definition.link.markdown" + }, + "7": { + "name": "markup.underline.link.markdown" + }, + "8": { + "name": "punctuation.definition.link.markdown" + }, + "9": { + "name": "string.other.link.description.title.markdown" + }, + "10": { + "name": "punctuation.definition.string.begin.markdown" + }, + "11": { + "name": "punctuation.definition.string.end.markdown" + }, + "12": { + "name": "string.other.link.description.title.markdown" + }, + "13": { + "name": "punctuation.definition.string.begin.markdown" + }, + "14": { + "name": "punctuation.definition.string.end.markdown" + }, + "15": { + "name": "punctuation.definition.metadata.markdown" + } + }, + "match": "(?x:\n (\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\()\t\t\t\t\t\t# Opening paren for url\n (<?)(.*?)(>?)\t\t\t# The url\n [ \\t]*\t\t\t\t\t# Optional whitespace\n (?:\n ((\\().+?(\\)))\t\t# Match title in parens…\n | ((\").+?(\"))\t\t# or in quotes.\n )?\t\t\t\t\t\t# Title is optional\n \\s*\t\t\t\t\t\t# Optional whitespace\n (\\))\n )\n", + "name": "meta.link.inline.markdown" + }, + "link-ref": { + "captures": { + "1": { + "name": "punctuation.definition.string.begin.markdown" + }, + "2": { + "name": "string.other.link.title.markdown" + }, + "4": { + "name": "punctuation.definition.string.end.markdown" + }, + "5": { + "name": "punctuation.definition.constant.begin.markdown" + }, + "6": { + "name": "constant.other.reference.link.markdown" + }, + "7": { + "name": "punctuation.definition.constant.end.markdown" + } + }, + "match": "(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])(\\[)([^\\]]*+)(\\])", + "name": "meta.link.reference.markdown" + }, + "link-ref-literal": { + "captures": { + "1": { + "name": "punctuation.definition.string.begin.markdown" + }, + "2": { + "name": "string.other.link.title.markdown" + }, + "4": { + "name": "punctuation.definition.string.end.markdown" + }, + "5": { + "name": "punctuation.definition.constant.begin.markdown" + }, + "6": { + "name": "punctuation.definition.constant.end.markdown" + } + }, + "match": "(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])[ ]?(\\[)(\\])", + "name": "meta.link.reference.literal.markdown" + }, + "raw": { + "captures": { + "1": { + "name": "punctuation.definition.raw.markdown" + }, + "3": { + "name": "punctuation.definition.raw.markdown" + } + }, + "match": "(`+)([^`]|(?!(?<!`)\\1(?!`))`)*+(\\1)", + "name": "markup.inline.raw.string.markdown" + }, + "fenced_code_block_css": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(css|css.erb)(\\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*$)", + "contentName": "meta.embedded.block.css", + "patterns": [ + { + "include": "source.css" + } + ] + } + ] + }, + "fenced_code_block_basic": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(html|htm|shtml|xhtml|inc|tmpl|tpl)(\\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*$)", + "contentName": "meta.embedded.block.html", + "patterns": [ + { + "include": "text.html.basic" + } + ] + } + ] + }, + "fenced_code_block_ini": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ini|conf)(\\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*$)", + "contentName": "meta.embedded.block.ini", + "patterns": [ + { + "include": "source.ini" + } + ] + } + ] + }, + "fenced_code_block_java": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(java|bsh)(\\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*$)", + "contentName": "meta.embedded.block.java", + "patterns": [ + { + "include": "source.java" + } + ] + } + ] + }, + "fenced_code_block_lua": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(lua)(\\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*$)", + "contentName": "meta.embedded.block.lua", + "patterns": [ + { + "include": "source.lua" + } + ] + } + ] + }, + "fenced_code_block_makefile": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(Makefile|makefile|GNUmakefile|OCamlMakefile)(\\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*$)", + "contentName": "meta.embedded.block.makefile", + "patterns": [ + { + "include": "source.makefile" + } + ] + } + ] + }, + "fenced_code_block_perl": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl|pl|pm|pod|t|PL|psgi|vcl)(\\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*$)", + "contentName": "meta.embedded.block.perl", + "patterns": [ + { + "include": "source.perl" + } + ] + } + ] + }, + "fenced_code_block_r": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(R|r|s|S|Rprofile)(\\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*$)", + "contentName": "meta.embedded.block.r", + "patterns": [ + { + "include": "source.r" + } + ] + } + ] + }, + "fenced_code_block_ruby": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ruby|rb|rbx|rjs|Rakefile|rake|cgi|fcgi|gemspec|irbrc|Capfile|ru|prawn|Cheffile|Gemfile|Guardfile|Hobofile|Vagrantfile|Appraisals|Rantfile|Berksfile|Berksfile.lock|Thorfile|Puppetfile)(\\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*$)", + "contentName": "meta.embedded.block.ruby", + "patterns": [ + { + "include": "source.ruby" + } + ] + } + ] + }, + "fenced_code_block_php": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(php|php3|php4|php5|phpt|phtml|aw|ctp)(\\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*$)", + "contentName": "meta.embedded.block.php", + "patterns": [ + { + "include": "text.html.basic" + }, + { + "include": "text.html.php#language" + } + ] + } + ] + }, + "fenced_code_block_sql": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(sql|ddl|dml)(\\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*$)", + "contentName": "meta.embedded.block.sql", + "patterns": [ + { + "include": "source.sql" + } + ] + } + ] + }, + "fenced_code_block_vs_net": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(vb)(\\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*$)", + "contentName": "meta.embedded.block.vs_net", + "patterns": [ + { + "include": "source.asp.vb.net" + } + ] + } + ] + }, + "fenced_code_block_xml": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xml|xsd|tld|jsp|pt|cpt|dtml|rss|opml)(\\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*$)", + "contentName": "meta.embedded.block.xml", + "patterns": [ + { + "include": "text.xml" + } + ] + } + ] + }, + "fenced_code_block_xsl": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xsl|xslt)(\\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*$)", + "contentName": "meta.embedded.block.xsl", + "patterns": [ + { + "include": "text.xml.xsl" + } + ] + } + ] + }, + "fenced_code_block_yaml": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(yaml|yml)(\\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*$)", + "contentName": "meta.embedded.block.yaml", + "patterns": [ + { + "include": "source.yaml" + } + ] + } + ] + }, + "fenced_code_block_dosbatch": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bat|batch)(\\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*$)", + "contentName": "meta.embedded.block.dosbatch", + "patterns": [ + { + "include": "source.dosbatch" + } + ] + } + ] + }, + "fenced_code_block_clojure": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(clj|cljs|clojure)(\\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*$)", + "contentName": "meta.embedded.block.clojure", + "patterns": [ + { + "include": "source.clojure" + } + ] + } + ] + }, + "fenced_code_block_coffee": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(coffee|Cakefile|coffee.erb)(\\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*$)", + "contentName": "meta.embedded.block.coffee", + "patterns": [ + { + "include": "source.coffee" + } + ] + } + ] + }, + "fenced_code_block_c": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(c|h)(\\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*$)", + "contentName": "meta.embedded.block.c", + "patterns": [ + { + "include": "source.c" + } + ] + } + ] + }, + "fenced_code_block_cpp": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cpp|c\\+\\+|cxx)(\\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*$)", + "contentName": "meta.embedded.block.cpp", + "patterns": [ + { + "include": "source.cpp" + } + ] + } + ] + }, + "fenced_code_block_diff": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(patch|diff|rej)(\\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*$)", + "contentName": "meta.embedded.block.diff", + "patterns": [ + { + "include": "source.diff" + } + ] + } + ] + }, + "fenced_code_block_dockerfile": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dockerfile|Dockerfile)(\\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*$)", + "contentName": "meta.embedded.block.dockerfile", + "patterns": [ + { + "include": "source.dockerfile" + } + ] + } + ] + }, + "fenced_code_block_git_commit": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(COMMIT_EDITMSG|MERGE_MSG)(\\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*$)", + "contentName": "meta.embedded.block.git_commit", + "patterns": [ + { + "include": "text.git-commit" + } + ] + } + ] + }, + "fenced_code_block_git_rebase": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(git-rebase-todo)(\\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*$)", + "contentName": "meta.embedded.block.git_rebase", + "patterns": [ + { + "include": "text.git-rebase" + } + ] + } + ] + }, + "fenced_code_block_go": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(go|golang)(\\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*$)", + "contentName": "meta.embedded.block.go", + "patterns": [ + { + "include": "source.go" + } + ] + } + ] + }, + "fenced_code_block_groovy": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(groovy|gvy)(\\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*$)", + "contentName": "meta.embedded.block.groovy", + "patterns": [ + { + "include": "source.groovy" + } + ] + } + ] + }, + "fenced_code_block_jade": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jade|pug)(\\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*$)", + "contentName": "meta.embedded.block.jade", + "patterns": [ + { + "include": "text.jade" + } + ] + } + ] + }, + "fenced_code_block_js": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs)(\\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*$)", + "contentName": "meta.embedded.block.javascript", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + "fenced_code_block_js_regexp": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(regexp)(\\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*$)", + "contentName": "meta.embedded.block.js_regexp", + "patterns": [ + { + "include": "source.js.regexp" + } + ] + } + ] + }, + "fenced_code_block_json": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(json|sublime-settings|sublime-menu|sublime-keymap|sublime-mousemap|sublime-theme|sublime-build|sublime-project|sublime-completions)(\\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*$)", + "contentName": "meta.embedded.block.json", + "patterns": [ + { + "include": "source.json" + } + ] + } + ] + }, + "fenced_code_block_less": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(less)(\\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*$)", + "contentName": "meta.embedded.block.less", + "patterns": [ + { + "include": "source.css.less" + } + ] + } + ] + }, + "fenced_code_block_objc": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(objectivec|objective-c|mm|objc|obj-c|m|h)(\\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*$)", + "contentName": "meta.embedded.block.objc", + "patterns": [ + { + "include": "source.objc" + } + ] + } + ] + }, + "fenced_code_block_scss": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(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*$)", + "contentName": "meta.embedded.block.scss", + "patterns": [ + { + "include": "source.css.scss" + } + ] + } + ] + }, + "fenced_code_block_perl6": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl6|p6|pl6|pm6|nqp)(\\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*$)", + "contentName": "meta.embedded.block.perl6", + "patterns": [ + { + "include": "source.perl.6" + } + ] + } + ] + }, + "fenced_code_block_powershell": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(powershell|ps1|psm1|psd1)(\\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*$)", + "contentName": "meta.embedded.block.powershell", + "patterns": [ + { + "include": "source.powershell" + } + ] + } + ] + }, + "fenced_code_block_python": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(python|py|py3|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gyp|gypi)(\\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*$)", + "contentName": "meta.embedded.block.python", + "patterns": [ + { + "include": "source.python" + } + ] + } + ] + }, + "fenced_code_block_regexp_python": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(re)(\\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*$)", + "contentName": "meta.embedded.block.regexp_python", + "patterns": [ + { + "include": "source.regexp.python" + } + ] + } + ] + }, + "fenced_code_block_rust": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|rs)(\\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*$)", + "contentName": "meta.embedded.block.rust", + "patterns": [ + { + "include": "source.rust" + } + ] + } + ] + }, + "fenced_code_block_scala": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scala|sbt)(\\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*$)", + "contentName": "meta.embedded.block.scala", + "patterns": [ + { + "include": "source.scala" + } + ] + } + ] + }, + "fenced_code_block_shell": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(shell|sh|bash|zsh|bashrc|bash_profile|bash_login|profile|bash_logout|.textmate_init)(\\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*$)", + "contentName": "meta.embedded.block.shellscript", + "patterns": [ + { + "include": "source.shell" + } + ] + } + ] + }, + "fenced_code_block_ts": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(typescript|ts)(\\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*$)", + "contentName": "meta.embedded.block.typescript", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + }, + "fenced_code_block_tsx": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(tsx)(\\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*$)", + "contentName": "meta.embedded.block.typescriptreact", + "patterns": [ + { + "include": "source.tsx" + } + ] + } + ] + }, + "fenced_code_block_csharp": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cs|csharp|c#)(\\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*$)", + "contentName": "meta.embedded.block.csharp", + "patterns": [ + { + "include": "source.cs" + } + ] + } + ] + }, + "fenced_code_block_fsharp": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(fs|fsharp|f#)(\\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*$)", + "contentName": "meta.embedded.block.fsharp", + "patterns": [ + { + "include": "source.fsharp" + } + ] + } + ] + } + } + } + }, + "scopeName": "text.html.markdown", + "uuid": "0A1D9874-B448-11D9-BD50-000D93B6E43C" +} \ No newline at end of file diff --git a/extensions/markdown/tsconfig.json b/extensions/markdown/tsconfig.json index e4cb92ddee2..b0c5b388eeb 100644 --- a/extensions/markdown/tsconfig.json +++ b/extensions/markdown/tsconfig.json @@ -13,7 +13,8 @@ "noImplicitReturns": true, "noUnusedLocals": true, "noUnusedParameters": true, - "strict": true + "strict": true, + "alwaysStrict": true }, "include": [ "src/**/*" diff --git a/extensions/markdown/yarn.lock b/extensions/markdown/yarn.lock index b1ed9e8c9a1..b1a04b4154c 100644 --- a/extensions/markdown/yarn.lock +++ b/extensions/markdown/yarn.lock @@ -14,6 +14,45 @@ version "7.0.43" resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c" +ajv@^5.1.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + +ansi-cyan@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873" + dependencies: + ansi-wrap "0.1.0" + +ansi-gray@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" + dependencies: + ansi-wrap "0.1.0" + +ansi-red@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c" + dependencies: + ansi-wrap "0.1.0" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-wrap@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" + applicationinsights@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.0.1.tgz#53446b830fe8d5d619eee2a278b31d3d25030927" @@ -28,14 +67,264 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -binaryextensions@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-1.0.1.tgz#1e637488b35b58bda5f4774bf96a5212a8c90755" +arr-diff@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a" + dependencies: + arr-flatten "^1.0.1" + array-slice "^0.2.3" -core-util-is@~1.0.0: +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +arr-union@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-2.1.0.tgz#20f9eab5ec70f5c7d215b1077b1c39161d292c7d" + +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +array-slice@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1, array-uniq@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + +aws4@^1.2.1, aws4@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +beeper@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +boom@4.x.x: + version "4.3.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" + dependencies: + hoek "4.x.x" + +boom@5.x.x: + version "5.2.0" + resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" + dependencies: + hoek "4.x.x" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-stdout@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +chalk@^1.0.0, chalk@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +clone-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone-stats@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + +clone@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f" + +clone@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" + +cloneable-readable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117" + dependencies: + inherits "^2.0.1" + process-nextick-args "^1.0.6" + through2 "^2.0.1" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +color-support@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + +commander@^2.9.0: + version "2.14.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +convert-source-map@^1.1.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +cryptiles@3.x.x: + version "3.1.2" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" + dependencies: + boom "5.x.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +dateformat@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062" + +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + +deep-assign@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/deep-assign/-/deep-assign-1.0.0.tgz#b092743be8427dc621ea0067cdec7e70dd19f37b" + dependencies: + is-obj "^1.0.0" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + diagnostic-channel-publishers@0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.2.1.tgz#8e2d607a8b6d79fe880b548bc58cc6beb288c4f3" @@ -46,44 +335,647 @@ diagnostic-channel@0.2.0: dependencies: semver "^5.3.0" +diff@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75" + +duplexer2@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +duplexer@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + +duplexify@^3.2.0: + version "3.5.3" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.3.tgz#8b5818800df92fd0125b27ab896491912858243e" + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +end-of-stream@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + dependencies: + once "^1.4.0" + entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" -escape-string-regexp@^1.0.3: +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -gulp-rename@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.2.2.tgz#3ad4428763f05e2764dec1c67d868db275687817" - -gulp-replace@^0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/gulp-replace/-/gulp-replace-0.5.4.tgz#69a67914bbd13c562bff14f504a403796aa0daa9" +event-stream@^3.3.1, event-stream@~3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" dependencies: - istextorbinary "1.0.2" - readable-stream "^2.0.1" - replacestream "^4.0.0" + duplexer "~0.1.1" + from "~0" + map-stream "~0.1.0" + pause-stream "0.0.11" + split "0.3" + stream-combiner "~0.0.4" + through "~2.3.1" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend-shallow@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz#19d6bf94dfc09d76ba711f39b872d21ff4dd9071" + dependencies: + kind-of "^1.1.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + +fancy-log@^1.1.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1" + dependencies: + ansi-gray "^0.1.1" + color-support "^1.1.3" + time-stamp "^1.0.0" + +fast-deep-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + dependencies: + pend "~1.2.0" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +form-data@~2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +from@~0: + version "0.1.7" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-parent@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-stream@^5.3.2: + version "5.3.5" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-5.3.5.tgz#a55665a9a8ccdc41915a87c701e32d4e016fad22" + dependencies: + extend "^3.0.0" + glob "^5.0.3" + glob-parent "^3.0.0" + micromatch "^2.3.7" + ordered-read-streams "^0.3.0" + through2 "^0.6.0" + to-absolute-glob "^0.1.1" + unique-stream "^2.0.2" + +glob@7.1.2, glob@^7.0.5, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^5.0.3: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glogg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810" + dependencies: + sparkles "^1.0.0" + +graceful-fs@^4.0.0, graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +growl@1.10.3: + version "1.10.3" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f" + +gulp-chmod@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/gulp-chmod/-/gulp-chmod-2.0.0.tgz#00c390b928a0799b251accf631aa09e01cc6299c" + dependencies: + deep-assign "^1.0.0" + stat-mode "^0.2.0" + through2 "^2.0.0" + +gulp-filter@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-5.1.0.tgz#a05e11affb07cf7dcf41a7de1cb7b63ac3783e73" + dependencies: + multimatch "^2.0.0" + plugin-error "^0.1.2" + streamfilter "^1.0.5" + +gulp-gunzip@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulp-gunzip/-/gulp-gunzip-1.0.0.tgz#15b741145e83a9c6f50886241b57cc5871f151a9" + dependencies: + through2 "~0.6.5" + vinyl "~0.4.6" + +gulp-remote-src@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/gulp-remote-src/-/gulp-remote-src-0.4.3.tgz#5728cfd643433dd4845ddef0969f0f971a2ab4a1" + dependencies: + event-stream "~3.3.4" + node.extend "~1.1.2" + request "~2.79.0" + through2 "~2.0.3" + vinyl "~2.0.1" + +gulp-sourcemaps@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz#b86ff349d801ceb56e1d9e7dc7bbcb4b7dee600c" + dependencies: + convert-source-map "^1.1.1" + graceful-fs "^4.1.2" + strip-bom "^2.0.0" + through2 "^2.0.0" + vinyl "^1.0.0" + +gulp-symdest@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/gulp-symdest/-/gulp-symdest-1.1.0.tgz#c165320732d192ce56fd94271ffa123234bf2ae0" + dependencies: + event-stream "^3.3.1" + mkdirp "^0.5.1" + queue "^3.1.0" + vinyl-fs "^2.4.3" + +gulp-untar@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/gulp-untar/-/gulp-untar-0.0.6.tgz#d6bdefde7e9a8e054c9f162385a0782c4be74000" + dependencies: + event-stream "~3.3.4" + gulp-util "~3.0.8" + streamifier "~0.1.1" + tar "^2.2.1" + through2 "~2.0.3" + +gulp-util@~3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" + dependencies: + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^2.0.0" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulp-vinyl-zip@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.0.tgz#24e40685dc05b7149995245099e0590263be8dad" + dependencies: + event-stream "^3.3.1" + queue "^4.2.1" + through2 "^2.0.3" + vinyl "^2.0.2" + vinyl-fs "^2.0.0" + yauzl "^2.2.1" + yazl "^2.2.1" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-gulplog@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hawk@~6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" + dependencies: + boom "4.x.x" + cryptiles "3.x.x" + hoek "4.x.x" + sntp "2.x.x" + +he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" highlight.js@9.5.0: version "9.5.0" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.5.0.tgz#46ae51b9db00f70052bcdf196cd404757b6582ae" -inherits@~2.0.3: +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hoek@4.x.x: + version "4.2.0" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" -isarray@~1.0.0: +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-extglob@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-my-json-valid@^2.12.4: + version "2.17.1" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.1.tgz#3da98914a70a22f0a8563ef1511a246c6fc55471" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-valid-glob@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe" + +is@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/is/-/is-3.2.1.tgz#d0ac2ad55eb7b0bec926a5266f6c662aaa83dca5" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" -istextorbinary@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-1.0.2.tgz#ace19354d1a9a0173efeb1084ce0f87b0ad7decf" +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" dependencies: - binaryextensions "~1.0.0" - textextensions "~1.0.0" + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +lazystream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" + dependencies: + readable-stream "^2.0.5" linkify-it@^2.0.0: version "2.0.3" @@ -91,6 +983,97 @@ linkify-it@^2.0.0: dependencies: uc.micro "^1.0.1" +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.isequal@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.restparam@^3.0.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + +lodash.template@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + +map-stream@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" + markdown-it-named-headers@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/markdown-it-named-headers/-/markdown-it-named-headers-0.0.4.tgz#82efc28324240a6b1e77b9aae501771d5f351c1f" @@ -111,15 +1094,242 @@ mdurl@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" -object-assign@^4.0.1: +merge-stream@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + dependencies: + readable-stream "^2.0.1" + +micromatch@^2.3.7: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.30.0: + version "1.30.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" + +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.7: + version "2.1.17" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" + dependencies: + mime-db "~1.30.0" + +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +mocha@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794" + dependencies: + browser-stdout "1.3.0" + commander "2.11.0" + debug "3.1.0" + diff "3.3.1" + escape-string-regexp "1.0.5" + glob "7.1.2" + growl "1.10.3" + he "1.1.1" + mkdirp "0.5.1" + supports-color "4.4.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +multimatch@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" + dependencies: + array-differ "^1.0.0" + array-union "^1.0.1" + arrify "^1.0.0" + minimatch "^3.0.0" + +multipipe@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + +node.extend@~1.1.2: + version "1.1.6" + resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-1.1.6.tgz#a7b882c82d6c93a4863a5504bd5de8ec86258b96" + dependencies: + is "^3.1.0" + +normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +oauth-sign@~0.8.1, oauth-sign@~0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" -process-nextick-args@~1.0.6: +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +ordered-read-streams@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz#7137e69b3298bb342247a1bbee3881c80e2fd78b" + dependencies: + is-stream "^1.0.1" + readable-stream "^2.0.1" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +pause-stream@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" + dependencies: + through "~2.3" + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +plugin-error@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace" + dependencies: + ansi-cyan "^0.1.1" + ansi-red "^0.1.1" + arr-diff "^1.0.1" + arr-union "^2.0.1" + extend-shallow "^1.1.2" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +process-nextick-args@^1.0.6, process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" -readable-stream@^2.0.1, readable-stream@^2.0.2: +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.3.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + +qs@~6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + +querystringify@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" + +queue@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/queue/-/queue-3.1.0.tgz#6c49d01f009e2256788789f2bffac6b8b9990585" + dependencies: + inherits "~2.0.0" + +queue@^4.2.1: + version "4.4.2" + resolved "https://registry.yarnpkg.com/queue/-/queue-4.4.2.tgz#5a9733d9a8b8bd1b36e934bc9c55ab89b28e29c7" + dependencies: + inherits "~2.0.0" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +"readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.1.5: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: @@ -131,48 +1341,408 @@ readable-stream@^2.0.1, readable-stream@^2.0.2: string_decoder "~1.0.3" util-deprecate "~1.0.1" -replacestream@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/replacestream/-/replacestream-4.0.2.tgz#0c4140707e4f0323f50de044851708cf58bc37bd" +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" dependencies: - escape-string-regexp "^1.0.3" - object-assign "^4.0.1" - readable-stream "^2.0.2" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" -safe-buffer@~5.1.0, safe-buffer@~5.1.1: +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + +replace-ext@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + +request@^2.83.0: + version "2.83.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + hawk "~6.0.2" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + stringstream "~0.0.5" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + +request@~2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +requires-port@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +rimraf@2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" -semver@^5.3.0: +semver@^5.3.0, semver@^5.4.1: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sntp@2.x.x: + version "2.1.0" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" + dependencies: + hoek "4.x.x" + +source-map-support@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.3.tgz#2b3d5fff298cfa4d1afd7d4352d569e9a0158e76" + dependencies: + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + +sparkles@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + +split@0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" + dependencies: + through "2" + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stat-mode@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-0.2.2.tgz#e6c80b623123d7d80cf132ce538f346289072502" + +stream-combiner@~0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" + dependencies: + duplexer "~0.1.1" + +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + +streamfilter@^1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/streamfilter/-/streamfilter-1.0.7.tgz#ae3e64522aa5a35c061fd17f67620c7653c643c9" + dependencies: + readable-stream "^2.0.2" + +streamifier@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/streamifier/-/streamifier-0.1.1.tgz#97e98d8fa4d105d62a2691d1dc07e820db8dfc4f" + string@^3.0.1: version "3.3.1" resolved "https://registry.yarnpkg.com/string/-/string-3.3.1.tgz#8d2757ec1c0e6c526796fbb6b14036a4098398b7" +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + string_decoder@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" dependencies: safe-buffer "~5.1.0" -textextensions@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-1.0.2.tgz#65486393ee1f2bb039a60cbba05b0b68bd9501d2" +stringstream@~0.0.4, stringstream@~0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee" + dependencies: + first-chunk-stream "^1.0.0" + strip-bom "^2.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +supports-color@4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" + dependencies: + has-flag "^2.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +through2-filter@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec" + dependencies: + through2 "~2.0.0" + xtend "~4.0.0" + +through2@^0.6.0, through2@~0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +through2@^2.0.0, through2@^2.0.1, through2@^2.0.3, through2@~2.0.0, through2@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through@2, through@~2.3, through@~2.3.1: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +time-stamp@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" + +to-absolute-glob@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f" + dependencies: + extend-shallow "^2.0.1" + +tough-cookie@~2.3.0, tough-cookie@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" + dependencies: + punycode "^1.4.1" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" uc.micro@^1.0.1, uc.micro@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192" +unique-stream@^2.0.2: + version "2.2.1" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369" + dependencies: + json-stable-stringify "^1.0.0" + through2-filter "^2.0.0" + +url-parse@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.2.0.tgz#3a19e8aaa6d023ddd27dcc44cb4fc8f7fec23986" + dependencies: + querystringify "~1.0.0" + requires-port "~1.0.0" + util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +uuid@^3.0.0, uuid@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + +vali-date@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vinyl-fs@^2.0.0, vinyl-fs@^2.4.3: + version "2.4.4" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.4.tgz#be6ff3270cb55dfd7d3063640de81f25d7532239" + dependencies: + duplexify "^3.2.0" + glob-stream "^5.3.2" + graceful-fs "^4.0.0" + gulp-sourcemaps "1.6.0" + is-valid-glob "^0.3.0" + lazystream "^1.0.0" + lodash.isequal "^4.0.0" + merge-stream "^1.0.0" + mkdirp "^0.5.0" + object-assign "^4.0.0" + readable-stream "^2.0.4" + strip-bom "^2.0.0" + strip-bom-stream "^1.0.0" + through2 "^2.0.0" + through2-filter "^2.0.0" + vali-date "^1.0.0" + vinyl "^1.0.0" + +vinyl-source-stream@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vinyl-source-stream/-/vinyl-source-stream-1.1.2.tgz#62b53a135610a896e98ca96bee3a87f008a8e780" + dependencies: + through2 "^2.0.3" + vinyl "^0.4.3" + +vinyl@^0.4.3, vinyl@~0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" + dependencies: + clone "^0.2.0" + clone-stats "^0.0.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^2.0.2: + version "2.1.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c" + dependencies: + clone "^2.1.1" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + +vinyl@~2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.0.2.tgz#0a3713d8d4e9221c58f10ca16c0116c9e25eda7c" + dependencies: + clone "^1.0.0" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + is-stream "^1.1.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + vscode-extension-telemetry@^0.0.11: version "0.0.11" resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.11.tgz#f2dde487f01d2b079f55ab47a0247f5a772c4e06" @@ -183,6 +1753,46 @@ vscode-nls@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.2.1.tgz#b1f3e04e8a94a715d5a7bcbc8339c51e6d74ca51" +vscode@^1.1.10: + version "1.1.10" + resolved "https://registry.yarnpkg.com/vscode/-/vscode-1.1.10.tgz#d1cba378ab24f1d3ddf9cd470d242ee1472dd35b" + dependencies: + glob "^7.1.2" + gulp-chmod "^2.0.0" + gulp-filter "^5.0.1" + gulp-gunzip "1.0.0" + gulp-remote-src "^0.4.3" + gulp-symdest "^1.1.0" + gulp-untar "^0.0.6" + gulp-vinyl-zip "^2.1.0" + mocha "^4.0.1" + request "^2.83.0" + semver "^5.4.1" + source-map-support "^0.5.0" + url-parse "^1.1.9" + vinyl-source-stream "^1.1.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +yauzl@^2.2.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.9.1.tgz#a81981ea70a57946133883f029c5821a89359a7f" + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.0.1" + +yazl@^2.2.1: + version "2.4.3" + resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.4.3.tgz#ec26e5cc87d5601b9df8432dbdd3cd2e5173a071" + dependencies: + buffer-crc32 "~0.2.3" + zone.js@0.7.6: version "0.7.6" resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.7.6.tgz#fbbc39d3e0261d0986f1ba06306eb3aeb0d22009" diff --git a/extensions/merge-conflict/src/codelensProvider.ts b/extensions/merge-conflict/src/codelensProvider.ts index 32b1cb9e381..6ee4f2f043b 100644 --- a/extensions/merge-conflict/src/codelensProvider.ts +++ b/extensions/merge-conflict/src/codelensProvider.ts @@ -9,8 +9,8 @@ import { loadMessageBundle } from 'vscode-nls'; const localize = loadMessageBundle(); export default class MergeConflictCodeLensProvider implements vscode.CodeLensProvider, vscode.Disposable { - private codeLensRegistrationHandle: vscode.Disposable | null; - private config: interfaces.IExtensionConfiguration; + private codeLensRegistrationHandle?: vscode.Disposable | null; + private config?: interfaces.IExtensionConfiguration; private tracker: interfaces.IDocumentMergeConflictTracker; constructor(trackerService: interfaces.IDocumentMergeConflictTrackerService) { diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index c63cde91dbf..2d37786aad0 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -13,7 +13,7 @@ export default class MergeDecorator implements vscode.Disposable { private decorationUsesWholeLine: boolean = true; // Useful for debugging, set to false to see exact match ranges - private config: interfaces.IExtensionConfiguration; + private config?: interfaces.IExtensionConfiguration; private tracker: interfaces.IDocumentMergeConflictTracker; private updating = new Map<vscode.TextEditor, boolean>(); @@ -210,7 +210,7 @@ export default class MergeDecorator implements vscode.Disposable { } }); - if (this.config.enableDecorations) { + if (this.config!.enableDecorations) { pushDecoration('current.header', { range: conflict.current.header }); pushDecoration('splitter', { range: conflict.splitter }); pushDecoration('incoming.header', { range: conflict.incoming.header }); diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index 4f7f8cadbb7..d139fde1121 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -93,9 +93,9 @@ export default class PHPValidationProvider { private trigger: RunTrigger; private pauseValidation: boolean; - private documentListener: vscode.Disposable | null; - private diagnosticCollection: vscode.DiagnosticCollection; - private delayers: { [key: string]: ThrottledDelayer<void> }; + private documentListener: vscode.Disposable | null = null; + private diagnosticCollection?: vscode.DiagnosticCollection; + private delayers?: { [key: string]: ThrottledDelayer<void> }; constructor(private workspaceStore: vscode.Memento) { this.executable = undefined; @@ -112,15 +112,17 @@ export default class PHPValidationProvider { vscode.workspace.onDidOpenTextDocument(this.triggerValidate, this, subscriptions); vscode.workspace.onDidCloseTextDocument((textDocument) => { - this.diagnosticCollection.delete(textDocument.uri); - delete this.delayers[textDocument.uri.toString()]; + this.diagnosticCollection!.delete(textDocument.uri); + delete this.delayers![textDocument.uri.toString()]; }, null, subscriptions); subscriptions.push(vscode.commands.registerCommand('php.untrustValidationExecutable', this.untrustValidationExecutable, this)); } public dispose(): void { - this.diagnosticCollection.clear(); - this.diagnosticCollection.dispose(); + if (this.diagnosticCollection) { + this.diagnosticCollection.clear(); + this.diagnosticCollection.dispose(); + } if (this.documentListener) { this.documentListener.dispose(); this.documentListener = null; @@ -156,7 +158,7 @@ export default class PHPValidationProvider { this.documentListener.dispose(); this.documentListener = null; } - this.diagnosticCollection.clear(); + this.diagnosticCollection!.clear(); if (this.validationEnabled) { if (this.trigger === RunTrigger.onType) { this.documentListener = vscode.workspace.onDidChangeTextDocument((e) => { @@ -186,10 +188,10 @@ export default class PHPValidationProvider { let trigger = () => { let key = textDocument.uri.toString(); - let delayer = this.delayers[key]; + let delayer = this.delayers![key]; if (!delayer) { delayer = new ThrottledDelayer<void>(this.trigger === RunTrigger.onType ? 250 : 0); - this.delayers[key] = delayer; + this.delayers![key] = delayer; } delayer.trigger(() => this.doValidate(textDocument)); }; @@ -273,7 +275,7 @@ export default class PHPValidationProvider { if (line) { processLine(line); } - this.diagnosticCollection.set(textDocument.uri, diagnostics); + this.diagnosticCollection!.set(textDocument.uri, diagnostics); resolve(); }); } else { diff --git a/extensions/powershell/OSSREADME.json b/extensions/powershell/OSSREADME.json index a456107d650..b6eb8cf04d2 100644 --- a/extensions/powershell/OSSREADME.json +++ b/extensions/powershell/OSSREADME.json @@ -1,7 +1,7 @@ // ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: [{ - "name": "SublimeText/PowerShell", + "name": "PowerShell/EditorSyntax", "version": "0.0.0", "license": "MIT", - "repositoryURL": "https://github.com/SublimeText/PowerShell" + "repositoryURL": "https://github.com/powershell/editorsyntax" }] diff --git a/extensions/powershell/language-configuration.json b/extensions/powershell/language-configuration.json index b03aa5cd42e..29445c790a3 100644 --- a/extensions/powershell/language-configuration.json +++ b/extensions/powershell/language-configuration.json @@ -14,7 +14,8 @@ ["(", ")"], { "open": "\"", "close": "\"", "notIn": ["string"]}, { "open": "'", "close": "'", "notIn": ["string", "comment"]}, - ["/**", " */"] + ["/**", " */"], + ["<#", "#>"] ], "surroundingPairs": [ ["{", "}"], diff --git a/extensions/powershell/package.json b/extensions/powershell/package.json index 83d51ea3137..c53e476238b 100644 --- a/extensions/powershell/package.json +++ b/extensions/powershell/package.json @@ -13,7 +13,7 @@ "grammars": [{ "language": "powershell", "scopeName": "source.powershell", - "path": "./syntaxes/PowershellSyntax.tmLanguage" + "path": "./syntaxes/powershell.tmLanguage.json" }], "snippets": [{ "language": "powershell", @@ -21,6 +21,6 @@ }] }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js SublimeText/PowerShell Support/PowershellSyntax.tmLanguage ./syntaxes/powershell.tmLanguage.json" + "update-grammar": "node ../../build/npm/update-grammar.js PowerShell/EditorSyntax PowerShellSyntax.tmLanguage ./syntaxes/powershell.tmLanguage.json" } } \ No newline at end of file diff --git a/extensions/powershell/syntaxes/PowershellSyntax.tmLanguage b/extensions/powershell/syntaxes/PowershellSyntax.tmLanguage deleted file mode 100644 index 1ad8b5e38b5..00000000000 --- a/extensions/powershell/syntaxes/PowershellSyntax.tmLanguage +++ /dev/null @@ -1,1194 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>fileTypes</key> - <array> - <string>ps1</string> - <string>psm1</string> - <string>psd1</string> - </array> - <key>name</key> - <string>PowerShell</string> - <key>patterns</key> - <array> - <dict> - <key>begin</key> - <string><#</string> - <key>beginCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>punctuation.start.definition.comment.block.powershell</string> - </dict> - </dict> - <key>end</key> - <string>#></string> - <key>endCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>punctuation.end.definition.comment.block.powershell</string> - </dict> - </dict> - <key>name</key> - <string>comment.block.powershell</string> - <key>patterns</key> - <array> - <dict> - <key>include</key> - <string>#commentEmbeddedDocs</string> - </dict> - </array> - </dict> - <dict> - <key>begin</key> - <string>(?<![`\\-])#</string> - <key>end</key> - <string>$</string> - <key>name</key> - <string>comment.line.number-sign.powershell</string> - <key>patterns</key> - <array> - <dict> - <key>include</key> - <string>#commentEmbeddedDocs</string> - </dict> - </array> - </dict> - <dict> - <key>match</key> - <string>[2-6]>&1|>>|>|<<|<|>|>\||[1-6]>|[1-6]>></string> - <key>name</key> - <string>keyword.operator.redirection.powershell</string> - </dict> - <dict> - <key>include</key> - <string>#commands</string> - </dict> - <dict> - <key>include</key> - <string>#variable</string> - </dict> - <dict> - <key>include</key> - <string>#interpolatedStringContent</string> - </dict> - <dict> - <key>include</key> - <string>#function</string> - </dict> - <dict> - <key>include</key> - <string>#attribute</string> - </dict> - <dict> - <key>include</key> - <string>#type</string> - </dict> - <dict> - <key>begin</key> - <string>(?<!(?<!`)")"</string> - <key>end</key> - <string>"(?!")</string> - <key>name</key> - <string>string.quoted.double.powershell</string> - <key>patterns</key> - <array> - <dict> - <key>include</key> - <string>#variableNoProperty</string> - </dict> - <dict> - <key>include</key> - <string>#doubleQuotedStringEscapes</string> - </dict> - <dict> - <key>include</key> - <string>#interpolation</string> - </dict> - <dict> - <key>match</key> - <string>`\s*$</string> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - </array> - </dict> - <dict> - <key>comment</key> - <string>Needed to parse stuff correctly in 'argument mode'. (See about_parsing.)</string> - <key>include</key> - <string>#doubleQuotedStringEscapes</string> - </dict> - <dict> - <key>begin</key> - <string>(?<!')'</string> - <key>end</key> - <string>'(?!')</string> - <key>name</key> - <string>string.quoted.single.powershell</string> - <key>patterns</key> - <array> - <dict> - <key>match</key> - <string>''</string> - <key>name</key> - <string>constant.character.escape.powershell</string> - </dict> - </array> - </dict> - <dict> - <key>begin</key> - <string>\@"(?=$)</string> - <key>end</key> - <string>^"@</string> - <key>name</key> - <string>string.quoted.double.heredoc.powershell</string> - <key>patterns</key> - <array> - <dict> - <key>include</key> - <string>#variableNoProperty</string> - </dict> - <dict> - <key>include</key> - <string>#doubleQuotedStringEscapes</string> - </dict> - <dict> - <key>include</key> - <string>#interpolation</string> - </dict> - </array> - </dict> - <dict> - <key>begin</key> - <string>\@'(?=$)</string> - <key>end</key> - <string>^'@</string> - <key>name</key> - <string>string.quoted.single.heredoc.powershell</string> - <key>patterns</key> - <array> - <dict> - <key>match</key> - <string>''</string> - <key>name</key> - <string>constant.character.escape.powershell</string> - </dict> - </array> - </dict> - <dict> - <key>include</key> - <string>#numericConstant</string> - </dict> - <dict> - <key>begin</key> - <string>@\(</string> - <key>captures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - </dict> - <key>end</key> - <string>\)</string> - <key>name</key> - <string>meta.group.array-expression.powershell</string> - <key>patterns</key> - <array> - <dict> - <key>include</key> - <string>$self</string> - </dict> - </array> - </dict> - <dict> - <key>begin</key> - <string>\$\(</string> - <key>captures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - </dict> - <key>comment</key> - <string>TODO: move to repo; make recursive.</string> - <key>end</key> - <string>\)</string> - <key>name</key> - <string>meta.group.complex.subexpression.powershell</string> - <key>patterns</key> - <array> - <dict> - <key>include</key> - <string>$self</string> - </dict> - </array> - </dict> - <dict> - <key>match</key> - <string>(?<!\w)-([ci]?[lg][te]|eq|ne)</string> - <key>name</key> - <string>keyword.operator.logical.powershell</string> - </dict> - <dict> - <key>match</key> - <string>(\b(([A-Za-z0-9\-_\.]+)\.(?i:exe|com|cmd|bat))\b)</string> - <key>name</key> - <string>support.function.powershell</string> - </dict> - <dict> - <key>match</key> - <string>(?<!\w)((?i:begin|break|catch|continue|data|define|do|dynamicparam|else|elseif|end|exit|finally|for|foreach(?!-object)|from|if|in|inlinescript|parallel|param|process|return|switch|throw|trap|try|until|using|var|where(?!-object)|while)|%|\?)(?!\w)</string> - <key>name</key> - <string>keyword.control.powershell</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>storage.type.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>entity.name.function</string> - </dict> - </dict> - <key>comment</key> - <string>capture should be entity.name.type, but it doesn't provide a good color in the default schema.</string> - <key>match</key> - <string>(?<!\w)((?i:class)|%|\?)(?:\s)+((?:\p{L}|\d|_|-|)+)\b</string> - </dict> - <dict> - <key>match</key> - <string>(?<!\w)-(?i:is(?:not)?|as)\b</string> - <key>name</key> - <string>keyword.operator.comparison.powershell</string> - </dict> - <dict> - <key>match</key> - <string>(?<!\w)-(?i:[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains|in)|replace))(?!\p{L})</string> - <key>name</key> - <string>keyword.operator.comparison.powershell</string> - </dict> - <dict> - <key>match</key> - <string>(?<!\w)-(?i:join|split)(?!\p{L})|!</string> - <key>name</key> - <string>keyword.operator.unary.powershell</string> - </dict> - <dict> - <key>match</key> - <string>(?<!\w)-(?i:and|or|not|xor)(?!\p{L})|!</string> - <key>name</key> - <string>keyword.operator.logical.powershell</string> - </dict> - <dict> - <key>match</key> - <string>(?<!\w)-(?i:band|bor|bnot|bxor)(?!\p{L})</string> - <key>name</key> - <string>keyword.operator.bitwise.powershell</string> - </dict> - <dict> - <key>match</key> - <string>(?<!\w)-(?i:f)(?!\p{L})</string> - <key>name</key> - <string>keyword.operator.string-format.powershell</string> - </dict> - <dict> - <key>match</key> - <string>[+%*/-]?=|[+/*%-]</string> - <key>name</key> - <string>keyword.operator.assignment.powershell</string> - </dict> - <dict> - <key>match</key> - <string>\|{2}|&{2}|;</string> - <key>name</key> - <string>keyword.other.statement-separator.powershell</string> - </dict> - <dict> - <key>match</key> - <string>&|(?<!\w)\.(?= )|`|,|\|</string> - <key>name</key> - <string>keyword.operator.other.powershell</string> - </dict> - <dict> - <key>comment</key> - <string>This is very imprecise, is there a syntax for 'must come after...' </string> - <key>match</key> - <string>(?<!\s|^)\.\.(?=\d|\(|\$)</string> - <key>name</key> - <string>keyword.operator.range.powershell</string> - </dict> - </array> - <key>repository</key> - <dict> - <key>attribute</key> - <dict> - <key>begin</key> - <string>\[(\p{L}|\.|``\d+)+(?=\()</string> - <key>beginCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>entity.name.tag</string> - </dict> - <key>1</key> - <dict> - <key>name</key> - <string>entity.name.tag</string> - </dict> - </dict> - <key>end</key> - <string>\]</string> - <key>endCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>entity.name.tag</string> - </dict> - </dict> - <key>patterns</key> - <array> - <dict> - <key>begin</key> - <string>\(</string> - <key>end</key> - <string>\)</string> - <key>name</key> - <string>entity.other.attribute-name</string> - <key>patterns</key> - <array> - <dict> - <key>captures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>entity.other.attribute.parameter.powershell</string> - </dict> - <key>1</key> - <dict> - <key>name</key> - <string>constant.language.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>variable.other.powershell</string> - </dict> - </dict> - <key>comment</key> - <string>really we should match the known attributes first</string> - <key>match</key> - <string>(\w+)\s*=?([^"']*?|'[^']*?'|"[^"]*?")?(?=,|\))</string> - <key>name</key> - <string>entity.other.attribute-name.powershell</string> - </dict> - <dict> - <key>include</key> - <string>#variable</string> - </dict> - </array> - </dict> - </array> - </dict> - <key>commands</key> - <dict> - <key>patterns</key> - <array> - <dict> - <key>comment</key> - <string>Verb-Noun pattern:</string> - <key>match</key> - <string>(?:(\p{L}|\d|_|-|\\|\:)*\\)?\b(?i:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\-.+?(?:\.(?i:exe|cmd|bat|ps1))?\b</string> - <key>name</key> - <string>support.function.powershell</string> - </dict> - <dict> - <key>comment</key> - <string>Builtin cmdlets with reserved verbs</string> - <key>match</key> - <string>(?<!\w)(?i:foreach-object)(?!\w)</string> - <key>name</key> - <string>support.function.powershell</string> - </dict> - <dict> - <key>comment</key> - <string>Builtin cmdlets with reserved verbs</string> - <key>match</key> - <string>(?<!\w)(?i:where-object)(?!\w)</string> - <key>name</key> - <string>support.function.powershell</string> - </dict> - </array> - </dict> - <key>commentEmbeddedDocs</key> - <dict> - <key>patterns</key> - <array> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>constant.string.documentation.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>keyword.operator.documentation.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:\s*(\.)(SYNOPSIS|DESCRIPTION|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|FUNCTIONALITY))</string> - <key>name</key> - <string>comment.documentation.embedded.powershell</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>constant.string.documentation.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>keyword.operator.documentation.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>keyword.operator.documentation.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:\s*(\.)(PARAMETER|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP)\s+([a-z0-9-_]+))</string> - <key>name</key> - <string>comment.documentation.embedded.powershell</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>constant.string.documentation.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>keyword.operator.documentation.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>string.quoted.double.heredoc.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:requires\s+-(Version\s+\d(.\d+)?|Assembly\s+(.*)|Module\s+(.*)|PsSnapIn\s+(.*)|ShellId\s+(.*)))</string> - <key>name</key> - <string>comment.documentation.embedded.powershell</string> - </dict> - </array> - </dict> - <key>doubleQuotedStringEscapes</key> - <dict> - <key>patterns</key> - <array> - <dict> - <key>match</key> - <string>`[0abnfrvt"'$`]</string> - <key>name</key> - <string>constant.character.escape.powershell</string> - </dict> - <dict> - <key>match</key> - <string>""</string> - <key>name</key> - <string>constant.character.escape.powershell</string> - </dict> - </array> - </dict> - <key>function</key> - <dict> - <key>begin</key> - <string>(?<!\S)(?i)(function|filter|configuration|workflow)\s+(?:(global|local|script|private):)?((?:\p{L}|\d|_|-|\.)+)</string> - <key>beginCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>meta.function</string> - </dict> - <key>1</key> - <dict> - <key>name</key> - <string>storage.type</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>storage.modifier.scope.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>entity.name.function.powershell</string> - </dict> - </dict> - <key>end</key> - <string>\{|\(</string> - </dict> - <key>interpolatedStringContent</key> - <dict> - <key>begin</key> - <string>\(</string> - <key>beginCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - </dict> - <key>contentName</key> - <string>interpolated.simple.source.powershell</string> - <key>end</key> - <string>\)</string> - <key>endCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - </dict> - <key>patterns</key> - <array> - <dict> - <key>include</key> - <string>$self</string> - </dict> - <dict> - <key>include</key> - <string>#interpolation</string> - </dict> - <dict> - <key>include</key> - <string>#interpolatedStringContent</string> - </dict> - </array> - </dict> - <key>interpolation</key> - <dict> - <key>begin</key> - <string>(\$)\(</string> - <key>beginCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - </dict> - <key>contentName</key> - <string>interpolated.complex.source.powershell</string> - <key>end</key> - <string>\)</string> - <key>endCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - </dict> - <key>patterns</key> - <array> - <dict> - <key>include</key> - <string>$self</string> - </dict> - <dict> - <key>include</key> - <string>#interpolation</string> - </dict> - <dict> - <key>include</key> - <string>#interpolatedStringContent</string> - </dict> - </array> - </dict> - <key>numericConstant</key> - <dict> - <key>patterns</key> - <array> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.operator.math.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>support.constant.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?<!\w)(?i:(0x)([a-f0-9]+)((?i:L)?(?i:[kmgtp]b)?))(?!\w)</string> - <key>name</key> - <string>constant.numeric.hexadecimal.powershell</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>support.constant.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>keyword.operator.math.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>support.constant.powershell</string> - </dict> - <key>4</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>5</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?<!\w)(?i:(\d*\.?\d+)(?:((?i:E)[+-]?)(\d+))?((?i:[DL])?)((?i:[kmgtp]b)?))(?!\w)</string> - <key>name</key> - <string>constant.numeric.scientific.powershell</string> - </dict> - </array> - </dict> - <key>scriptblock</key> - <dict> - <key>begin</key> - <string>\{</string> - <key>end</key> - <string>\}</string> - <key>name</key> - <string>meta.scriptblock.powershell</string> - <key>patterns</key> - <array> - <dict> - <key>include</key> - <string>$self</string> - </dict> - </array> - </dict> - <key>type</key> - <dict> - <key>begin</key> - <string>\[</string> - <key>beginCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>entity.other.attribute-name</string> - </dict> - </dict> - <key>comment</key> - <string>name should be entity.name.type but default schema doesn't have a good color for it</string> - <key>end</key> - <string>\]</string> - <key>endCaptures</key> - <dict> - <key>0</key> - <dict> - <key>name</key> - <string>entity.other.attribute-name</string> - </dict> - </dict> - <key>patterns</key> - <array> - <dict> - <key>match</key> - <string>(\p{L}|\.|``\d+)+?</string> - <key>name</key> - <string>entity.other.attribute-name</string> - </dict> - <dict> - <key>include</key> - <string>$self</string> - </dict> - </array> - </dict> - <key>variable</key> - <dict> - <key>patterns</key> - <array> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>constant.language.powershell</string> - </dict> - </dict> - <key>comment</key> - <string>These are special constants.</string> - <key>match</key> - <string>(\$)(?i:(False|Null|True))\b</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>support.constant.variable.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>comment</key> - <string>These are the other built-in constants.</string> - <key>match</key> - <string>(\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\.(?:\p{L}|\d|_)+)*\b)?\b</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>support.constant.automatic.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>comment</key> - <string>Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant.</string> - <key>match</key> - <string>(\$)(?i:(\$|\^|\?|_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This))((?:\.(?:\p{L}|\d|_)+)*\b)?\b</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>variable.language.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>comment</key> - <string>Style preference variables as language variables so that they stand out.</string> - <key>match</key> - <string>(\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|ProgressPreference|PsCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|VerbosePreference|WarningPreference|WhatIfPreference))((?:\.(?:\p{L}|\d|_)+)*\b)?\b</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>storage.modifier.scope.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>variable.other.normal.powershell</string> - </dict> - <key>4</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:(\$)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+))((?:\.(?:\p{L}|\d|_)+)*\b)?</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>storage.modifier.scope.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>variable.other.readwrite.powershell</string> - </dict> - <key>4</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>5</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:(\$\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\}))((?:\.(?:\p{L}|\d|_)+)*\b)?</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>support.variable.drive.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>variable.other.readwrite.powershell</string> - </dict> - <key>4</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:(\$)((?:\p{L}|\d|_)+:)?((?:\p{L}|\d|_)+))((?:\.(?:\p{L}|\d|_)+)*\b)?</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>support.variable.drive.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>variable.other.readwrite.powershell</string> - </dict> - <key>4</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>5</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:(\$\{)((?:\p{L}|\d|_)+:)?([^}]*[^}`])(\}))((?:\.(?:\p{L}|\d|_)+)*\b)?</string> - </dict> - </array> - </dict> - <key>variableNoProperty</key> - <dict> - <key>patterns</key> - <array> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>constant.language.powershell</string> - </dict> - </dict> - <key>comment</key> - <string>These are special constants.</string> - <key>match</key> - <string>(\$)(?i:(False|Null|True))\b</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>support.constant.variable.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>comment</key> - <string>These are the other built-in constants.</string> - <key>match</key> - <string>(\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))\b</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>support.variable.automatic.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>comment</key> - <string>Automatic variables are not constants, but they are read-only...</string> - <key>match</key> - <string>(\$)(?i:(\$|\^|\?|_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This))\b</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>variable.language.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>comment</key> - <string>Style preference variables as language variables so that they stand out.</string> - <key>match</key> - <string>(\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|ProgressPreference|PsCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|VerbosePreference|WarningPreference|WhatIfPreference))\b</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>storage.modifier.scope.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>variable.other.normal.powershell</string> - </dict> - <key>4</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:(\$)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+))</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>storage.modifier.scope.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>variable.other.readwrite.powershell</string> - </dict> - <key>4</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>5</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:(\$\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\}))</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>support.variable.drive.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>variable.other.readwrite.powershell</string> - </dict> - <key>4</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:(\$)((?:\p{L}|\d|_)+:)?((?:\p{L}|\d|_)+))</string> - </dict> - <dict> - <key>captures</key> - <dict> - <key>1</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>2</key> - <dict> - <key>name</key> - <string>support.variable.drive.powershell</string> - </dict> - <key>3</key> - <dict> - <key>name</key> - <string>variable.other.readwrite.powershell</string> - </dict> - <key>4</key> - <dict> - <key>name</key> - <string>keyword.other.powershell</string> - </dict> - <key>5</key> - <dict> - <key>name</key> - <string>entity.name.function.invocation.powershell</string> - </dict> - </dict> - <key>match</key> - <string>(?i:(\$\{)((?:\p{L}|\d|_)+:)?([^}]*[^}`])(\}))</string> - </dict> - </array> - </dict> - </dict> - <key>scopeName</key> - <string>source.powershell</string> - <key>uuid</key> - <string>f8f5ffb0-503e-11df-9879-0800200c9a66</string> -</dict> -</plist> diff --git a/extensions/powershell/syntaxes/powershell.tmLanguage.json b/extensions/powershell/syntaxes/powershell.tmLanguage.json new file mode 100644 index 00000000000..d6be0473f78 --- /dev/null +++ b/extensions/powershell/syntaxes/powershell.tmLanguage.json @@ -0,0 +1,1070 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/PowerShell/EditorSyntax/blob/master/PowerShellSyntax.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." + ], + "version": "https://github.com/PowerShell/EditorSyntax/commit/d605150f48952ba4bd28d7b389e97adc1a5d9b76", + "fileTypes": [ + "ps1", + "psm1", + "psd1" + ], + "name": "PowerShell", + "patterns": [ + { + "begin": "(--%)", + "beginCaptures": { + "1": { + "name": "keyword.operator.powershell" + } + }, + "comment": "Stop Parsing", + "end": "$", + "patterns": [ + { + "include": "#lineComment" + }, + { + "match": "(.)", + "name": "support.other.powershell" + } + ] + }, + { + "include": "#illegalBacktick" + }, + { + "include": "#lineComment" + }, + { + "include": "#blockComment" + }, + { + "include": "#stringDoubleQuoted" + }, + { + "include": "#stringSingleQuoted" + }, + { + "include": "#stringDoubleQuotedHeredoc" + }, + { + "include": "#stringSingleQuotedHeredoc" + }, + { + "include": "#switch" + }, + { + "include": "#scriptBlock" + }, + { + "include": "#subExpression" + }, + { + "include": "#arrayDeclaration" + }, + { + "include": "#redirection" + }, + { + "include": "#numericConstant" + }, + { + "include": "#operators" + }, + { + "include": "#type" + }, + { + "include": "#function" + }, + { + "include": "#enum" + }, + { + "include": "#class" + }, + { + "include": "#reservedWords" + }, + { + "include": "#controlWords" + }, + { + "include": "#commands" + }, + { + "include": "#executableFiles" + }, + { + "include": "#illegalVariable" + }, + { + "include": "#variable" + } + ], + "repository": { + "arrayDeclaration": { + "begin": "(\\@?\\()", + "beginCaptures": { + "0": { + "name": "keyword.other.powershell" + } + }, + "end": "(\\))((\\.[\\w\"']+)*)", + "endCaptures": { + "1": { + "name": "keyword.other.powershell" + }, + "2": { + "name": "entity.other.attribute-name.powershell" + } + }, + "name": "meta.array.powershell", + "patterns": [ + { + "include": "$self" + } + ] + }, + "blockComment": { + "begin": "(<#)", + "end": "(#>)", + "name": "comment.block.powershell", + "patterns": [ + { + "include": "#commentEmbeddedDocs" + } + ] + }, + "class": { + "begin": "(?<!\\w|-)(?i:(class))\\s+(\\w+)(?:\\s*(:)\\s*(\\w+))?\\s*\\{", + "beginCaptures": { + "1": { + "name": "storage.type.powershell" + }, + "2": { + "name": "entity.name.function.powershell" + }, + "3": { + "name": "keyword.operator.powershell" + }, + "4": { + "name": "entity.other.inherited-class.powershell" + } + }, + "comment": "Class", + "end": "\\}", + "name": "meta.class.powershell", + "patterns": [ + { + "include": "#classReservedWords" + }, + { + "include": "#classBaseKeyword" + }, + { + "include": "$self" + } + ] + }, + "classBaseKeyword": { + "captures": { + "1": { + "name": "keyword.operator.powershell" + }, + "2": { + "name": "keyword.control.class.powershell" + } + }, + "comment": "The base keyword used in classes.", + "match": "(:)\\s*(?i:(base))\\s*(?=\\()" + }, + "classReservedWords": { + "comment": "Reserved words for classes.", + "match": "\\b(?i:(hidden|static))\\b", + "name": "keyword.other.powershell" + }, + "commandParameter": { + "patterns": [ + { + "comment": "-Parameter value", + "match": "\\s(-\\w+)(:)?", + "name": "variable.parameter.powershell" + } + ] + }, + "commands": { + "patterns": [ + { + "begin": "(?<!\\\\)\\b((?i:(Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write))-(\\w+))\\b(?!\\.|\\\\)", + "beginCaptures": { + "1": { + "name": "support.function.powershell" + } + }, + "comment": "Generic function match based on Verb-Noun pair using list of approved verbs.", + "end": "((?=\\))|(?=\\})|(?<!`)\\n|(?<!`)\\r|(\\|))", + "endCaptures": { + "2": { + "name": "keyword.operator.powershell" + } + }, + "name": "meta.command.powershell", + "patterns": [ + { + "include": "#scriptblock" + }, + { + "include": "#commandParameter" + }, + { + "include": "#lineComment" + }, + { + "include": "#redirection" + }, + { + "include": "#numericConstant" + }, + { + "include": "#operators" + }, + { + "include": "#variable" + }, + { + "include": "#stringDoubleQuoted" + }, + { + "include": "#stringSingleQuoted" + }, + { + "include": "#arrayDeclaration" + }, + { + "include": "#illegalBacktick" + }, + { + "include": "#illegalVariable" + } + ] + }, + { + "begin": "(?<!\\\\)\\b(?i:foreach-object|tee-object|where-object|sort-object)\\b(?!\\.|\\\\)", + "beginCaptures": { + "0": { + "name": "support.function.powershell" + } + }, + "comment": "Built-in commands that don't adhere to the approved verbs standard.", + "end": "((?=\\))|(?=\\})|(?<!`)\\n|(?<!`)\\r|(\\|))", + "endCaptures": { + "2": { + "name": "keyword.operator.powershell" + } + }, + "name": "meta.command.powershell", + "patterns": [ + { + "include": "#scriptblock" + }, + { + "include": "#commandParameter" + }, + { + "include": "#lineComment" + }, + { + "include": "#redirection" + }, + { + "include": "#numericConstant" + }, + { + "include": "#operators" + }, + { + "include": "#variable" + }, + { + "include": "#stringDoubleQuoted" + }, + { + "include": "#stringSingleQuoted" + }, + { + "include": "#arrayDeclaration" + }, + { + "include": "#illegalBacktick" + }, + { + "include": "#illegalVariable" + } + ] + }, + { + "begin": "(?<!\\\\|\\[)\\b(?i:ac|asnp|cat|cd|cfs|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|curl|cvpa|dbp|del|diff|dir|dnsn|ebp|echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fhx|fl|ft|fw|gal|gbp|gc|gcb|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps|gpv|group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md|measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri|rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|scb|select|set|shcm|si|sl|sleep|sls|sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|wget|wjb|write)\\b(?!\\.|\\\\|\\])", + "beginCaptures": { + "0": { + "name": "support.function.powershell" + } + }, + "comment": "Built-in aliases", + "end": "((?=\\))|(?=\\})|(?<!`)\\n|(?<!`)\\r|(\\|))", + "endCaptures": { + "2": { + "name": "keyword.operator.powershell" + } + }, + "name": "meta.command.powershell", + "patterns": [ + { + "include": "#scriptblock" + }, + { + "include": "#commandParameter" + }, + { + "include": "#lineComment" + }, + { + "include": "#redirection" + }, + { + "include": "#numericConstant" + }, + { + "include": "#operators" + }, + { + "include": "#variable" + }, + { + "include": "#stringDoubleQuoted" + }, + { + "include": "#stringSingleQuoted" + }, + { + "include": "#arrayDeclaration" + }, + { + "include": "#illegalBacktick" + }, + { + "include": "#illegalVariable" + } + ] + }, + { + "begin": "(\\b(([A-Za-z0-9\\-_\\.]+).(?i:ps1))\\b)", + "beginCaptures": { + "0": { + "name": "support.function.powershell" + } + }, + "comment": "External script", + "end": "((?=\\))|(?=\\})|(?<!`)\\n|(?<!`)\\r|(\\|))", + "endCaptures": { + "2": { + "name": "keyword.operator.powershell" + } + }, + "name": "meta.command.powershell", + "patterns": [ + { + "include": "#scriptblock" + }, + { + "include": "#commandParameter" + }, + { + "include": "#lineComment" + }, + { + "include": "#redirection" + }, + { + "include": "#numericConstant" + }, + { + "include": "#operators" + }, + { + "include": "#variable" + }, + { + "include": "#stringDoubleQuoted" + }, + { + "include": "#stringSingleQuoted" + }, + { + "include": "#arrayDeclaration" + }, + { + "include": "#illegalBacktick" + }, + { + "include": "#illegalVariable" + } + ] + } + ] + }, + "commentEmbeddedDocs": { + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.operator.documentation.powershell" + }, + "2": { + "name": "keyword.operator.documentation.powershell" + } + }, + "match": "(?i:(\\.)(SYNOPSIS|DESCRIPTION|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|FUNCTIONALITY|ROLE)\\b)", + "name": "comment.documentation.embedded.powershell" + }, + { + "captures": { + "1": { + "name": "keyword.operator.documentation.powershell" + }, + "2": { + "name": "keyword.operator.documentation.powershell" + }, + "3": { + "name": "constant.string.documentation.powershell" + } + }, + "match": "(?i:(\\.)(PARAMETER|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP)\\s+(.+))", + "name": "comment.documentation.embedded.powershell" + }, + { + "captures": { + "1": { + "name": "keyword.operator.documentation.powershell" + }, + "2": { + "name": "constant.string.documentation.powershell" + } + }, + "comment": "Requires -Version", + "match": "(?i:(requires))\\s(-(?i:version)\\s\\d+(\\.\\d+)?)", + "name": "comment.documentation.embedded.powershell" + }, + { + "captures": { + "1": { + "name": "keyword.operator.documentation.powershell" + }, + "2": { + "name": "constant.string.documentation.powershell" + } + }, + "comment": "Requires -PSSnapin", + "match": "(?i:(requires))\\s(-(?i:pssnapin)\\s\\w+(\\s*-(?i:version)\\s\\d+(\\.\\d+)?)?)", + "name": "comment.documentation.embedded.powershell" + }, + { + "captures": { + "1": { + "name": "keyword.operator.documentation.powershell" + }, + "2": { + "name": "constant.string.documentation.powershell" + } + }, + "comment": "Requires -Modules", + "match": "(?i:(requires))\\s(-(?i:modules)\\s.*)", + "name": "comment.documentation.embedded.powershell" + }, + { + "captures": { + "1": { + "name": "keyword.operator.documentation.powershell" + }, + "2": { + "name": "constant.string.documentation.powershell" + } + }, + "comment": "Requires -ShellId", + "match": "(?i:(requires))\\s(-(?i:shellid)\\s.*)", + "name": "comment.documentation.embedded.powershell" + }, + { + "captures": { + "1": { + "name": "keyword.operator.documentation.powershell" + }, + "2": { + "name": "constant.string.documentation.powershell" + } + }, + "comment": "Requires -RunAsAdministrator", + "match": "(?i:(requires))\\s(-(?i:runasadministrator))", + "name": "comment.documentation.embedded.powershell" + } + ] + }, + "controlWords": { + "match": "(\\b(?<!-|\\$)(?i:begin|process|exit|break|return|catch|finally|for|continue|foreach|throw|from|trap|try|do|if|until|in|using|else|elseif|while|end|where)\\b(?!-|\\.))", + "name": "keyword.control.powershell" + }, + "defaultKeyword": { + "captures": { + "0": { + "name": "keyword.other.powershell" + } + }, + "comment": "Default is a reserved word when used in Switch statements. This is kind of a work-around - it will highlight only inside scriptblocks.", + "match": "(?i:(default))\\s*(?=\\{)" + }, + "enum": { + "captures": { + "1": { + "name": "storage.type.powershell" + }, + "2": { + "name": "entity.name.function" + } + }, + "comment": "capture should be entity.name.type, but it doesn't provide a good color in the default schema.", + "match": "(?<!\\w|-)(?i:(enum))\\s+(\\w+)\\s+" + }, + "executableFiles": { + "comment": "Executable files, like exe, com, cmd and bat", + "match": "(\\b(([A-Za-z0-9\\-_\\.]+).(?i:exe|com|cmd|bat))\\b)", + "name": "support.function.powershell" + }, + "function": { + "begin": "(?<!\\S)(?i)(function|filter|workflow|configuration)\\s+(?:(global|local|script|private):)?((?:\\p{L}|\\d|_|-|\\.)+)", + "beginCaptures": { + "0": { + "name": "meta.function" + }, + "1": { + "name": "storage.type" + }, + "2": { + "name": "storage.modifier.scope.powershell" + }, + "3": { + "name": "entity.name.function.powershell" + } + }, + "end": "\\{|\\(", + "patterns": [ + { + "include": "#lineComment" + } + ] + }, + "hashTable": { + "begin": "(@\\{)", + "end": "(\\})", + "name": "meta.hashtable.powershell", + "patterns": [ + { + "include": "$self" + } + ] + }, + "illegalBacktick": { + "comment": "Any characters (other than new line) after a back-tick, is illegal in PowerShell.", + "match": "(`(?!$))", + "name": "invalid.illegal.powershell" + }, + "illegalVariable": { + "match": "\\$\\w+:\\s", + "name": "invalid.illegal.powershell" + }, + "lineComment": { + "begin": "(^#|\\s#)", + "comment": "Line comment - must start with new line or at least one whitespace character before the '#'.", + "end": "$", + "name": "comment.line.number-sign.powershell", + "patterns": [ + { + "include": "#commentEmbeddedDocs" + } + ] + }, + "numericConstant": { + "patterns": [ + { + "comment": "Real [(+|-)] digits . digits [e [(+|-)] digits] [(d|l)] [(kb|mb|gb|tb|pb)]", + "match": "(?<!\\w)([-+]?)\\d+\\.\\d+(?i:e(\\+|-){0,1}\\d+){0,1}(?i:d|l){0,1}(?i:kb|mb|gb|tb|pb){0,1}(?!\\w|\\d)", + "name": "constant.numeric.real.powershell" + }, + { + "comment": "Real [(+|-)] . digits [e [(+|-)] digits] [(d|l)] [(kb|mb|gb|tb|pb)]", + "match": "(?<!\\.|\\d|\\w)([-+]?)\\.\\d+(?i:e(\\+|-){0,1}\\d+){0,1}(?i:d|l){0,1}(?i:kb|mb|gb|tb|pb){0,1}(?!\\w|\\d)", + "name": "constant.numeric.real.powershell" + }, + { + "comment": "Real [(+|-)] digits . [e [(+|-)] digits] [(d|l)] [(kb|mb|gb|tb|pb)]", + "match": "(?<!\\w)([-+]?)(?<!\\d)\\d+\\.(?i:e(\\+|-){0,1}\\d+){0,1}(?i:d|l){0,1}(?i:kb|mb|gb|tb|pb){0,1}(?!\\w|\\d|\\.)", + "name": "constant.numeric.real.powershell" + }, + { + "comment": "Integer [(+|-)] digits [(d|l)] [(kb|mb|gb|tb|pb)]", + "match": "(?<!\\w|\\w\\.)([-+]?)\\d+(?i:d|l){0,1}(?i:kb|mb|gb|tb|pb){0,1}(?!\\w|\\d)", + "name": "constant.numeric.integer.powershell" + }, + { + "comment": "Real [(+|-)] digits [e [(+|-)] digits] [(d|l)] [(kb|mb|gb|tb|pb)]", + "match": "(?<!\\w|\\.)([-+]?)(?<!\\d)\\d+(?i:e(\\+|-){0,1}\\d+){0,1}(?i:d|l){0,1}(?i:kb|mb|gb|tb|pb){0,1}(?!\\w|\\d|\\.)", + "name": "constant.numeric.real.powershell" + }, + { + "comment": "Hexadecimal 0x 0-f [l] [kb|mb|gb|tb|pb]", + "match": "(?<!\\w|\\d)([-+]?)(?i:0x)(?i:[0-9a-f])+(?i:l){0,1}(?i:kb|mb|gb|tb|pb){0,1}(?!\\w|\\d)", + "name": "constant.numeric.hexadecimal.powershell" + } + ] + }, + "operators": { + "patterns": [ + { + "comment": "Comparison", + "match": "(?<=\\d|\\s|^)-(?i:as|is|isnot|in|notin|join|((c|i)?(eq|ne|gt|lt|ge|le|like|notlike|split|replace|contains|notcontains|match|notmatch))|shl|shr)\\b(?!\\.|\\\\)", + "name": "keyword.operator.comparison.powershell" + }, + { + "comment": "Bitwise", + "match": "(?<=\\d|\\s|^)-(?i:band|bor|bxor|bnot|shr|shl)\\b", + "name": "keyword.operator.bitwise.powershell" + }, + { + "comment": "Logical", + "match": "(?<=\\d|\\s|^)-(?i:and|or|xor)\\b", + "name": "keyword.operator.logical.powershell" + }, + { + "comment": "Format", + "match": "(?<=\\d|\\s|^)-(?i:f)\\b", + "name": "keyword.operator.format.powershell" + }, + { + "comment": "Assignment", + "match": "(=|-=|\\+=|\\*=|/=|%=)", + "name": "keyword.operator.assignment.powershell" + }, + { + "comment": "Logical NOT", + "match": "(?<=\\d|\\s|^)((?i:-not)|!)", + "name": "keyword.operator.unary.logical-not.powershell" + }, + { + "comment": "Multiplicative", + "match": "([*/%])(?!\\.)", + "name": "keyword.operator.multiplicative.powershell" + }, + { + "comment": "Unary Plus", + "match": "([+](?=\\$|\\(|\"))", + "name": "keyword.operator.unary-plus.powershell" + }, + { + "comment": "Unary Minus", + "match": "([-](?=\\$|\\(|\"))", + "name": "keyword.operator.unary-minus.powershell" + }, + { + "comment": "Additive", + "match": "([+-])(?!\\{|\\p{L}|@)", + "name": "keyword.operator.additive.powershell" + }, + { + "comment": "Range", + "match": "(\\.\\.)", + "name": "keyword.operator.range.powershell" + }, + { + "comment": "Command invocation (Call)", + "match": "(&|\\|)", + "name": "keyword.operator.other.powershell" + } + ] + }, + "redirection": { + "patterns": [ + { + "comment": "Merging redirection", + "match": "(?<=\\s|^)([2-6\\*]?>&1)", + "name": "keyword.operator.redirection.powershell" + }, + { + "comment": "File redirection", + "match": "(?<=\\s|^)(([1-6\\*]?>{1,2})|(<))", + "name": "keyword.operator.redirection.powershell" + } + ] + }, + "reservedWords": { + "match": "(\\b(?<!-|\\$)(?i:configuration|node|enum|filter|sequence|class|data|define|function|dynamicparam|inlinescript|var|parallel|param|workflow)\\b(?!-|\\.))", + "name": "keyword.other.powershell" + }, + "scriptBlock": { + "begin": "(\\{)", + "end": "(\\})", + "name": "meta.scriptblock.powershell", + "patterns": [ + { + "include": "$self" + }, + { + "include": "#defaultKeyword" + } + ] + }, + "stringDoubleQuoted": { + "begin": "((?<!\\\")\\\")", + "end": "(\\\"(?!\\\"))", + "name": "string.quoted.double.powershell", + "patterns": [ + { + "include": "#illegalVariable" + }, + { + "include": "#stringEscapeChars" + }, + { + "include": "#variableWithoutPropertyHighlighting" + }, + { + "include": "#subExpression" + } + ] + }, + "stringDoubleQuotedHeredoc": { + "begin": "(\\@\"\\s*$)", + "end": "^\"\\@", + "name": "string.quoted.double.heredoc.powershell", + "patterns": [ + { + "include": "#illegalVariable" + }, + { + "include": "#stringEscapeChars" + }, + { + "include": "#variableWithoutPropertyHighlighting" + }, + { + "include": "#subExpression" + }, + { + "include": "#scriptBlock" + } + ] + }, + "stringEscapeChars": { + "patterns": [ + { + "match": "(`[0abfnrtv\"'$`])", + "name": "constant.character.escape.powershell" + }, + { + "match": "(\"\")", + "name": "constant.character.escape.powershell" + } + ] + }, + "stringSingleQuoted": { + "begin": "((?<!')')", + "end": "('(?!'))", + "name": "string.quoted.single.powershell", + "patterns": [ + { + "include": "#stringSingleQuotedDouble" + } + ] + }, + "stringSingleQuotedDouble": { + "match": "('')", + "name": "constant.character.escape.powershell" + }, + "stringSingleQuotedHeredoc": { + "begin": "(\\@'\\s*$)", + "end": "^'\\@", + "name": "string.quoted.single.heredoc.powershell", + "patterns": [ + { + "include": "#stringSingleQuotedDouble" + } + ] + }, + "subExpression": { + "begin": "(\\$\\()", + "captures": { + "0": { + "name": "keyword.other.powershell" + } + }, + "end": "(\\))", + "name": "meta.subexpression.powershell", + "patterns": [ + { + "include": "$self" + }, + { + "match": "(.)", + "name": "source.powershell" + } + ] + }, + "switch": { + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.control.powershell" + }, + "2": { + "name": "variable.parameter.powershell" + }, + "4": { + "name": "variable.parameter.powershell" + }, + "5": { + "name": "variable.parameter.powershell" + } + }, + "comment": "switch [-regex|-wildcard|-exact][-casesensitive] -file filename", + "match": "\\b(?i:(switch))\\b\\s+(?i:(-regex|-wildcard|-exact){0,1})\\s*(?i:(-casesensitive){0,1})\\s*(?i:(-file))\\s+" + }, + { + "captures": { + "1": { + "name": "keyword.control.powershell" + }, + "2": { + "name": "variable.parameter.powershell" + }, + "3": { + "name": "variable.parameter.powershell" + } + }, + "comment": "switch [-regex|-wildcard|-exact][-casesensitive] (<value>)", + "match": "\\b(?i:(switch))\\b\\s+(?i:(-regex|-wildcard|-exact){0,1})\\s*(?i:(-casesensitive){0,1})\\s*" + } + ] + }, + "type": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "keyword.other.powershell" + } + }, + "comment": "Type []", + "end": "(\\])(::[\\w]+)*((\\.[\\w\"']+)*)", + "endCaptures": { + "1": { + "name": "keyword.other.powershell" + }, + "2": { + "name": "meta.method.powershell" + }, + "3": { + "name": "entity.other.attribute-name.powershell" + } + }, + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "keyword.other.powershell" + } + }, + "comment": "Parenthesis ()", + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.other.powershell" + } + }, + "patterns": [ + { + "include": "$self" + }, + { + "comment": "Reserved words within [( )]", + "match": "\\b(?i)(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|positionalbinding|helpuri|confirmimpact|helpmessage)\\b", + "name": "entity.other.attribute-name.powershell" + } + ] + }, + { + "include": "$self" + }, + { + "match": "(.(`){0,2}(\\d){0,2})", + "name": "entity.name.type" + } + ] + }, + "variable": { + "patterns": [ + { + "comment": "Invalid variable name", + "match": "(\\$)(\\w+-\\w+)\\b", + "name": "invalid.illegal.powershell" + }, + { + "captures": { + "1": { + "name": "constant.language.powershell" + }, + "2": { + "name": "constant.language.powershell" + }, + "3": { + "name": "entity.other.attribute-name.powershell" + } + }, + "comment": "Automatic variables - read-only.", + "match": "(\\$)(?i:(_|args|consolefilename|error|event|eventsubscriber|executioncontext|false|foreach|home|host|input|lastexitcode|matches|myinvocation|nestedpromptlevel|null|pid|psboundparameters|pscmdlet|psculture|psdebugcontext|pshome|psitem|psscriptroot|psuiculture|psversiontable|pwd|sender|shellid|sourceargs|sourceeventargs|switch|this|true))\\b((\\.[\\w\"'\\- @#]+)*)" + }, + { + "captures": { + "1": { + "name": "keyword.other.powershell" + }, + "2": { + "name": "storage.modifier.scope.powershell" + }, + "3": { + "name": "variable.other.readwrite.powershell" + }, + "4": { + "name": "variable.other.readwrite.powershell" + }, + "5": { + "name": "entity.other.attribute-name.powershell" + } + }, + "comment": "$var, $local:var", + "match": "(\\$)((?i:global|local|script|private|using|env|function|alias|cert|variable|hkcu|hklm|wsman):)?(\\w+)(:\\w+)?((\\.[\\w\"'\\- @#]+)*)" + }, + { + "captures": { + "1": { + "name": "keyword.other.powershell" + }, + "2": { + "name": "keyword.other.powershell" + }, + "3": { + "name": "storage.modifier.scope.powershell" + }, + "4": { + "name": "variable.other.readwrite.powershell" + }, + "5": { + "name": "keyword.other.powershell" + }, + "6": { + "name": "entity.other.attribute-name.powershell" + } + }, + "comment": "${var}, ${script:var}", + "match": "(\\$)(\\{)((?i:global|local|script|private|using|env|function|alias|cert|variable|hkcu|hklm|wsman):)?(.+?)(\\})((\\.[\\w\"'\\- @#]+)*)" + }, + { + "captures": { + "1": { + "name": "keyword.other.powershell" + }, + "2": { + "name": "variable.other.readwrite.powershell" + } + }, + "comment": "Splatting", + "match": "(@)(\\w+)" + } + ] + }, + "variableWithoutPropertyHighlighting": { + "patterns": [ + { + "comment": "Invalid variable name", + "match": "(\\$)(\\w+-\\w+)\\b", + "name": "invalid.illegal.powershell" + }, + { + "captures": { + "1": { + "name": "constant.language.powershell" + }, + "2": { + "name": "constant.language.powershell" + } + }, + "comment": "Automatic variables - read-only.", + "match": "(\\$)(?i:(_|args|consolefilename|error|event|eventsubscriber|executioncontext|false|foreach|home|host|input|lastexitcode|matches|myinvocation|nestedpromptlevel|null|pid|psboundparameters|pscmdlet|psculture|psdebugcontext|pshome|psitem|psscriptroot|psuiculture|psversiontable|pwd|sender|shellid|sourceargs|sourceeventargs|switch|this|true))\\b" + }, + { + "captures": { + "1": { + "name": "keyword.other.powershell" + }, + "2": { + "name": "storage.modifier.scope.powershell" + }, + "3": { + "name": "variable.other.readwrite.powershell" + }, + "4": { + "name": "variable.other.readwrite.powershell" + } + }, + "comment": "$var, $local:var", + "match": "(\\$)((?i:global|local|script|private|using|env|function|alias|cert|variable|hkcu|hklm|wsman):)?(\\w+)(:\\w+)?" + }, + { + "captures": { + "1": { + "name": "keyword.other.powershell" + }, + "2": { + "name": "keyword.other.powershell" + }, + "3": { + "name": "storage.modifier.scope.powershell" + }, + "4": { + "name": "variable.other.readwrite.powershell" + }, + "5": { + "name": "keyword.other.powershell" + } + }, + "comment": "${var}, ${script:var}", + "match": "(\\$)(\\{)((?i:global|local|script|private|using|env|function|alias|cert|variable|hkcu|hklm|wsman):)?(.+?)(\\})" + }, + { + "captures": { + "1": { + "name": "keyword.other.powershell" + }, + "2": { + "name": "variable.other.readwrite.powershell" + } + }, + "comment": "Splatting", + "match": "(@)(\\w+)" + } + ] + } + }, + "scopeName": "source.powershell", + "uuid": "f8f5ffb0-503e-11df-9879-0800200c9a66" +} \ No newline at end of file diff --git a/extensions/powershell/test/colorize-results/test_ps1.json b/extensions/powershell/test/colorize-results/test_ps1.json index bce680fee40..d381e13b11d 100644 --- a/extensions/powershell/test/colorize-results/test_ps1.json +++ b/extensions/powershell/test/colorize-results/test_ps1.json @@ -44,7 +44,7 @@ } }, { - "c": "() {", + "c": "() ", "t": "source.powershell", "r": { "dark_plus": "default: #D4D4D4", @@ -54,9 +54,20 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "{", + "t": "source.powershell meta.scriptblock.powershell", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -67,7 +78,7 @@ }, { "c": "try", - "t": "source.powershell keyword.control.powershell", + "t": "source.powershell meta.scriptblock.powershell keyword.control.powershell", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", @@ -77,8 +88,19 @@ } }, { - "c": " {", - "t": "source.powershell", + "c": " ", + "t": "source.powershell meta.scriptblock.powershell", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -89,7 +111,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -100,7 +122,7 @@ }, { "c": "$", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -111,7 +133,7 @@ }, { "c": "identity", - "t": "source.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -122,7 +144,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -133,7 +155,7 @@ }, { "c": "=", - "t": "source.powershell keyword.operator.assignment.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.operator.assignment.powershell", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -144,7 +166,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -154,19 +176,41 @@ } }, { - "c": "[Security.Principal.WindowsIdentity]", - "t": "source.powershell entity.other.attribute-name", + "c": "[", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.other.powershell", "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" + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": "Security.Principal.WindowsIdentity", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell entity.name.type", + "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.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.other.powershell", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" } }, { "c": "::GetCurrent", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.method.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -177,7 +221,7 @@ }, { "c": "()", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -188,7 +232,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -199,7 +243,7 @@ }, { "c": "$", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -210,7 +254,7 @@ }, { "c": "principal", - "t": "source.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -221,7 +265,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -232,7 +276,7 @@ }, { "c": "=", - "t": "source.powershell keyword.operator.assignment.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.operator.assignment.powershell", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -243,7 +287,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -254,7 +298,7 @@ }, { "c": "New-Object", - "t": "source.powershell support.function.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.command.powershell support.function.powershell", "r": { "dark_plus": "support.function: #DCDCAA", "light_plus": "support.function: #795E26", @@ -264,8 +308,8 @@ } }, { - "c": " Security.Principal.WindowsPrincipal ", - "t": "source.powershell", + "c": " Security.Principal.WindowsPrincipal", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.command.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -275,19 +319,19 @@ } }, { - "c": "-", - "t": "source.powershell keyword.operator.assignment.powershell", + "c": " -ArgumentList", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.command.powershell variable.parameter.powershell", "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": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" } }, { - "c": "ArgumentList ", - "t": "source.powershell", + "c": " ", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.command.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -298,7 +342,7 @@ }, { "c": "$", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.command.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -309,7 +353,7 @@ }, { "c": "identity", - "t": "source.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.command.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -320,7 +364,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -331,7 +375,7 @@ }, { "c": "return", - "t": "source.powershell keyword.control.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.control.powershell", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", @@ -342,7 +386,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -353,7 +397,7 @@ }, { "c": "$", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -364,7 +408,7 @@ }, { "c": "principal", - "t": "source.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -375,18 +419,18 @@ }, { "c": ".IsInRole", - "t": "source.powershell entity.name.function.invocation.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell entity.other.attribute-name.powershell", "r": { - "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" + "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": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -397,7 +441,7 @@ }, { "c": " ", - "t": "source.powershell interpolated.simple.source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -407,19 +451,52 @@ } }, { - "c": "[Security.Principal.WindowsBuiltInRole]", - "t": "source.powershell interpolated.simple.source.powershell entity.other.attribute-name", + "c": "[", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "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" + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" } }, { - "c": "::Administrator ", - "t": "source.powershell interpolated.simple.source.powershell", + "c": "Security.Principal.WindowsBuiltInRole", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell entity.name.type", + "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.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": "::Administrator", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell meta.method.powershell", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -430,7 +507,7 @@ }, { "c": ")", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -440,8 +517,19 @@ } }, { - "c": " } ", - "t": "source.powershell", + "c": " }", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -452,7 +540,7 @@ }, { "c": "catch", - "t": "source.powershell keyword.control.powershell", + "t": "source.powershell meta.scriptblock.powershell keyword.control.powershell", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", @@ -462,8 +550,19 @@ } }, { - "c": " {", - "t": "source.powershell", + "c": " ", + "t": "source.powershell meta.scriptblock.powershell", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -474,7 +573,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -485,7 +584,7 @@ }, { "c": "throw", - "t": "source.powershell keyword.control.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.control.powershell", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", @@ -496,7 +595,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -507,7 +606,7 @@ }, { "c": "\"Failed to determine if the current user has elevated privileges. The error was: '{0}'.\"", - "t": "source.powershell string.quoted.double.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell string.quoted.double.powershell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -518,7 +617,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -529,7 +628,7 @@ }, { "c": "-f", - "t": "source.powershell keyword.operator.string-format.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.operator.format.powershell", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -540,7 +639,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -550,30 +649,19 @@ } }, { - "c": "$", - "t": "source.powershell keyword.other.powershell", + "c": "$_", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell constant.language.powershell", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": "_", - "t": "source.powershell support.constant.automatic.powershell", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "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" } }, { "c": " }", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -584,7 +672,7 @@ }, { "c": "}", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -639,7 +727,7 @@ }, { "c": "{", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -650,7 +738,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -661,18 +749,18 @@ }, { "c": "param", - "t": "source.powershell keyword.control.powershell", + "t": "source.powershell meta.scriptblock.powershell keyword.other.powershell", "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: #C586C0" + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" } }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -683,7 +771,7 @@ }, { "c": "(", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -694,7 +782,7 @@ }, { "c": " ", - "t": "source.powershell interpolated.simple.source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -704,107 +792,96 @@ } }, { - "c": "[Paramete", - "t": "source.powershell interpolated.simple.source.powershell entity.name.tag", + "c": "[", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "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: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" } }, { - "c": "r", - "t": "source.powershell interpolated.simple.source.powershell entity.name.tag entity.name.tag", + "c": "Parameter", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell entity.name.type", "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": "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.powershell interpolated.simple.source.powershell entity.other.attribute-name", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "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" + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" } }, { "c": "Mandatory", - "t": "source.powershell interpolated.simple.source.powershell entity.other.attribute-name entity.other.attribute-name.powershell entity.other.attribute.parameter.powershell constant.language.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell entity.other.attribute-name.powershell", "r": { - "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" + "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": "source.powershell interpolated.simple.source.powershell entity.other.attribute-name entity.other.attribute-name.powershell entity.other.attribute.parameter.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.operator.assignment.powershell", "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" + "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": "1", - "t": "source.powershell interpolated.simple.source.powershell entity.other.attribute-name entity.other.attribute-name.powershell entity.other.attribute.parameter.powershell variable.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell constant.numeric.integer.powershell", "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "entity.other.attribute-name: #9CDCFE", - "light_vs": "entity.other.attribute-name: #FF0000", - "hc_black": "variable: #9CDCFE" + "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.powershell interpolated.simple.source.powershell entity.other.attribute-name", + "c": ")][", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "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" + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" } }, { - "c": "]", - "t": "source.powershell interpolated.simple.source.powershell entity.name.tag", + "c": "string", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell entity.name.type", "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": "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": "[string]", - "t": "source.powershell interpolated.simple.source.powershell entity.other.attribute-name", - "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": "source.powershell interpolated.simple.source.powershell keyword.other.powershell", + "c": "]$", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -815,7 +892,7 @@ }, { "c": "Command", - "t": "source.powershell interpolated.simple.source.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -826,7 +903,7 @@ }, { "c": " ", - "t": "source.powershell interpolated.simple.source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -837,7 +914,7 @@ }, { "c": ")", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -848,7 +925,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -859,7 +936,7 @@ }, { "c": "foreach", - "t": "source.powershell keyword.control.powershell", + "t": "source.powershell meta.scriptblock.powershell keyword.control.powershell", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", @@ -870,7 +947,7 @@ }, { "c": "(", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -880,30 +957,19 @@ } }, { - "c": "$", - "t": "source.powershell interpolated.simple.source.powershell keyword.other.powershell", + "c": "$_", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell constant.language.powershell", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": "_", - "t": "source.powershell interpolated.simple.source.powershell support.constant.automatic.powershell", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "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" } }, { "c": " ", - "t": "source.powershell interpolated.simple.source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -914,7 +980,7 @@ }, { "c": "in", - "t": "source.powershell interpolated.simple.source.powershell keyword.control.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.control.powershell", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", @@ -925,7 +991,7 @@ }, { "c": " cmd ", - "t": "source.powershell interpolated.simple.source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -936,7 +1002,7 @@ }, { "c": "/", - "t": "source.powershell interpolated.simple.source.powershell keyword.operator.assignment.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.operator.multiplicative.powershell", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -947,7 +1013,7 @@ }, { "c": "c ", - "t": "source.powershell interpolated.simple.source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -958,7 +1024,7 @@ }, { "c": "\"", - "t": "source.powershell interpolated.simple.source.powershell string.quoted.double.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell string.quoted.double.powershell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -969,7 +1035,7 @@ }, { "c": "$", - "t": "source.powershell interpolated.simple.source.powershell string.quoted.double.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell string.quoted.double.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -980,7 +1046,7 @@ }, { "c": "Command", - "t": "source.powershell interpolated.simple.source.powershell string.quoted.double.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell string.quoted.double.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -991,7 +1057,7 @@ }, { "c": " 2>&1 & set\"", - "t": "source.powershell interpolated.simple.source.powershell string.quoted.double.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell string.quoted.double.powershell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -1002,7 +1068,7 @@ }, { "c": ")", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1012,8 +1078,19 @@ } }, { - "c": " {", - "t": "source.powershell", + "c": " ", + "t": "source.powershell meta.scriptblock.powershell", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1024,7 +1101,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1035,7 +1112,7 @@ }, { "c": "if", - "t": "source.powershell keyword.control.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.control.powershell", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", @@ -1046,7 +1123,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1057,7 +1134,7 @@ }, { "c": "(", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1067,30 +1144,19 @@ } }, { - "c": "$", - "t": "source.powershell interpolated.simple.source.powershell keyword.other.powershell", + "c": "$_", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell constant.language.powershell", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": "_", - "t": "source.powershell interpolated.simple.source.powershell support.constant.automatic.powershell", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "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" } }, { "c": " ", - "t": "source.powershell interpolated.simple.source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1101,7 +1167,7 @@ }, { "c": "-match", - "t": "source.powershell interpolated.simple.source.powershell keyword.operator.comparison.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.operator.comparison.powershell", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -1112,7 +1178,7 @@ }, { "c": " ", - "t": "source.powershell interpolated.simple.source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1123,7 +1189,7 @@ }, { "c": "'^([^=]+)=(.*)'", - "t": "source.powershell interpolated.simple.source.powershell string.quoted.single.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell string.quoted.single.powershell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -1134,7 +1200,7 @@ }, { "c": ")", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1144,8 +1210,19 @@ } }, { - "c": " {", - "t": "source.powershell", + "c": " ", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1156,7 +1233,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1166,19 +1243,41 @@ } }, { - "c": "[System.Environment]", - "t": "source.powershell entity.other.attribute-name", + "c": "[", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.other.powershell", "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" + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": "System.Environment", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell entity.name.type", + "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.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell keyword.other.powershell", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" } }, { "c": "::SetEnvironmentVariable", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.method.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1189,7 +1288,7 @@ }, { "c": "(", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1199,41 +1298,30 @@ } }, { - "c": "$", - "t": "source.powershell interpolated.simple.source.powershell keyword.other.powershell", + "c": "$matches", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell constant.language.powershell", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": "matches", - "t": "source.powershell interpolated.simple.source.powershell support.constant.automatic.powershell", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "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" } }, { "c": "[", - "t": "source.powershell interpolated.simple.source.powershell entity.other.attribute-name", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "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" + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" } }, { "c": "1", - "t": "source.powershell interpolated.simple.source.powershell constant.numeric.scientific.powershell support.constant.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell constant.numeric.integer.powershell", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1244,40 +1332,7 @@ }, { "c": "]", - "t": "source.powershell interpolated.simple.source.powershell entity.other.attribute-name", - "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": "source.powershell interpolated.simple.source.powershell keyword.operator.other.powershell", - "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.powershell interpolated.simple.source.powershell", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "$", - "t": "source.powershell interpolated.simple.source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1287,8 +1342,8 @@ } }, { - "c": "matches", - "t": "source.powershell interpolated.simple.source.powershell support.constant.automatic.powershell", + "c": ", ", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1298,19 +1353,30 @@ } }, { - "c": "[", - "t": "source.powershell interpolated.simple.source.powershell entity.other.attribute-name", + "c": "$matches", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell constant.language.powershell", "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" + "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" + } + }, + { + "c": "[", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" } }, { "c": "2", - "t": "source.powershell interpolated.simple.source.powershell constant.numeric.scientific.powershell support.constant.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell constant.numeric.integer.powershell", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1320,19 +1386,8 @@ } }, { - "c": "]", - "t": "source.powershell interpolated.simple.source.powershell entity.other.attribute-name", - "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": "source.powershell keyword.other.powershell", + "c": "])", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1343,7 +1398,7 @@ }, { "c": " }", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1354,7 +1409,7 @@ }, { "c": " }", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1365,7 +1420,7 @@ }, { "c": "}", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1376,7 +1431,7 @@ }, { "c": "Write-Host", - "t": "source.powershell support.function.powershell", + "t": "source.powershell meta.command.powershell support.function.powershell", "r": { "dark_plus": "support.function: #DCDCAA", "light_plus": "support.function: #795E26", @@ -1386,30 +1441,19 @@ } }, { - "c": " ", - "t": "source.powershell", + "c": " -Object", + "t": "source.powershell meta.command.powershell variable.parameter.powershell", "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.powershell keyword.operator.assignment.powershell", - "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": "Object ", - "t": "source.powershell", + "c": " ", + "t": "source.powershell meta.command.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1420,7 +1464,7 @@ }, { "c": "'Initializing Azure PowerShell environment...'", - "t": "source.powershell string.quoted.single.powershell", + "t": "source.powershell meta.command.powershell string.quoted.single.powershell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -1431,13 +1475,13 @@ }, { "c": ";", - "t": "source.powershell keyword.other.statement-separator.powershell", + "t": "source.powershell meta.command.powershell", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -1475,7 +1519,7 @@ }, { "c": "(", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1486,18 +1530,18 @@ }, { "c": "!", - "t": "source.powershell interpolated.simple.source.powershell keyword.operator.unary.powershell", + "t": "source.powershell meta.array.powershell", "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": "(", - "t": "source.powershell interpolated.simple.source.powershell keyword.other.powershell", + "t": "source.powershell meta.array.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1508,7 +1552,7 @@ }, { "c": "Test-IsAdmin", - "t": "source.powershell interpolated.simple.source.powershell interpolated.simple.source.powershell support.function.powershell", + "t": "source.powershell meta.array.powershell meta.array.powershell meta.command.powershell support.function.powershell", "r": { "dark_plus": "support.function: #DCDCAA", "light_plus": "support.function: #795E26", @@ -1519,7 +1563,7 @@ }, { "c": ")", - "t": "source.powershell interpolated.simple.source.powershell keyword.other.powershell", + "t": "source.powershell meta.array.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1530,7 +1574,7 @@ }, { "c": ")", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1541,7 +1585,7 @@ }, { "c": "{", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1552,7 +1596,7 @@ }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1563,7 +1607,7 @@ }, { "c": "Write-Host", - "t": "source.powershell support.function.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.command.powershell support.function.powershell", "r": { "dark_plus": "support.function: #DCDCAA", "light_plus": "support.function: #795E26", @@ -1573,30 +1617,19 @@ } }, { - "c": " ", - "t": "source.powershell", + "c": " -Object", + "t": "source.powershell meta.scriptblock.powershell meta.command.powershell variable.parameter.powershell", "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.powershell keyword.operator.assignment.powershell", - "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": "Object ", - "t": "source.powershell", + "c": " ", + "t": "source.powershell meta.scriptblock.powershell meta.command.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1607,7 +1640,7 @@ }, { "c": "'Please launch command under administrator account. It is needed for environment setting up and unit test.'", - "t": "source.powershell string.quoted.single.powershell", + "t": "source.powershell meta.scriptblock.powershell meta.command.powershell string.quoted.single.powershell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -1617,8 +1650,19 @@ } }, { - "c": " ", - "t": "source.powershell", + "c": " -ForegroundColor", + "t": "source.powershell meta.scriptblock.powershell meta.command.powershell variable.parameter.powershell", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " Red;", + "t": "source.powershell meta.scriptblock.powershell meta.command.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1627,42 +1671,9 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": "-", - "t": "source.powershell keyword.operator.assignment.powershell", - "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": "ForegroundColor Red", - "t": "source.powershell", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": ";", - "t": "source.powershell keyword.other.statement-separator.powershell", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, { "c": "}", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1684,13 +1695,13 @@ }, { "c": "env:", - "t": "source.powershell support.variable.drive.powershell", + "t": "source.powershell storage.modifier.scope.powershell", "r": { - "dark_plus": "support.variable: #9CDCFE", - "light_plus": "support.variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "support.variable: #9CDCFE" + "dark_plus": "storage.modifier: #569CD6", + "light_plus": "storage.modifier: #0000FF", + "dark_vs": "storage.modifier: #569CD6", + "light_vs": "storage.modifier: #0000FF", + "hc_black": "storage.modifier: #569CD6" } }, { @@ -1739,7 +1750,7 @@ }, { "c": "Split-Path", - "t": "source.powershell support.function.powershell", + "t": "source.powershell meta.command.powershell support.function.powershell", "r": { "dark_plus": "support.function: #DCDCAA", "light_plus": "support.function: #795E26", @@ -1748,53 +1759,20 @@ "hc_black": "support.function: #DCDCAA" } }, + { + "c": " -Parent -Path", + "t": "source.powershell meta.command.powershell variable.parameter.powershell", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, { "c": " ", - "t": "source.powershell", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "-", - "t": "source.powershell keyword.operator.assignment.powershell", - "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": "Parent ", - "t": "source.powershell", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "-", - "t": "source.powershell keyword.operator.assignment.powershell", - "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": "Path ", - "t": "source.powershell", + "t": "source.powershell meta.command.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1805,7 +1783,7 @@ }, { "c": "$", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.command.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1816,18 +1794,18 @@ }, { "c": "env:", - "t": "source.powershell support.variable.drive.powershell", + "t": "source.powershell meta.command.powershell storage.modifier.scope.powershell", "r": { - "dark_plus": "support.variable: #9CDCFE", - "light_plus": "support.variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "support.variable: #9CDCFE" + "dark_plus": "storage.modifier: #569CD6", + "light_plus": "storage.modifier: #0000FF", + "dark_vs": "storage.modifier: #569CD6", + "light_vs": "storage.modifier: #0000FF", + "hc_black": "storage.modifier: #569CD6" } }, { "c": "AzurePSRoot", - "t": "source.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.command.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -1838,13 +1816,13 @@ }, { "c": ";", - "t": "source.powershell keyword.other.statement-separator.powershell", + "t": "source.powershell meta.command.powershell", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -1871,7 +1849,7 @@ }, { "c": "(", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1882,7 +1860,7 @@ }, { "c": "Test-Path", - "t": "source.powershell interpolated.simple.source.powershell support.function.powershell", + "t": "source.powershell meta.array.powershell meta.command.powershell support.function.powershell", "r": { "dark_plus": "support.function: #DCDCAA", "light_plus": "support.function: #795E26", @@ -1892,30 +1870,19 @@ } }, { - "c": " ", - "t": "source.powershell interpolated.simple.source.powershell", + "c": " -Path", + "t": "source.powershell meta.array.powershell meta.command.powershell variable.parameter.powershell", "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.powershell interpolated.simple.source.powershell keyword.operator.assignment.powershell", - "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": "Path ", - "t": "source.powershell interpolated.simple.source.powershell", + "c": " ", + "t": "source.powershell meta.array.powershell meta.command.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1926,7 +1893,7 @@ }, { "c": "\"", - "t": "source.powershell interpolated.simple.source.powershell string.quoted.double.powershell", + "t": "source.powershell meta.array.powershell meta.command.powershell string.quoted.double.powershell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -1937,7 +1904,7 @@ }, { "c": "$", - "t": "source.powershell interpolated.simple.source.powershell string.quoted.double.powershell keyword.other.powershell", + "t": "source.powershell meta.array.powershell meta.command.powershell string.quoted.double.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1948,18 +1915,18 @@ }, { "c": "env:", - "t": "source.powershell interpolated.simple.source.powershell string.quoted.double.powershell support.variable.drive.powershell", + "t": "source.powershell meta.array.powershell meta.command.powershell string.quoted.double.powershell storage.modifier.scope.powershell", "r": { - "dark_plus": "support.variable: #9CDCFE", - "light_plus": "support.variable: #001080", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "support.variable: #9CDCFE" + "dark_plus": "storage.modifier: #569CD6", + "light_plus": "storage.modifier: #0000FF", + "dark_vs": "storage.modifier: #569CD6", + "light_vs": "storage.modifier: #0000FF", + "hc_black": "storage.modifier: #569CD6" } }, { "c": "ADXSDKProgramFiles", - "t": "source.powershell interpolated.simple.source.powershell string.quoted.double.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.array.powershell meta.command.powershell string.quoted.double.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -1970,7 +1937,7 @@ }, { "c": "\\Microsoft Visual Studio 12.0\"", - "t": "source.powershell interpolated.simple.source.powershell string.quoted.double.powershell", + "t": "source.powershell meta.array.powershell meta.command.powershell string.quoted.double.powershell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -1981,7 +1948,7 @@ }, { "c": ")", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.array.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -1991,7 +1958,7 @@ } }, { - "c": " {", + "c": " ", "t": "source.powershell", "r": { "dark_plus": "default: #D4D4D4", @@ -2001,9 +1968,20 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "{", + "t": "source.powershell meta.scriptblock.powershell", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2014,7 +1992,7 @@ }, { "c": "$", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -2025,7 +2003,7 @@ }, { "c": "vsVersion", - "t": "source.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.scriptblock.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -2036,7 +2014,7 @@ }, { "c": "=", - "t": "source.powershell keyword.operator.assignment.powershell", + "t": "source.powershell meta.scriptblock.powershell keyword.operator.assignment.powershell", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -2047,7 +2025,7 @@ }, { "c": "\"12.0\"", - "t": "source.powershell string.quoted.double.powershell", + "t": "source.powershell meta.scriptblock.powershell string.quoted.double.powershell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -2057,7 +2035,18 @@ } }, { - "c": "} ", + "c": "}", + "t": "source.powershell meta.scriptblock.powershell", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.powershell", "r": { "dark_plus": "default: #D4D4D4", @@ -2079,7 +2068,7 @@ } }, { - "c": " {", + "c": " ", "t": "source.powershell", "r": { "dark_plus": "default: #D4D4D4", @@ -2089,9 +2078,20 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "{", + "t": "source.powershell meta.scriptblock.powershell", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": " ", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2102,7 +2102,7 @@ }, { "c": "$", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.scriptblock.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -2113,7 +2113,7 @@ }, { "c": "vsVersion", - "t": "source.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.scriptblock.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -2124,7 +2124,7 @@ }, { "c": "=", - "t": "source.powershell keyword.operator.assignment.powershell", + "t": "source.powershell meta.scriptblock.powershell keyword.operator.assignment.powershell", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -2135,7 +2135,7 @@ }, { "c": "\"11.0\"", - "t": "source.powershell string.quoted.double.powershell", + "t": "source.powershell meta.scriptblock.powershell string.quoted.double.powershell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -2146,7 +2146,7 @@ }, { "c": "}", - "t": "source.powershell", + "t": "source.powershell meta.scriptblock.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2234,7 +2234,7 @@ }, { "c": "-f", - "t": "source.powershell keyword.operator.string-format.powershell", + "t": "source.powershell keyword.operator.format.powershell", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -2267,13 +2267,13 @@ }, { "c": "env:", - "t": "source.powershell support.variable.drive.powershell", + "t": "source.powershell storage.modifier.scope.powershell", "r": { - "dark_plus": "support.variable: #9CDCFE", - "light_plus": "support.variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "support.variable: #9CDCFE" + "dark_plus": "storage.modifier: #569CD6", + "light_plus": "storage.modifier: #0000FF", + "dark_vs": "storage.modifier: #569CD6", + "light_vs": "storage.modifier: #0000FF", + "hc_black": "storage.modifier: #569CD6" } }, { @@ -2288,18 +2288,7 @@ } }, { - "c": ",", - "t": "source.powershell keyword.operator.other.powershell", - "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.powershell", "r": { "dark_plus": "default: #D4D4D4", @@ -2333,28 +2322,6 @@ }, { "c": ";", - "t": "source.powershell keyword.other.statement-separator.powershell", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": "Invoke-Environment", - "t": "source.powershell support.function.powershell", - "r": { - "dark_plus": "support.function: #DCDCAA", - "light_plus": "support.function: #795E26", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "support.function: #DCDCAA" - } - }, - { - "c": " ", "t": "source.powershell", "r": { "dark_plus": "default: #D4D4D4", @@ -2365,19 +2332,30 @@ } }, { - "c": "-", - "t": "source.powershell keyword.operator.assignment.powershell", + "c": "Invoke-Environment", + "t": "source.powershell meta.command.powershell support.function.powershell", "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": "support.function: #DCDCAA", + "light_plus": "support.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.function: #DCDCAA" } }, { - "c": "Command ", - "t": "source.powershell", + "c": " -Command", + "t": "source.powershell meta.command.powershell variable.parameter.powershell", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.powershell meta.command.powershell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2388,7 +2366,7 @@ }, { "c": "$", - "t": "source.powershell keyword.other.powershell", + "t": "source.powershell meta.command.powershell keyword.other.powershell", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -2399,7 +2377,7 @@ }, { "c": "setVSEnv", - "t": "source.powershell variable.other.readwrite.powershell", + "t": "source.powershell meta.command.powershell variable.other.readwrite.powershell", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", @@ -2410,13 +2388,13 @@ }, { "c": ";", - "t": "source.powershell keyword.other.statement-separator.powershell", + "t": "source.powershell meta.command.powershell", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } } ] \ No newline at end of file diff --git a/extensions/razor/package.json b/extensions/razor/package.json index f15bf8a2a7b..5aa758a9f55 100644 --- a/extensions/razor/package.json +++ b/extensions/razor/package.json @@ -6,7 +6,7 @@ "vscode": "0.10.x" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js demyte/language-cshtml grammars/cshtml.json ./syntaxes/cshtml.json" + "update-grammar": "node ../../build/npm/update-grammar.js demyte/language-cshtml grammars/cshtml.json ./syntaxes/cshtml.tmLanguage.json" }, "contributes": { "languages": [{ @@ -19,7 +19,7 @@ "grammars": [{ "language": "razor", "scopeName": "text.html.cshtml", - "path": "./syntaxes/cshtml.json", + "path": "./syntaxes/cshtml.tmLanguage.json", "embeddedLanguages": { "section.embedded.source.cshtml": "csharp" } diff --git a/extensions/razor/syntaxes/cshtml.json b/extensions/razor/syntaxes/cshtml.tmLanguage.json similarity index 100% rename from extensions/razor/syntaxes/cshtml.json rename to extensions/razor/syntaxes/cshtml.tmLanguage.json diff --git a/extensions/scss/package.json b/extensions/scss/package.json index 37e3abc67c5..60873e98791 100644 --- a/extensions/scss/package.json +++ b/extensions/scss/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js atom/language-sass grammars/scss.cson ./syntaxes/scss.json" + "update-grammar": "node ../../build/npm/update-grammar.js atom/language-sass grammars/scss.cson ./syntaxes/scss.tmLanguage.json" }, "contributes": { "languages": [{ @@ -17,7 +17,7 @@ "grammars": [{ "language": "scss", "scopeName": "source.css.scss", - "path": "./syntaxes/scss.json" + "path": "./syntaxes/scss.tmLanguage.json" }], "problemMatchers": [{ "name": "node-sass", diff --git a/extensions/scss/syntaxes/scss.json b/extensions/scss/syntaxes/scss.tmLanguage.json similarity index 100% rename from extensions/scss/syntaxes/scss.json rename to extensions/scss/syntaxes/scss.tmLanguage.json diff --git a/extensions/shaderlab/package.json b/extensions/shaderlab/package.json index a648a353cb0..2eabed584d2 100644 --- a/extensions/shaderlab/package.json +++ b/extensions/shaderlab/package.json @@ -6,7 +6,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js tgjones/shaders-tmLanguage grammars/shaderlab.json ./syntaxes/shaderlab.json" + "update-grammar": "node ../../build/npm/update-grammar.js tgjones/shaders-tmLanguage grammars/shaderlab.json ./syntaxes/shaderlab.tmLanguage.json" }, "contributes": { "languages": [ @@ -25,7 +25,7 @@ "grammars": [ { "language": "shaderlab", - "path": "./syntaxes/shaderlab.json", + "path": "./syntaxes/shaderlab.tmLanguage.json", "scopeName": "source.shaderlab" } ] diff --git a/extensions/shaderlab/syntaxes/shaderlab.json b/extensions/shaderlab/syntaxes/shaderlab.tmLanguage.json similarity index 100% rename from extensions/shaderlab/syntaxes/shaderlab.json rename to extensions/shaderlab/syntaxes/shaderlab.tmLanguage.json diff --git a/extensions/sql/syntaxes/sql.tmLanguage.json b/extensions/sql/syntaxes/sql.tmLanguage.json index 033fc63c97f..80cb019c448 100644 --- a/extensions/sql/syntaxes/sql.tmLanguage.json +++ b/extensions/sql/syntaxes/sql.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/Microsoft/vscode-mssql/commit/cfc8b65ed6daf8252b0cbfd5611aadbd49353bca", + "version": "https://github.com/Microsoft/vscode-mssql/commit/c8effddd6a9df117f3ed45b60b487163950a7ea5", "fileTypes": [ "sql", "ddl", @@ -14,7 +14,15 @@ "name": "SQL", "patterns": [ { - "match": "\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference |automatic|autopilot|availability|availability_mode|backup_priority|base64|basic|batches|batchsize|before|bigint|binary|binding|bit|block|blocksize|bmk|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|cast|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|cleanup_policy|clear|clear_port|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create|credential|cross|cryptographic|cryptographic_provider|cube|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime|datetime2|datetimeoffset|days|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|exec|executable|exists|expand|expiredate|expiry_date|explicit|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|field_terminator|fieldterminator|file|filelistonly|filegroup|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hours|http|identity_value|if|ifnull|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kilobytes_per_batch|labelonly|langid|language|last|lastrow|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minutes|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|procedure_name|profile|provider|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|restart|restore|restricted_user|resume|retaindays|retention|return|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|schemabinding|scoped|scroll|scroll_locks|sddl|secexpr|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|session|sessions|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablock|tablockx|take|tape|target|target_index|target_partition|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|to|top|torn_page_detection|track_columns_updated|tran|transaction|transfer|triple_des|triple_des_3key|trustworthy|try|tsql|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|value|values|varbinary|varchar|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|webmethod|weekday|weight|well_formed_xml|when|widechar|widechar_ansi|widenative|windows|with|within|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|zone)\\b", + "match": "((?<!@)@)\\b(\\w+)\\b", + "name": "text.variable" + }, + { + "match": "(\\[)[^\\]]*(\\])", + "name": "text.bracketed" + }, + { + "match": "\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference |automatic|autopilot|availability|availability_mode|backup_priority|base64|basic|batches|batchsize|before|bigint|binary|binding|bit|block|blocksize|bmk|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|cast|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|cleanup_policy|clear|clear_port|close|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\s+procedure)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime|datetime2|datetimeoffset|days|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare(\\s+cursor)?|decrypt|decrypt_a|decryption|default_database|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hours|http|identity_value|if|ifnull|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minutes|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|procedure_name|profile|provider|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|restart|restore|restricted_user|resume|retaindays|retention|return|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|schemabinding|scoped|scroll|scroll_locks|sddl|secexpr|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|session|sessions|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablock|tablockx|take|tape|target|target_index|target_partition|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|to|top|torn_page_detection|track_columns_updated|tran|transaction|transfer|triple_des|triple_des_3key|trustworthy|try|tsql|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|value|values|varbinary|varchar|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|waitfor|webmethod|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|windows|with|within|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|zone)\\b", "name": "keyword.other.sql" }, { @@ -136,7 +144,7 @@ "name": "constant.numeric.sql" }, { - "match": "(?i:\\b(select(\\s+distinct)?|insert\\s+(ignore\\s+)?into|update|delete|from|set|where|group\\sby|or|like|and|union(\\s+all)?|having|order\\sby|limit|(inner|cross)\\s+join|join|straight_join|(left|right)(\\s+outer)?\\s+join|natural(\\s+(left|right)(\\s+outer)?)?\\s+join)\\b)", + "match": "(?i:\\b(select(\\s+distinct)?|insert\\s+(ignore\\s+)?into|update|delete|from|set|where|group\\sby|or|like|and|union(\\s+all)?|having|order\\sby|limit|(inner|cross)\\s+join|join|straight_join|full\\s+outer\\s+join|(left|right)(\\s+outer)?\\s+join|natural(\\s+(left|right)(\\s+outer)?)?\\s+join)\\b)", "name": "keyword.other.DML.sql" }, { @@ -188,19 +196,65 @@ "name": "keyword.operator.concatenator.sql" }, { - "comment": "List of SQL99 built-in functions from http://www.oreilly.com/catalog/sqlnut/chapter/ch04.html", - "match": "(?i)\\b(CURRENT_(DATE|TIME(STAMP)?|USER)|(SESSION|SYSTEM)_USER)\\b", - "name": "support.function.scalar.sql" - }, - { - "comment": "List of SQL99 built-in functions from http://www.oreilly.com/catalog/sqlnut/chapter/ch04.html", - "match": "(?i)\\b(AVG|COUNT|MIN|MAX|SUM)(?=\\s*\\()", + "match": "(?i)\\b(avg|checksum_agg|count|count_big|grouping|grouping_id|max|min|sum|stdev|stdevp|var|varp)\\b", "name": "support.function.aggregate.sql" }, { - "match": "(?i)\\b(CONCATENATE|CONVERT|LOWER|SUBSTRING|TRANSLATE|TRIM|UPPER)\\b", + "match": "(?i)\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\b", + "name": "support.function.conversion.sql" + }, + { + "match": "(?i)\\b(cursor_status)\\b", + "name": "support.function.cursor.sql" + }, + { + "match": "(?i)\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|eomonth|switchoffset|todatetimeoffset|isdate)\\b", + "name": "support.function.datetime.sql" + }, + { + "match": "(?i)\\b(coalesce|nullif)\\b", + "name": "support.function.expression.sql" + }, + { + "match": "(?<!@)@@(?i)\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\b", + "name": "support.function.globalvar.sql" + }, + { + "match": "(?i)\\b(choose|iif)\\b", + "name": "support.function.logical.sql" + }, + { + "match": "(?i)\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\b", + "name": "support.function.mathematical.sql" + }, + { + "match": "(?i)\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|severeproperty|stats_date|type_id|type_name|typeproperty)\\b", + "name": "support.function.metadata.sql" + }, + { + "match": "(?i)\\b(rank|dense_rank|ntile|row_number)\\b", + "name": "support.function.ranking.sql" + }, + { + "match": "(?i)\\b(opendatasource|openrowset|openquery|openxml)\\b", + "name": "support.function.rowset.sql" + }, + { + "match": "(?i)\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\b", + "name": "support.function.security.sql" + }, + { + "match": "(?i)\\b(ascii|charindex|concat|difference|format|len|lower|ltrim|patindex|quotename|replace|replicate|reverse|rtrim|soundex|space|str|stuff|substring|trim|unicode|upper)\\b", "name": "support.function.string.sql" }, + { + "match": "(?i)\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\b", + "name": "support.function.system.sql" + }, + { + "match": "(?i)\\b(patindex|textptr|textvalid)\\b", + "name": "support.function.textimage.sql" + }, { "captures": { "1": { @@ -355,7 +409,7 @@ } }, "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", - "match": "(')[^']*(')", + "match": "(N)?(')[^']*(')", "name": "string.quoted.single.sql" }, { diff --git a/extensions/sql/test/colorize-results/test_sql.json b/extensions/sql/test/colorize-results/test_sql.json index a44b31e2461..da116cea9c3 100644 --- a/extensions/sql/test/colorize-results/test_sql.json +++ b/extensions/sql/test/colorize-results/test_sql.json @@ -11,7 +11,29 @@ } }, { - "c": " VIEW METRIC_STATS (ID, MONTH, TEMP_C, RAIN_C) ", + "c": " VIEW METRIC_STATS (ID, ", + "t": "source.sql", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "MONTH", + "t": "source.sql support.function.datetime.sql", + "r": { + "dark_plus": "support.function: #DCDCAA", + "light_plus": "support.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.function: #DCDCAA" + } + }, + { + "c": ", TEMP_C, RAIN_C) ", "t": "source.sql", "r": { "dark_plus": "default: #D4D4D4", @@ -55,7 +77,18 @@ } }, { - "c": "MONTH,", + "c": "MONTH", + "t": "source.sql support.function.datetime.sql", + "r": { + "dark_plus": "support.function: #DCDCAA", + "light_plus": "support.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.function: #DCDCAA" + } + }, + { + "c": ",", "t": "source.sql", "r": { "dark_plus": "default: #D4D4D4", diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index c5a87fd607e..9b73e691e9e 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -10,6 +10,7 @@ "dropdown.background": "#414339", "list.activeSelectionBackground": "#75715E", "list.focusBackground": "#414339", + "dropdown.listBackground": "#1e1f1c", "list.inactiveSelectionBackground": "#414339", "list.hoverBackground": "#272822", "list.dropBackground": "#414339", diff --git a/extensions/typescript/src/features/quickFixProvider.ts b/extensions/typescript/src/features/quickFixProvider.ts index 6960233c56d..49aaa8b6e04 100644 --- a/extensions/typescript/src/features/quickFixProvider.ts +++ b/extensions/typescript/src/features/quickFixProvider.ts @@ -75,6 +75,32 @@ class ApplyFixAllCodeAction implements Command { } } +/** + * Unique set of diagnostics keyed on diagnostic range and error code. + */ +class DiagnosticsSet { + public static from(diagnostics: vscode.Diagnostic[]) { + const values = new Map<string, vscode.Diagnostic>(); + for (const diagnostic of diagnostics) { + values.set(DiagnosticsSet.key(diagnostic), diagnostic); + } + return new DiagnosticsSet(values); + } + + private static key(diagnostic: vscode.Diagnostic) { + const { start, end } = diagnostic.range; + return `${diagnostic.code}-${start.line},${start.character}-${end.line},${end.character}`; + } + + private constructor( + private readonly _values: Map<string, vscode.Diagnostic> + ) { } + + public get values(): Iterable<vscode.Diagnostic> { + return this._values.values(); + } +} + class SupportedCodeActionProvider { private _supportedCodeActions?: Thenable<Set<number>>; @@ -84,7 +110,8 @@ class SupportedCodeActionProvider { public async getFixableDiagnosticsForContext(context: vscode.CodeActionContext): Promise<vscode.Diagnostic[]> { const supportedActions = await this.supportedCodeActions; - return context.diagnostics.filter(diagnostic => supportedActions.has(+diagnostic.code)); + const fixableDiagnostics = DiagnosticsSet.from(context.diagnostics.filter(diagnostic => supportedActions.has(+diagnostic.code))); + return Array.from(fixableDiagnostics.values); } private get supportedCodeActions(): Thenable<Set<number>> { diff --git a/extensions/typescript/src/languageProvider.ts b/extensions/typescript/src/languageProvider.ts index 1f291018a30..57d7f7c127d 100644 --- a/extensions/typescript/src/languageProvider.ts +++ b/extensions/typescript/src/languageProvider.ts @@ -30,7 +30,7 @@ export default class LanguageProvider { private _validate: boolean = true; - private _documentSelector: DocumentFilter[]; + private _documentSelector?: DocumentFilter[]; private readonly disposables: Disposable[] = []; private readonly versionDependentDisposables: Disposable[] = []; diff --git a/extensions/typescript/src/utils/lazy.ts b/extensions/typescript/src/utils/lazy.ts index de62fd580ee..23c000bc65d 100644 --- a/extensions/typescript/src/utils/lazy.ts +++ b/extensions/typescript/src/utils/lazy.ts @@ -11,7 +11,7 @@ export interface Lazy<T> { class LazyValue<T> implements Lazy<T> { private _hasValue: boolean = false; - private _value: T; + private _value?: T; constructor( private readonly _getValue: () => T @@ -22,7 +22,7 @@ class LazyValue<T> implements Lazy<T> { this._hasValue = true; this._value = this._getValue(); } - return this._value; + return this._value!; } get hasValue(): boolean { diff --git a/extensions/typescript/src/utils/logger.ts b/extensions/typescript/src/utils/logger.ts index 8e31d66d858..53f09faa4f6 100644 --- a/extensions/typescript/src/utils/logger.ts +++ b/extensions/typescript/src/utils/logger.ts @@ -10,7 +10,7 @@ import * as nls from 'vscode-nls'; const localize = nls.loadMessageBundle(); export default class Logger { - private _output: OutputChannel; + private _output?: OutputChannel; private get output(): OutputChannel { if (!this._output) { diff --git a/extensions/typescript/src/utils/projectStatus.ts b/extensions/typescript/src/utils/projectStatus.ts index bb2da195465..60e49c4715d 100644 --- a/extensions/typescript/src/utils/projectStatus.ts +++ b/extensions/typescript/src/utils/projectStatus.ts @@ -28,7 +28,7 @@ const fileLimit = 500; class ExcludeHintItem { public configFileName?: string; private _item: vscode.StatusBarItem; - private _currentHint: Hint; + private _currentHint?: Hint; constructor( private readonly telemetryReporter: TelemetryReporter @@ -38,7 +38,7 @@ class ExcludeHintItem { } public getCurrentHint(): Hint { - return this._currentHint; + return this._currentHint!; } public hide() { diff --git a/extensions/typescript/src/utils/telemetry.ts b/extensions/typescript/src/utils/telemetry.ts index b0cba1133a5..da78f9071ff 100644 --- a/extensions/typescript/src/utils/telemetry.ts +++ b/extensions/typescript/src/utils/telemetry.ts @@ -13,8 +13,8 @@ interface IPackageInfo { } export default class TelemetryReporter { - private _packageInfo: IPackageInfo | null; - private _reporter: VsCodeTelemetryReporter | null; + private _packageInfo: IPackageInfo | null = null; + private _reporter: VsCodeTelemetryReporter | null = null; dispose() { if (this._reporter) { diff --git a/extensions/typescript/src/utils/tracer.ts b/extensions/typescript/src/utils/tracer.ts index fe16a13d61a..000dd0c4b33 100644 --- a/extensions/typescript/src/utils/tracer.ts +++ b/extensions/typescript/src/utils/tracer.ts @@ -32,7 +32,7 @@ namespace Trace { } export default class Tracer { - private trace: Trace; + private trace?: Trace; constructor( private readonly logger: Logger diff --git a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json index b76d98425eb..2eb7cb1ebc6 100644 --- a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScript.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/Microsoft/TypeScript-TmLanguage/commit/51323af933792ffbb9a088fd500536122be38b59", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/24c7fb5254f50dad85eae03836b1b9ff92ecf273", "name": "TypeScript", "scopeName": "source.ts", "fileTypes": [ @@ -286,7 +286,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.ts", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.ts entity.name.function.ts" @@ -520,7 +520,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.ts" @@ -747,7 +747,7 @@ }, { "name": "meta.definition.property.ts entity.name.function.ts", - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))" + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))" }, { "name": "meta.definition.property.ts variable.object.property.ts", @@ -1010,7 +1010,7 @@ }, { "name": "meta.arrow.ts", - "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -1719,7 +1719,7 @@ "include": "#comment" }, { - "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*))\\s+(as)\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*)", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*))\\s+(as)\\s+(?:(\\bdefault(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(\\b[_$[:alpha:]][_$[:alnum:]]*))", "captures": { "1": { "name": "keyword.control.default.ts" @@ -1734,6 +1734,9 @@ "name": "keyword.control.as.ts" }, "5": { + "name": "keyword.control.default.ts" + }, + "6": { "name": "variable.other.readwrite.alias.ts" } } @@ -1958,7 +1961,7 @@ }, { "name": "meta.object.member.ts", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.ts" @@ -2378,18 +2381,18 @@ "patterns": [ { "name": "constant.numeric.hex.ts", - "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)" + "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$)" }, { "name": "constant.numeric.binary.ts", - "match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)" + "match": "\\b(?<!\\$)0(b|B)[01][01_]*\\b(?!\\$)" }, { "name": "constant.numeric.octal.ts", - "match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)" + "match": "\\b(?<!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$)" }, { - "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)", + "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*\\b)| # .1\n (?:\\b[0-9][0-9_]*\\b(?!\\.)) # 1\n)(?!\\$)", "captures": { "0": { "name": "constant.numeric.decimal.ts" @@ -2649,7 +2652,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.ts" @@ -2913,6 +2916,9 @@ { "include": "#type-object" }, + { + "include": "#type-conditional" + }, { "include": "#type-operators" }, @@ -3019,6 +3025,17 @@ } ] }, + "type-conditional": { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s+(extends)\\s+", + "captures": { + "1": { + "name": "entity.name.type.ts" + }, + "2": { + "name": "storage.modifier.ts" + } + } + }, "type-paren-or-function-parameters": { "name": "meta.type.paren.cover.ts", "begin": "\\(", @@ -3167,6 +3184,10 @@ { "name": "keyword.operator.expression.keyof.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.operator.ternary.ts", + "match": "(\\?|\\:)" } ] }, diff --git a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json index c8bb27a8610..802b04ec0a3 100644 --- a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScriptReact.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/Microsoft/TypeScript-TmLanguage/commit/51323af933792ffbb9a088fd500536122be38b59", + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/24c7fb5254f50dad85eae03836b1b9ff92ecf273", "name": "TypeScriptReact", "scopeName": "source.tsx", "fileTypes": [ @@ -289,7 +289,7 @@ "patterns": [ { "name": "meta.var-single-variable.expr.tsx", - "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx entity.name.function.tsx" @@ -523,7 +523,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.tsx" @@ -750,7 +750,7 @@ }, { "name": "meta.definition.property.tsx entity.name.function.tsx", - "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))" + "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))" }, { "name": "meta.definition.property.tsx variable.object.property.tsx", @@ -1013,7 +1013,7 @@ }, { "name": "meta.arrow.tsx", - "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", + "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -1722,7 +1722,7 @@ "include": "#comment" }, { - "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*))\\s+(as)\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*)", + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*))\\s+(as)\\s+(?:(\\bdefault(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(\\b[_$[:alpha:]][_$[:alnum:]]*))", "captures": { "1": { "name": "keyword.control.default.tsx" @@ -1737,6 +1737,9 @@ "name": "keyword.control.as.tsx" }, "5": { + "name": "keyword.control.default.tsx" + }, + "6": { "name": "variable.other.readwrite.alias.tsx" } } @@ -1961,7 +1964,7 @@ }, { "name": "meta.object.member.tsx", - "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", + "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.tsx" @@ -2344,18 +2347,18 @@ "patterns": [ { "name": "constant.numeric.hex.tsx", - "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)" + "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$)" }, { "name": "constant.numeric.binary.tsx", - "match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)" + "match": "\\b(?<!\\$)0(b|B)[01][01_]*\\b(?!\\$)" }, { "name": "constant.numeric.octal.tsx", - "match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)" + "match": "\\b(?<!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$)" }, { - "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)", + "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*\\b)| # .1\n (?:\\b[0-9][0-9_]*\\b(?!\\.)) # 1\n)(?!\\$)", "captures": { "0": { "name": "constant.numeric.decimal.tsx" @@ -2615,7 +2618,7 @@ "include": "#object-identifiers" }, { - "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*([_$[:alpha:]\\{\\[]([^()]|\\((\\s*[^()]*)?\\))*)?\\) # parameteres\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", + "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => 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*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.tsx" @@ -2879,6 +2882,9 @@ { "include": "#type-object" }, + { + "include": "#type-conditional" + }, { "include": "#type-operators" }, @@ -2985,6 +2991,17 @@ } ] }, + "type-conditional": { + "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s+(extends)\\s+", + "captures": { + "1": { + "name": "entity.name.type.tsx" + }, + "2": { + "name": "storage.modifier.tsx" + } + } + }, "type-paren-or-function-parameters": { "name": "meta.type.paren.cover.tsx", "begin": "\\(", @@ -3133,6 +3150,10 @@ { "name": "keyword.operator.expression.keyof.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" + }, + { + "name": "keyword.operator.ternary.tsx", + "match": "(\\?|\\:)" } ] }, diff --git a/extensions/xml/package.json b/extensions/xml/package.json index c9210274b25..8f8bd0d349a 100644 --- a/extensions/xml/package.json +++ b/extensions/xml/package.json @@ -80,14 +80,14 @@ "grammars": [{ "language": "xml", "scopeName": "text.xml", - "path": "./syntaxes/xml.json" + "path": "./syntaxes/xml.tmLanguage.json" }, { "language": "xsl", "scopeName": "text.xml.xsl", - "path": "./syntaxes/xsl.json" + "path": "./syntaxes/xsl.tmLanguage.json" }] }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js atom/language-xml grammars/xml.cson ./syntaxes/xml.json grammars/xsl.cson ./syntaxes/xsl.json" + "update-grammar": "node ../../build/npm/update-grammar.js atom/language-xml grammars/xml.cson ./syntaxes/xml.tmLanguage.json grammars/xsl.cson ./syntaxes/xsl.tmLanguage.json" } } diff --git a/extensions/xml/syntaxes/xml.json b/extensions/xml/syntaxes/xml.tmLanguage.json similarity index 100% rename from extensions/xml/syntaxes/xml.json rename to extensions/xml/syntaxes/xml.tmLanguage.json diff --git a/extensions/xml/syntaxes/xsl.json b/extensions/xml/syntaxes/xsl.tmLanguage.json similarity index 100% rename from extensions/xml/syntaxes/xsl.json rename to extensions/xml/syntaxes/xsl.tmLanguage.json diff --git a/extensions/yaml/package.json b/extensions/yaml/package.json index fdf800049a7..07ea6da422c 100644 --- a/extensions/yaml/package.json +++ b/extensions/yaml/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js textmate/yaml.tmbundle Syntaxes/YAML.tmLanguage ./syntaxes/yaml.json" + "update-grammar": "node ../../build/npm/update-grammar.js textmate/yaml.tmbundle Syntaxes/YAML.tmLanguage ./syntaxes/yaml.tmLanguage.json" }, "contributes": { "languages": [{ @@ -18,7 +18,7 @@ "grammars": [{ "language": "yaml", "scopeName": "source.yaml", - "path": "./syntaxes/yaml.json" + "path": "./syntaxes/yaml.tmLanguage.json" }], "configurationDefaults": { "[yaml]": { diff --git a/extensions/yaml/syntaxes/yaml.json b/extensions/yaml/syntaxes/yaml.tmLanguage.json similarity index 100% rename from extensions/yaml/syntaxes/yaml.json rename to extensions/yaml/syntaxes/yaml.tmLanguage.json diff --git a/i18n/chs/extensions/emmet/package.i18n.json b/i18n/chs/extensions/emmet/package.i18n.json index 57a9f3b0e8a..c2361746c99 100644 --- a/i18n/chs/extensions/emmet/package.i18n.json +++ b/i18n/chs/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "用半角逗号 (\",\") 隔开的属性名缩写的数组,将由注释筛选器应用", "emmetPreferencesFormatNoIndentTags": "表示不应向内缩进的标记名称数组", "emmetPreferencesFormatForceIndentTags": "表示应始终向内缩进的标记名称数组", - "emmetPreferencesAllowCompactBoolean": "若为 \"true\",将生成紧凑型布尔属性" + "emmetPreferencesAllowCompactBoolean": "若为 \"true\",将生成紧凑型布尔属性", + "emmetPreferencesCssWebkitProperties": "Emmet 缩写中使用的由 \"-\" 打头有 webkit 前缀的 CSS 属性,使用半角逗号 (\",\") 进行分隔。若要始终避免 webkit 前缀,请设为空字符串。", + "emmetPreferencesCssMozProperties": "Emmet 缩写中使用的由 \"-\" 打头有 moz 前缀的 CSS 属性,使用半角逗号 (\",\") 进行分隔。若要始终避免 moz 前缀,请设为空字符串。", + "emmetPreferencesCssOProperties": "Emmet 缩写中使用的由 \"-\" 打头有 o 前缀的 CSS 属性,使用半角逗号 (\",\") 进行分隔。若要始终避免 o 前缀,请设为空字符串。", + "emmetPreferencesCssMsProperties": "Emmet 缩写中使用的由 \"-\" 打头有 ms 前缀的 CSS 属性,使用半角逗号 (\",\") 进行分隔。若要始终避免 ms 前缀,请设为空字符串。" } \ 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 2288b8204dd..0cdad2f9836 100644 --- a/i18n/chs/extensions/git/package.i18n.json +++ b/i18n/chs/extensions/git/package.i18n.json @@ -73,6 +73,8 @@ "config.decorations.enabled": "控制 Git 是否向资源管理器和“打开的编辑器”视图添加颜色和小标。", "config.promptToSaveFilesBeforeCommit": "控制 Git 是否在提交之前检查未保存的文件。", "config.showInlineOpenFileAction": "控制是否在 Git 更改视图中显示内联“打开文件”操作。", + "config.inputValidation": "控制何时显示输入验证输入计数。", + "config.detectSubmodules": "控制是否自动检测 Git 子模块。", "colors.modified": "已修改资源的颜色。", "colors.deleted": "已删除资源的颜色。", "colors.untracked": "未跟踪资源的颜色。", diff --git a/i18n/chs/extensions/markdown/out/security.i18n.json b/i18n/chs/extensions/markdown/out/security.i18n.json index 317a83b9106..152913f9116 100644 --- a/i18n/chs/extensions/markdown/out/security.i18n.json +++ b/i18n/chs/extensions/markdown/out/security.i18n.json @@ -15,5 +15,6 @@ "moreInfo.title": "详细信息", "enableSecurityWarning.title": "在此工作区中启用预览安全警告", "disableSecurityWarning.title": "在此工作区中取消预览安全警告", + "toggleSecurityWarning.description": "不影响内容安全级别", "preview.showPreviewSecuritySelector.title": "选择此工作区中 Markdown 预览的安全设置" } \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/features/quickFixProvider.i18n.json b/i18n/chs/extensions/typescript/out/features/quickFixProvider.i18n.json index 2a956c542ed..d22ade03db1 100644 --- a/i18n/chs/extensions/typescript/out/features/quickFixProvider.i18n.json +++ b/i18n/chs/extensions/typescript/out/features/quickFixProvider.i18n.json @@ -6,5 +6,5 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "fixAllInFileLabel": "{0} (修复文件中所有问题)" + "fixAllInFileLabel": "{0} (修复文件中所有)" } \ 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 8fad69597e4..530ce16d6ed 100644 --- a/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json @@ -6,7 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "error.invalidSymbol": "符号无效", + "error.invalidSymbol": "无效符号", "error.invalidNumberFormat": "数字格式无效", "error.propertyNameExpected": "需要属性名", "error.valueExpected": "需要值", diff --git a/i18n/chs/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/chs/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index a28934c2fcd..f8697fc1e56 100644 --- a/i18n/chs/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/chs/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -9,6 +9,7 @@ "previewOnGitHub": "在 GitHub 中预览", "similarIssues": "类似的问题", "noResults": "未找到结果", + "rateLimited": "已超出 API 速率限制", "stepsToReproduce": "重现步骤", "bugDescription": "您是怎么遇到这个问题的? 您需要执行哪些步骤来稳定重现此问题? 您期望发生什么,实际上发生了什么?", "performanceIssueDesciption": "这个性能问题是在什么时候发生的? 比如,它在启动时还是在一系列特定的操作之后发生的? 您提供的任何细节都能帮助我们进行调查。", diff --git a/i18n/chs/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/chs/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index c3c6010d742..59fb7b9b4c4 100644 --- a/i18n/chs/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/chs/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -20,6 +20,7 @@ "processes": "当前运行的进程", "workspaceStats": "我的工作区数据", "extensions": "我的扩展", + "tryDisablingExtensions": "此问题可在禁用扩展后重现", "disableExtensions": "禁用所有扩展并重新加载窗口", "showRunningExtensions": "查看所有运行中的扩展", "githubMarkdown": "我们支持 GitHub 版 Markdown。您将能在 GitHub 上预览时编辑问题并添加截图。", 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 d22aea0f7d1..8bdf62702ee 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -34,7 +34,7 @@ "minimap.maxColumn": "限制最小映射的宽度,尽量多地呈现特定数量的列", "find.seedSearchStringFromSelection": "控制是否将编辑器的选中内容作为搜索词填入到查找组件", "find.autoFindInSelection": "控制当编辑器中选中多个字符或多行文字时是否开启“在选定内容中查找”选项 ", - "find.globalFindClipboard": "控制查找小组件是否应在 macOS 上读取或修改在应用间共享的查找剪贴板", + "find.globalFindClipboard": "控制“查找”小组件是否读取或修改 macOS 的共享查找剪贴板", "wordWrap.off": "永不换行。", "wordWrap.on": "将在视区宽度处换行。", "wordWrap.wordWrapColumn": "将在 \"editor.wordWrapColumn\" 处换行。", @@ -66,6 +66,10 @@ "snippetSuggestions": "控制是否将代码段与其他建议一起显示以及它们的排序方式。", "emptySelectionClipboard": "控制没有选择内容的复制是否复制当前行。", "wordBasedSuggestions": "控制是否根据文档中的文字计算自动完成列表。", + "suggestSelection.first": "始终选择第一个建议。", + "suggestSelection.recentlyUsed": "选择最近的建议,除非进一步键入选择其他。例如 \"console. -> console.log\",因为最近补全过 'log' 。", + "suggestSelection.recentlyUsedByPrefix": "根据之前补全过建议的前缀选择建议。例如,\"co -> console\"、\"con -> const\"。", + "suggestSelection": "控制在建议列表中如何预先选择建议。", "suggestFontSize": "建议小组件的字号", "suggestLineHeight": "建议小组件的行高", "selectionHighlight": "控制编辑器是否应突出显示选项的近似匹配", 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 95889a422aa..88b6e5587e7 100644 --- a/i18n/chs/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/chs/src/vs/platform/environment/node/argv.i18n.json @@ -14,6 +14,7 @@ "reuseWindow": "强制打开上一个活动窗口中的文件或文件夹。", "wait": "等文件关闭后再返回。", "locale": "要使用的区域设置(例如 en-US 或 zh-TW)。", + "userDataDir": "指定保存用户数据的目录。可用于打开多个不同的 Code 实例。", "version": "打印版本。", "help": "打印使用情况。", "extensionHomePath": "设置扩展的根路径。", diff --git a/i18n/chs/src/vs/platform/list/browser/listService.i18n.json b/i18n/chs/src/vs/platform/list/browser/listService.i18n.json index 09bafab2ad9..9131b6edaea 100644 --- a/i18n/chs/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/chs/src/vs/platform/list/browser/listService.i18n.json @@ -11,5 +11,6 @@ "multiSelectModifier.alt": "映射为 \"Alt\" (Windows 和 Linux) 或 \"Option\" (macOS)", "multiSelectModifier": "在通过鼠标多选树和列表条目时使用的修改键 (例如资资源管理器、打开的编辑器和源代码管理视图)。\"ctrlCmd\" 会映射为 \"Ctrl\" (Windows 和 Linux) 或 \"Command\" (macOS)。“打开到侧边”功能所需的鼠标动作 (若可用) 将会相应调整,不与多选修改键冲突。", "openMode.singleClick": "在鼠标单击时打开项目。", - "openMode.doubleClick": "在鼠标双击时打开项目。" + "openMode.doubleClick": "在鼠标双击时打开项目。", + "openModeModifier": "控制如何在受支持的树和列表中使用鼠标来打开项目。设置为 \"singleClick\" 可单击打开项目,\"doubleClick\" 仅可双击打开项目。对于树中含子节点的节点,此设置将控制使用单击还是双击来展开他们。注意,某些不适用此项的树或列表可能会忽略此设置。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index abdefe892e4..4962fa0f678 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,6 +11,7 @@ "sizeMB": "{0} MB", "sizeGB": "{0} GB", "sizeTB": "{0} TB", + "largeImageError": "图像文件太大 (>1 MB),无法在编辑器中显示。", "resourceOpenExternalButton": "使用外部程序打开图片?", "nativeBinaryError": "因为此文件是二进制文件,或文件过大,或使用了不受支持的文本编码,将不会在编辑器中显示。", "zoom.action.fit.label": "整个图像", diff --git a/i18n/chs/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/chs/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index c576f96ab88..0c12f9f2c62 100644 --- a/i18n/chs/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -8,10 +8,12 @@ ], "openLogsFolder": "打开日志文件夹", "showLogs": "显示日志...", + "rendererProcess": "窗口 ({0})", "emptyWindow": "窗口", "extensionHost": "扩展主机", "sharedProcess": "共享进程", "mainProcess": "主进程", + "selectProcess": "选择进程日志", "openLogFile": "打开日志文件...", "setLogLevel": "设置日志级别", "trace": "跟踪", 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 5a7de66c032..766e2d44d8c 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 @@ -17,6 +17,7 @@ "addLabel": "添加键绑定", "removeLabel": "删除键绑定", "resetLabel": "重置键绑定", + "showSameKeybindings": "显示相同的键绑定", "copyLabel": "复制", "copyCommandLabel": "拷贝命令", "error": "编辑键绑定时发生错误“{0}”。请打开 \"keybindings.json\" 文件并检查。", diff --git a/i18n/chs/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index 2bed199f9dd..c8d72205ef6 100644 --- a/i18n/chs/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -24,5 +24,6 @@ "useIgnoreFiles": "控制搜索文件时是否使用 .gitignore 和 .ignore 文件。", "search.quickOpen.includeSymbols": "配置为在 Quick Open 文件结果中包括全局符号搜索的结果。", "search.followSymlinks": "控制是否在搜索中跟踪符号链接。", - "search.smartCase": "若搜索词全为小写,则不区分大小写进行搜索,否则区分大小写进行搜索" + "search.smartCase": "若搜索词全为小写,则不区分大小写进行搜索,否则区分大小写进行搜索", + "search.globalFindClipboard": "控制“搜索”侧边栏面板是否读取或修改 macOS 的共享查找剪贴板" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index 4bbaf2274b9..f62e870f672 100644 --- a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "全局用户代码片段", "source.snippet": "用户代码片段" } \ No newline at end of file diff --git a/i18n/cht/extensions/emmet/package.i18n.json b/i18n/cht/extensions/emmet/package.i18n.json index 61efd333f27..ef83be7500b 100644 --- a/i18n/cht/extensions/emmet/package.i18n.json +++ b/i18n/cht/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "必須採用縮寫以套用註解篩選的屬性名稱逗點分隔清單", "emmetPreferencesFormatNoIndentTags": "陣列的標籤名稱不應向內縮排", "emmetPreferencesFormatForceIndentTags": "陣列的標籤名稱應總是向內縮排", - "emmetPreferencesAllowCompactBoolean": "若為 true,則生成布林屬性的嚴謹表示法" + "emmetPreferencesAllowCompactBoolean": "若為 true,則生成布林屬性的嚴謹表示法", + "emmetPreferencesCssWebkitProperties": "在以 `-` 開頭的 Emmet 縮寫中使用時,會取得 Webkit 廠商首碼的逗點分隔 CSS 屬性。設定為空白字串可避免一律取得 Webkit 首碼。", + "emmetPreferencesCssMozProperties": "在以 `-` 開頭的 Emmet 縮寫中使用時,會取得 moz 廠商首碼的逗點分隔 CSS 屬性。設定為空白字串可避免一律取得 moz 首碼。", + "emmetPreferencesCssOProperties": "在以 `-` 開頭的 Emmet 縮寫中使用時,會取得 o 廠商首碼的逗點分隔 CSS 屬性。設定為空白字串可避免一律取得 o 首碼。", + "emmetPreferencesCssMsProperties": "在以 `-` 開頭的 Emmet 縮寫中使用時,會取得 ms 廠商首碼的逗點分隔 CSS 屬性。設定為空白字串可避免一律取得 ms 首碼。" } \ 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 07eacdf3e93..c27eba7ac41 100644 --- a/i18n/cht/extensions/git/package.i18n.json +++ b/i18n/cht/extensions/git/package.i18n.json @@ -73,6 +73,8 @@ "config.decorations.enabled": "控制 Git 是否提供色彩及徽章給總管及開啟編輯器視窗。", "config.promptToSaveFilesBeforeCommit": "控制Git是否應該在提交之前檢查未儲存的檔案。", "config.showInlineOpenFileAction": "控制是否在Git變更列表中的檔名旁顯示“開啟檔案”的動作按鈕。", + "config.inputValidation": "控制顯示輸入驗證輸入計數器的時機。", + "config.detectSubmodules": "控制是否自動偵測 Git 子模組。", "colors.modified": "修改資源的顏色。", "colors.deleted": "刪除資源的顏色", "colors.untracked": "未追蹤資源的顏色。", diff --git a/i18n/cht/extensions/markdown/out/security.i18n.json b/i18n/cht/extensions/markdown/out/security.i18n.json index 1c3ed6ecc20..cc4260be39f 100644 --- a/i18n/cht/extensions/markdown/out/security.i18n.json +++ b/i18n/cht/extensions/markdown/out/security.i18n.json @@ -15,5 +15,6 @@ "moreInfo.title": "詳細資訊", "enableSecurityWarning.title": "允許此工作區預覽安全性警告", "disableSecurityWarning.title": "不允許此工作區預覽安全性警告", + "toggleSecurityWarning.description": "不影響內容安全性層級", "preview.showPreviewSecuritySelector.title": "選擇此工作區 Markdown 預覽的安全性設定" } \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/cht/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index 6024fb1b9b1..1fd8767fb1e 100644 --- a/i18n/cht/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/cht/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -9,6 +9,10 @@ "previewOnGitHub": "在 GitHub 預覽", "similarIssues": "相似的問題", "noResults": "找不到結果", + "rateLimited": "已超過 API 率限制", "stepsToReproduce": "重現的步驟", - "description": "描述" + "bugDescription": "您是如何碰到此問題的? 您需要執行哪些步驟確實重現該問題? 您預期發生與實際發生的情形為何?", + "performanceIssueDesciption": "此效能問題何時發生? 舉例來說,該問題是否於啟動時或在特定一系列動作後發生? 您所能提供的任何詳細資料皆可協助我們調查。", + "description": "描述", + "disabledExtensions": "延伸模組已停用" } \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/cht/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 83e08f9540b..6ddb81e8cc0 100644 --- a/i18n/cht/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/cht/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -7,17 +7,23 @@ "Do not edit this file. It is machine generated." ], "completeInEnglish": "請用英語填寫這張表格。", + "issueTypeLabel": "我想要提交", "bugReporter": "Bug 報告", "performanceIssue": "效能問題", + "featureRequest": "功能要求", "issueTitleLabel": "標題", "issueTitleRequired": "請輸入標題。", "vscodeVersion": "VS Code 版本", "osVersion": "作業系統版本", "systemInfo": "我的系統資訊", "sendData": "傳送我的資料", + "processes": "目前執行的程序", "workspaceStats": "我的工作區統計資料", "extensions": "我的擴充功能", + "tryDisablingExtensions": "延伸模組停用時問題仍會發生", + "disableExtensions": "停用所有延伸模組並重新載入視窗", "showRunningExtensions": "查看所有正在執行的擴充功能", "githubMarkdown": "我們支援 GitHub 樣式的 Markdown。您將能夠編輯您的問題,並在 GitHub預覽時增加銀幕截圖。", - "issueDescriptionRequired": "請輸入描述。" + "issueDescriptionRequired": "請輸入描述。", + "loadingData": "正在載入資料..." } \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-main/logUploader.i18n.json b/i18n/cht/src/vs/code/electron-main/logUploader.i18n.json index fcb3d1a5e80..848925e77e2 100644 --- a/i18n/cht/src/vs/code/electron-main/logUploader.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/logUploader.i18n.json @@ -6,6 +6,16 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "invalidEndpoint": "記錄檔上傳者端點無效", "beginUploading": "上傳中...", - "userDeniedUpload": "已取消上載" + "didUploadLogs": "上傳成功! 記錄檔識別碼: {0}", + "userDeniedUpload": "已取消上載", + "logUploadPromptHeader": "要將工作階段記錄上傳到安全的端點嗎?", + "logUploadPromptBody": "請於此處檢閱您的記錄檔: '{0}'", + "logUploadPromptBodyDetails": "記錄可能包含個人資訊,例如完整路徑和檔案內容。", + "logUploadPromptKey": "我已經檢閱記錄 (輸入 'y' 以確認上傳)", + "postError": "張貼記錄時發生錯誤: {0}", + "responseError": "張貼記錄時發生錯誤。得到 {0} - {1}", + "parseError": "剖析回應時發生錯誤", + "zipError": "壓縮記錄檔時發生錯誤: {0}" } \ 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 7a953927b1b..ec283da7015 100644 --- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json @@ -90,6 +90,7 @@ "miMarker": "問題(&&P)", "miAdditionalViews": "其他檢視(&&V)", "miCommandPalette": "命令選擇區(&&C)...", + "miOpenView": "開啟檢視(&&O)...", "miToggleFullScreen": "切換全螢幕(&&F)", "miToggleZenMode": "切換無干擾模式", "miToggleMenuBar": "切換功能表列(&&B)", 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 908cad5ade8..abe0e03af43 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -28,6 +28,7 @@ "scrollBeyondLastLine": "控制編輯器是否會捲動到最後一行之後", "smoothScrolling": "控制編輯器是否會使用動畫捲動", "minimap.enabled": "控制是否會顯示迷你地圖", + "minimap.side": "控制要轉譯迷你地圖的方向。可能的值為 'right' 與 'left'", "minimap.showSlider": "控制是否會自動隱藏迷你地圖滑桿。可能的值為 'always' 與 'mouseover'", "minimap.renderCharacters": "呈現行內的實際字元 (而不是彩色區塊)", "minimap.maxColumn": "限制迷你地圖的寬度,以呈現最多的資料行", @@ -65,6 +66,10 @@ "snippetSuggestions": "控制程式碼片段是否隨其他建議顯示,以及其排序方式。", "emptySelectionClipboard": "控制複製時不選取任何項目是否會複製目前程式行。", "wordBasedSuggestions": "控制是否應根據文件中的單字計算自動完成。", + "suggestSelection.first": "一律選取第一個建議。", + "suggestSelection.recentlyUsed": "除非進一步的鍵入選取一個建議,否則選取最近的建議。例如,因為 `log` 最近完成,所以 `console.| -> console.log`。", + "suggestSelection.recentlyUsedByPrefix": "根據先前已完成這些建議的首碼選取建議。例如,`co -> console` 與 `con -> const`。", + "suggestSelection": "控制在顯示建議清單時如何預先選取建議。", "suggestFontSize": "建議小工具的字型大小", "suggestLineHeight": "建議小工具的行高", "selectionHighlight": "控制編輯器是否應反白顯示與選取範圍相似的符合項", diff --git a/i18n/cht/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/cht/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json index 676e8d955bd..0b42de2f004 100644 --- a/i18n/cht/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -6,5 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "smartSelect.jumpBracket": "移至方括弧" + "overviewRulerBracketMatchForeground": "成對括弧的概觀尺規標記色彩。", + "smartSelect.jumpBracket": "移至方括弧", + "smartSelect.selectToBracket": "選取至括弧" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/cht/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json index 1ba346c2188..ecc3f0686d3 100644 --- a/i18n/cht/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -8,5 +8,6 @@ ], "quickFixWithKb": "顯示修正 ({0})", "quickFix": "顯示修正", - "quickfix.trigger.label": "Quick Fix" + "quickfix.trigger.label": "Quick Fix", + "refactor.label": "重構" } \ No newline at end of file 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 2171f07a7d2..372f38f2bd4 100644 --- a/i18n/cht/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/cht/src/vs/platform/environment/node/argv.i18n.json @@ -10,8 +10,11 @@ "diff": "互相比較兩個檔案。", "add": "將資料夾新增至上一個使用中的視窗。", "goto": "在路徑上的指定行與字元位置開啟檔案。", + "newWindow": "強制開啟新視窗。", + "reuseWindow": "強制在上一個使用中的視窗開啟檔案或資料夾。", "wait": "等候檔案在傳回前關閉。", "locale": "要使用的地區設定 (例如 en-US 或 zh-TW)。", + "userDataDir": "指定用於保存使用者資料的目錄。可用於開啟多個相異的 Code 執行個體。", "version": "列印版本。", "help": "列印使用方式。", "extensionHomePath": "設定擴充功能的根路徑。", diff --git a/i18n/cht/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/cht/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index e9f363067d6..0013de0e6a7 100644 --- a/i18n/cht/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/cht/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -13,6 +13,7 @@ "cancel": "取消", "errorInstallingDependencies": "安裝相依套件時發生錯誤。{0}", "notFoundCompatible": "無法安裝 '{0}';沒有任何與 VS Code 相容的可用版本 '{1}'。", + "malicious extension": "因為有使用者回報該延伸模組有問題,所以無法安裝延伸模組。", "notFoundCompatibleDependency": "無法安裝,因為找不到相容於 VS Code 目前版本 '{1}' 的相依擴充功能 '{0}'。", "quitCode": "無法安裝擴充功能。重新安裝以前請重啟 VS Code。", "exitCode": "無法安裝擴充功能。重新安裝以前請離開並再次啟動 VS Code。", diff --git a/i18n/cht/src/vs/platform/issue/electron-main/issueService.i18n.json b/i18n/cht/src/vs/platform/issue/electron-main/issueService.i18n.json index 35229bd6699..01a61fb8c5e 100644 --- a/i18n/cht/src/vs/platform/issue/electron-main/issueService.i18n.json +++ b/i18n/cht/src/vs/platform/issue/electron-main/issueService.i18n.json @@ -5,5 +5,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." - ] + ], + "issueReporter": "問題回報程式" } \ No newline at end of file diff --git a/i18n/cht/src/vs/platform/list/browser/listService.i18n.json b/i18n/cht/src/vs/platform/list/browser/listService.i18n.json index 37f59f43852..e9ebd5685ed 100644 --- a/i18n/cht/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/cht/src/vs/platform/list/browser/listService.i18n.json @@ -8,5 +8,9 @@ ], "workbenchConfigurationTitle": "工作台", "multiSelectModifier.ctrlCmd": "對應Windows和Linux的'Control'與對應 macOS 的'Command'。", - "multiSelectModifier.alt": "對應Windows和Linux的'Alt'與對應macOS的'Option'。" + "multiSelectModifier.alt": "對應Windows和Linux的'Alt'與對應macOS的'Option'。", + "multiSelectModifier": "透過滑鼠多選,用於在樹狀目錄與清單中新增項目的輔助按鍵 (例如在總管中開啟 [編輯器] 及 [SCM] 檢視)。在 Windows 及 Linux 上,`ctrlCmd` 對應 `Control`,在 macOS 上則對應 `Command`。[在側邊開啟] 滑鼠手勢 (若支援) 將會適應以避免和多選輔助按鍵衝突。", + "openMode.singleClick": "以滑鼠按一下開啟項目。", + "openMode.doubleClick": "以滑鼠按兩下開啟項目。", + "openModeModifier": "控制如何使用滑鼠在樹狀目錄與清單中開啟項目 (若有支援)。設為 `singleClick` 可以滑鼠按一下開啟物件,設為 `doubleClick` 則只能透過按兩下滑鼠開啟物件。對於樹狀目錄中具子系的父系而言,此設定會控制應以滑鼠按一下或按兩下展開父系。注意,某些樹狀目錄或清單若不適用此設定則會予以忽略。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/platform/localizations/common/localizations.i18n.json b/i18n/cht/src/vs/platform/localizations/common/localizations.i18n.json index d1cf24adb7c..f88a7f93a63 100644 --- a/i18n/cht/src/vs/platform/localizations/common/localizations.i18n.json +++ b/i18n/cht/src/vs/platform/localizations/common/localizations.i18n.json @@ -7,5 +7,11 @@ "Do not edit this file. It is machine generated." ], "vscode.extension.contributes.localizations": "提供在地化服務給編輯者", - "vscode.extension.contributes.localizations.languageId": "顯示已翻譯字串的語言 Id" + "vscode.extension.contributes.localizations.languageId": "顯示已翻譯字串的語言 Id", + "vscode.extension.contributes.localizations.languageName": "語言名稱 (英文)。", + "vscode.extension.contributes.localizations.languageNameLocalized": "語言名稱 (提供的語言)。", + "vscode.extension.contributes.localizations.translations": "與該語言相關的翻譯清單。", + "vscode.extension.contributes.localizations.translations.id": "此翻譯提供之目標的 VS Code 或延伸模組識別碼。VS Code 的識別碼一律為 `vscode`,且延伸模組的格式應為 `publisherId.extensionName`。", + "vscode.extension.contributes.localizations.translations.id.pattern": "轉譯 VS 程式碼或延伸模組時,識別碼應分別使用 `vscode` 或 `publisherId.extensionName` 的格式。", + "vscode.extension.contributes.localizations.translations.path": "包含語言翻譯的檔案相對路徑。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json index 35229bd6699..0af06011ae7 100644 --- a/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json +++ b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "folderStatusMessageAddSingleFolder": "延伸模組 '{0}' 在工作區新增了 1 個資料夾", + "folderStatusMessageAddMultipleFolders": "延伸模組 '{0}' 在工作區中新增了 {1} 個資料夾", + "folderStatusMessageRemoveSingleFolder": "延伸模組 '{0}' 從工作區移除了 1 個資料夾", + "folderStatusMessageRemoveMultipleFolders": "延伸模組 '{0}' 從工作區移除了 {1} 個資料夾", + "folderStatusChangeFolder": "延伸模組 '{0}' 變更了工作區的資料夾" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostWorkspace.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostWorkspace.i18n.json index 35229bd6699..e7689ba0400 100644 --- a/i18n/cht/src/vs/workbench/api/node/extHostWorkspace.i18n.json +++ b/i18n/cht/src/vs/workbench/api/node/extHostWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "updateerror": "延伸模組 '{0}' 無法更新工作區資料夾: {1}" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index 73ff4acf72b..56500848556 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,7 +11,9 @@ "sizeMB": "{0}MB", "sizeGB": "{0}GB", "sizeTB": "{0}TB", + "largeImageError": "影像的檔案大小太大 (>1MB),無法在編輯器中顯示。", "resourceOpenExternalButton": "要使用外部程式打開影像嗎?", "nativeBinaryError": "檔案為二進位檔、非常大或使用不支援的文字編碼,因此將不會顯示於編輯器中。", + "zoom.action.fit.label": "整個影像", "imgMeta": "{0}x{1} {2}" } \ 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 326c0846e47..75269c64a37 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 @@ -35,9 +35,11 @@ "panelDefaultLocation": "控制面板的預設位置。可顯示在 Workbench 的底部或是右方。", "statusBarVisibility": "控制 Workbench 底端狀態列的可視性。", "activityBarVisibility": "控制活動列在 workbench 中的可見度。", + "fontAliasing": "控制工作台中的字型鋸齒化方法。\n- default: 子像素字型平滑化。在多數非 Retina 的顯示器上,這會使文字變得最鮮明\n- antialiased: 在像素層級上使字型平滑化,與子像素相對。能夠使字型整體顯示較亮\n- none: 停用字型平滑化。顯示的文字會帶有鋸齒狀銳利邊緣\n- auto: 根據顯示器的 DPI 自動套用 `default` 或 `antialiased`。", "workbench.fontAliasing.default": "子像素字型平滑處理。在大部分非 Retina 顯示器上會顯示出最銳利的文字。", "workbench.fontAliasing.antialiased": "相對於子像素,根據像素層級平滑字型。可以讓字型整體顯得較細。", "workbench.fontAliasing.none": "禁用字體平滑.文字將會顯示鋸齒狀與鋒利的邊緣.", + "workbench.fontAliasing.auto": "根據顯示器的 DPI 自動套用 `default` 或 `antialiased`。", "enableNaturalLanguageSettingsSearch": "控制是否啟用自然語言搜尋模式。", "windowConfigurationTitle": "視窗", "window.openFilesInNewWindow.on": "檔案會在新視窗中開啟", diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index 284439109c4..a3ce7418d3b 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -32,8 +32,12 @@ "app.launch.json.configurations": "組態清單。請使用 IntelliSense 新增新的組態或編輯現有的組態。", "app.launch.json.compounds": "複合的清單。每個複合都參考將會同時啟動的多重組態。", "app.launch.json.compound.name": "複合的名稱。顯示於啟動組態下拉式功能表。", + "useUniqueNames": "請使用唯一的組態名稱。", + "app.launch.json.compound.folder": "複合所在的資料夾名稱。", "app.launch.json.compounds.configurations": "將會作為此複合一部份而啟動之組態的名稱。", "debugNoType": "偵錯配接器 'type' 不能省略且必須屬於 'string' 類型。", "selectDebug": "選取環境", - "DebugConfig.failed": "無法在 '.vscode' 資料夾 ({0}) 中建立 'launch.json' 檔案。" + "DebugConfig.failed": "無法在 '.vscode' 資料夾 ({0}) 中建立 'launch.json' 檔案。", + "workspace": "工作區", + "user settings": "使用者設定" } \ 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 b9ca8450b58..2ccf21c20ad 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 @@ -13,6 +13,9 @@ "breakpointAdded": "已新增中斷點,行 {0},檔案 {1}", "breakpointRemoved": "已移除中斷點,行 {0},檔案 {1}", "compoundMustHaveConfigurations": "複合必須設有 \"configurations\" 屬性,才能啟動多個組態。", + "noConfigurationNameInWorkspace": "無法在工作區中找到啟動組態 '{0}'。", + "multipleConfigurationNamesInWorkspace": "工作區中有多個啟動組態 `{0}`。請使用資料夾名稱來符合組態。", + "noFolderWithName": "在複合 '{2}' 的組態 '{1}' 中找不到名稱為 '{0}' 的資料夾。", "configMissing": "'launch.json' 中遺漏組態 '{0}'。", "launchJsonDoesNotExist": "'launch.json' 不存在。", "debugRequestNotSupported": "在選取的偵錯組態中,屬性 `{0}` 具有不支援的值 '{1}'。", @@ -23,6 +26,7 @@ "preLaunchTaskError": "執行 preLaunchTask '{0}' 期間偵測到建置錯誤。", "preLaunchTaskExitCode": "preLaunchTask '{0}' 已終止,結束代碼為 {1}。", "debugAnyway": "仍要偵錯", + "showErrors": "顯示錯誤", "cancel": "取消", "noFolderWorkspaceDebugError": "無法對使用中的檔案偵錯。請確認檔案已儲存在磁碟上,而且您已經為該檔案類型安裝偵錯延伸模組。", "DebugTaskNotFound": "找不到 preLaunchTask '{0}'。", 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 e4f55aba181..d9f35568cbf 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 @@ -33,6 +33,8 @@ "view id": "識別碼", "view name": "名稱", "view location": "位置", + "localizations": "當地語系化 ({0})", + "localizations language id": "語言識別碼", "localizations language name": "語言名稱", "localizations localized language name": "語言名稱 (在地化)", "colorThemes": "色彩佈景主題 ({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 a1690057d3c..df75fbfc27c 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 @@ -53,6 +53,7 @@ "configureWorkspaceFolderRecommendedExtensions": "設定建議的延伸模組 (工作區資料夾) ", "builtin": "內建", "malicious tooltip": "這個延伸模組曾經被回報是有問題的。", + "malicious": "惡意", "disableAll": "停用所有已安裝的延伸模組", "disableAllWorkspace": "停用此工作區的所有已安裝延伸模組", "enableAll": "啟用所有已安裝的延伸模組", diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index b3c3c19d445..733f876ef06 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "noPro": "若要分析延伸模組,請以 `--inspect-extensions=<port>` 啟動。", "selectAndStartDebug": "按一下以停止性能分析。" } \ 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 9df35da343e..7fa09df63c6 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 @@ -11,6 +11,7 @@ "workspaceRecommendation": "根據目前工作區的使用者,建議您使用此延伸模組。", "fileBasedRecommendation": "根據您最近開啟的檔案,建議您使用此延伸模組。", "exeBasedRecommendation": "因為您已安裝 {0},所以建議您使用此延伸模組。", + "dynamicWorkspaceRecommendation": "因為目前的工作區有許多使用者使用此延伸模組,所以您可能會對其有興趣。", "reallyRecommended2": "建議對此檔案類型使用 '{0}' 延伸模組。", "reallyRecommendedExtensionPack": "建議對此檔案類型使用 '{0}' 延伸模組套件。", "showRecommendations": "顯示建議", diff --git a/i18n/cht/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/cht/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index f186269c095..dc6c3bd4d61 100644 --- a/i18n/cht/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -8,10 +8,12 @@ ], "openLogsFolder": "開啟紀錄資料夾", "showLogs": "顯示紀錄...。", + "rendererProcess": "視窗 ({0})", "emptyWindow": "視窗", "extensionHost": "延伸主機", "sharedProcess": "共享", "mainProcess": "主要", + "selectProcess": "選取程序的記錄", "openLogFile": "開啟紀錄檔案...", "setLogLevel": "設定記錄層級", "trace": "追蹤", 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 41eaf632ea0..803411c1ad0 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 @@ -17,6 +17,7 @@ "addLabel": "新增按鍵繫結關係", "removeLabel": "移除按鍵繫結關係", "resetLabel": "重設按鍵繫結關係", + "showSameKeybindings": "顯示相同的按鍵繫結關係", "copyLabel": "複製", "copyCommandLabel": "複製命令", "error": "編輯按鍵繫結關係時發生錯誤 '{0}'。請開啟 'keybindings.json' 檔案加以檢查。", diff --git a/i18n/cht/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index bc257ad2d3d..23c1fef1bf8 100644 --- a/i18n/cht/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -24,5 +24,6 @@ "useIgnoreFiles": "控制在搜尋檔案時,是否要使用 .gitignore 及 .ignore 檔案。 ", "search.quickOpen.includeSymbols": "設定以將全域符號搜尋的結果納入 Quick Open 的檔案結果中。", "search.followSymlinks": "控制是否要在搜尋時遵循 symlink。", - "search.smartCase": "如果搜尋式為全部小寫,則用不分大小寫的搜尋,否則用分大小寫的搜尋" + "search.smartCase": "如果搜尋式為全部小寫,則用不分大小寫的搜尋,否則用分大小寫的搜尋", + "search.globalFindClipboard": "控制 Search Viewlet 是否應讀取或修改 macOS 上的共用尋找剪貼簿" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index d5933f025d7..41c38916afd 100644 --- a/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "全域使用者程式碼片段", "source.snippet": "使用者程式碼片段" } \ 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 652d103cc9d..c5415de0931 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 @@ -7,6 +7,8 @@ "Do not edit this file. It is machine generated." ], "terminal.integrated.a11yBlankLine": "空白行", + "terminal.integrated.a11yPromptLabel": "終端機輸入", + "terminal.integrated.a11yTooMuchOutput": "要宣告的輸出過多,請手動瀏覽至資料列以讀取", "terminal.integrated.copySelection.noSelection": "終端機沒有任何選取項目可以複製", "terminal.integrated.exitedWithCode": "終端機處理序已終止,結束代碼為: {0}", "terminal.integrated.waitOnExit": "按任意鍵關閉終端機", diff --git a/i18n/deu/extensions/emmet/package.i18n.json b/i18n/deu/extensions/emmet/package.i18n.json index c138007e365..102fce1f66a 100644 --- a/i18n/deu/extensions/emmet/package.i18n.json +++ b/i18n/deu/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "Eine durch Trennzeichen getrennte Liste von Attributnamen, die in abgekürzter Form vorliegen müssen, damit der Kommentarfilter angewendet werden kann", "emmetPreferencesFormatNoIndentTags": "Ein Array von Tagnamen, die keinen inneren Einzug erhalten", "emmetPreferencesFormatForceIndentTags": "Ein Array von Tagnamen, die immer einen inneren Einzug erhalten", - "emmetPreferencesAllowCompactBoolean": "Bei TRUE wird eine kompakte Notation boolescher Attribute erzeugt" + "emmetPreferencesAllowCompactBoolean": "Bei TRUE wird eine kompakte Notation boolescher Attribute erzeugt", + "emmetPreferencesCssWebkitProperties": "Durch Trennzeichen getrennte CSS-Eigenschaften, die das webkit-Herstellerpräfix erhalten, wenn sie in einer Emmet-Abkürzung verwendet werden, die mit \"-\" beginnt. Legen Sie eine leere Zeichenfolge fest, um das webkit-Präfix immer zu vermeiden.", + "emmetPreferencesCssMozProperties": "Durch Trennzeichen getrennte CSS-Eigenschaften, die das moz-Herstellerpräfix erhalten, wenn sie in einer Emmet-Abkürzung verwendet werden, die mit \"-\" beginnt. Legen Sie eine leere Zeichenfolge fest, um das moz-Präfix immer zu vermeiden.", + "emmetPreferencesCssOProperties": "Durch Trennzeichen getrennte CSS-Eigenschaften, die das o-Herstellerpräfix erhalten, wenn sie in einer Emmet-Abkürzung verwendet werden, die mit \"-\" beginnt. Legen Sie eine leere Zeichenfolge fest, um das o-Präfix immer zu vermeiden.", + "emmetPreferencesCssMsProperties": "Durch Trennzeichen getrennte CSS-Eigenschaften, die das ms-Herstellerpräfix erhalten, wenn sie in einer Emmet-Abkürzung verwendet werden, die mit \"-\" beginnt. Legen Sie eine leere Zeichenfolge fest, um das ms-Präfix immer zu vermeiden." } \ 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 5d1eaaf925e..11a98b9d1ae 100644 --- a/i18n/deu/extensions/git/out/commands.i18n.json +++ b/i18n/deu/extensions/git/out/commands.i18n.json @@ -28,6 +28,7 @@ "revert": "Änderungen zurücksetzen", "discard": "Änderungen verwerfen", "confirm delete": "Möchten Sie \"{0}\" wirklich LÖSCHEN?", + "delete file": "Datei löschen", "confirm discard": "Möchten Sie die Änderungen in {0} wirklich verwerfen?", "confirm discard multiple": "Möchten Sie wirklich Änderungen in {0} Dateien verwerfen?", "warn untracked": "Dies wird {0} nicht verfolgte Dateien LÖSCHEN!", @@ -63,12 +64,14 @@ "merge conflicts": "Es liegen Zusammenführungskonflikte vor. Beheben Sie die Konflikte vor dem Committen.", "tag name": "Tag-Name", "provide tag name": "Geben Sie einen Tagnamen an.", + "tag message": "Nachricht", "provide tag message": "Geben Sie eine Meldung ein, um das Tag mit einer Anmerkung zu versehen.", "no remotes to fetch": "In diesem Repository wurden keine Remoteelemente konfiguriert, aus denen ein Abrufen erfolgt.", "no remotes to pull": "In Ihrem Repository wurden keine Remoteelemente für den Pull konfiguriert.", "pick remote pull repo": "Remoteelement zum Pullen des Branch auswählen", "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.", + "confirm publish branch": "Der Branch \"{0}\" verfügt über keinen Upstreambranch. Möchten Sie diesen Branch veröffentlichen?", "ok": "OK", "push with tags success": "Push mit Tags erfolgreich ausgeführt.", "pick remote": "Remotespeicherort auswählen, an dem der Branch \"{0}\" veröffentlicht wird:", diff --git a/i18n/deu/extensions/git/out/main.i18n.json b/i18n/deu/extensions/git/out/main.i18n.json index 81aa688fe22..f9fdc4a6212 100644 --- a/i18n/deu/extensions/git/out/main.i18n.json +++ b/i18n/deu/extensions/git/out/main.i18n.json @@ -8,6 +8,7 @@ ], "looking": "Suchen nach Git in: {0}", "using git": "Verwenden von Git {0} von {1}", + "downloadgit": "Git herunterladen", "neverShowAgain": "Nicht mehr anzeigen", "notfound": "Git nicht gefunden. Installieren Sie es, oder konfigurieren Sie es mithilfe der Einstellung \"git.path\".", "updateGit": "Git aktualisieren", diff --git a/i18n/deu/extensions/git/out/repository.i18n.json b/i18n/deu/extensions/git/out/repository.i18n.json index fb87a24140e..82e40fe5836 100644 --- a/i18n/deu/extensions/git/out/repository.i18n.json +++ b/i18n/deu/extensions/git/out/repository.i18n.json @@ -7,19 +7,29 @@ "Do not edit this file. It is machine generated." ], "open": "Öffnen", + "index modified": "Index geändert", "modified": "Geändert am", + "index added": "Index hinzugefügt", + "index deleted": "Index gelöscht", "deleted": "Gelöscht", + "index renamed": "Index umbenannt", + "index copied": "Index kopiert", "untracked": "Nicht verfolgt", "ignored": "Ignoriert", + "both deleted": "Beide gelöscht", + "added by us": "Hinzugefügt von uns", "deleted by them": "Gelöscht von anderen", "added by them": "Hinzugefügt von anderen", "deleted by us": "Gelöscht von uns", + "both added": "Beide hinzugefügt", + "both modified": "Beide geändert", "commitMessage": "Message (press {0} to commit)", "commit": "Commit", "merge changes": "Änderungen zusammenführen", "staged changes": "Bereitgestellte Änderungen", "changes": "Änderungen", "commitMessageCountdown": "{0} Zeichen in der aktuellen Zeile verbleibend", + "commitMessageWarning": "{0} Zeichen über {1} in der aktuellen Zeile", "ok": "OK", "neveragain": "Nicht mehr anzeigen", "huge": "Das Git-Repository unter {0} umfasst zu viele aktive Änderungen. Nur ein Teil der Git-Features wird aktiviert." diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index 18e902bcdb6..a08db26fbc0 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -62,6 +62,7 @@ "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.ignoreMissingGitWarning": "Ignoriert die Warnung, wenn Git fehlt", "config.ignoreLimitWarning": "Ignoriert Warnung bei zu hoher Anzahl von Änderungen in einem Repository", @@ -71,6 +72,9 @@ "config.discardAllScope": "Legt fest, welche Änderungen vom Befehl \"Alle Änderungen verwerfen\" verworfen werden. \"all\" verwirft alle Änderungen. \"tracked\" verwirft nur verfolgte Dateien. \"prompt\" zeigt immer eine Eingabeaufforderung an, wenn die Aktion ausgeführt wird.", "config.decorations.enabled": "Steuert, ob Git Farben und Badges für die Explorer-Ansicht und die Ansicht \"Geöffnete Editoren\" beiträgt.", "config.promptToSaveFilesBeforeCommit": "Legt fest, ob Git vor dem einchecken nach nicht gespeicherten Dateien suchen soll.", + "config.showInlineOpenFileAction": "Steuert, ob eine Inlineaktion zum Öffnen der Datei in der Ansicht \"Git-Änderungen\" angezeigt wird.", + "config.inputValidation": "Steuert, wann die Eingabevalidierung im Eingabezähler angezeigt wird.", + "config.detectSubmodules": "Steuert, ob Git-Submodule automatisch erkannt werden.", "colors.modified": "Farbe für geänderte Ressourcen.", "colors.deleted": "Farbe für gelöschten Ressourcen.", "colors.untracked": "Farbe für nicht verfolgte Ressourcen.", diff --git a/i18n/deu/extensions/markdown/out/security.i18n.json b/i18n/deu/extensions/markdown/out/security.i18n.json index 99532644e1d..828b182b8ed 100644 --- a/i18n/deu/extensions/markdown/out/security.i18n.json +++ b/i18n/deu/extensions/markdown/out/security.i18n.json @@ -15,5 +15,6 @@ "moreInfo.title": "Weitere Informationen", "enableSecurityWarning.title": "Vorschau von Sicherheitswarnungen in diesem Arbeitsbereich aktivieren", "disableSecurityWarning.title": "Vorschau von Sicherheitswarnungen in diesem Arbeitsbereich deaktivieren ", + "toggleSecurityWarning.description": "Hat keinen Einfluss auf die Inhaltssicherheitsebene", "preview.showPreviewSecuritySelector.title": "Sicherheitseinstellungen für die Markdown-Vorschau in diesem Arbeitsbereich auswählen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/deu/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index 60507eec0fa..ba074306f0d 100644 --- a/i18n/deu/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/deu/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -6,6 +6,13 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "previewOnGitHub": "Vorschau in GitHub", + "similarIssues": "Ähnliche Probleme", "noResults": "Es wurden keine Ergebnisse gefunden.", - "description": "Beschreibung" + "rateLimited": "API-Ratenbegrenzung überschritten", + "stepsToReproduce": "Zu reproduzierende Schritte", + "bugDescription": "Wie ist dieses Problem aufgetreten? Welche Schritte müssen Sie ausführen, um das Problem zuverlässig zu reproduzieren? Was sollte geschehen, und was ist stattdessen geschehen?", + "performanceIssueDesciption": "Wann ist dieses Leistungsproblem aufgetreten? Tritt es beispielsweise beim Start oder nach einer bestimmten Reihe von Aktionen auf? Wenn Sie weitere Angaben machen, hilft uns das dabei, dieses Problem zu untersuchen.", + "description": "Beschreibung", + "disabledExtensions": "Erweiterungen sind deaktiviert" } \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/deu/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 35229bd6699..a21a4613fad 100644 --- a/i18n/deu/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/deu/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -5,5 +5,25 @@ "Licensed under the MIT License. See License.txt in the project root for license information.", "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." - ] + ], + "completeInEnglish": "Füllen Sie das Formular auf Englisch aus.", + "issueTypeLabel": "Ich möchte Folgendes übermitteln:", + "bugReporter": "Fehlerbericht", + "performanceIssue": "Leistungsproblem", + "featureRequest": "Featureanforderung", + "issueTitleLabel": "Titel", + "issueTitleRequired": "Geben Sie einen Titel ein.", + "vscodeVersion": "VS Code-Version", + "osVersion": "Betriebssystemversion", + "systemInfo": "Eigene Systeminformationen", + "sendData": "Eigene Daten senden", + "processes": "Derzeit ausgeführte Prozesse", + "workspaceStats": "Eigene Arbeitsbereichsstatistiken", + "extensions": "Eigene Erweiterungen", + "tryDisablingExtensions": "Das Problem ist reproduzierbar, wenn Erweiterungen deaktiviert sind", + "disableExtensions": "Alle Erweiterungen werden deaktiviert, und das Fenster wird neu geladen", + "showRunningExtensions": "Alle ausgeführten Erweiterungen anzeigen", + "githubMarkdown": "Wir unterstützen GitHub Flavored Markdown. Sie können während der Vorschau in GitHub Ihr Problem bearbeiten und Screenshots hinzufügen.", + "issueDescriptionRequired": "Geben Sie eine Beschreibung ein.", + "loadingData": "Daten werden geladen …" } \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-main/logUploader.i18n.json b/i18n/deu/src/vs/code/electron-main/logUploader.i18n.json index 35229bd6699..8896fd116b9 100644 --- a/i18n/deu/src/vs/code/electron-main/logUploader.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/logUploader.i18n.json @@ -5,5 +5,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." - ] + ], + "invalidEndpoint": "Ungültiger Protokolluploader-Endpunkt", + "beginUploading": "Wird hochgeladen …", + "didUploadLogs": "Upload erfolgreich! Protokolldatei-ID: {0}", + "userDeniedUpload": "Upload abgebrochen", + "logUploadPromptHeader": "Sitzungsprotokolle auf sicheren Endpunkt hochladen?", + "logUploadPromptBody": "Überprüfen Sie Ihre Protokolldateien hier: \"{0}\"", + "logUploadPromptBodyDetails": "Protokolle enthalten möglicherweise personenbezogene Informationen wie etwa vollständige Pfade und Dateiinhalte.", + "logUploadPromptKey": "Ich habe meine Protokolle überprüft (geben Sie \"y\" ein, um das Hochladen zu bestätigen)", + "postError": "Fehler beim Veröffentlichen von Protokollen: {0}", + "responseError": "Fehler beim Veröffentlichen von Protokollen. Abgerufen: {0} – {1}", + "parseError": "Fehler beim Analysieren der Antwort", + "zipError": "Fehler beim Zippen der Protokolle: {0}" } \ 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 3d107a3974d..a1ff0b747ab 100644 --- a/i18n/deu/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/menus.i18n.json @@ -90,6 +90,7 @@ "miMarker": "&&Probleme", "miAdditionalViews": "Z&&usätzliche Ansichten", "miCommandPalette": "&&Befehlspalette...", + "miOpenView": "&&Ansicht öffnen …", "miToggleFullScreen": "&&Vollbild umschalten", "miToggleZenMode": "Zen-Modus umschalten", "miToggleMenuBar": "Men&&üleiste umschalten", @@ -184,6 +185,7 @@ "miCheckingForUpdates": "Überprüfen auf Updates...", "miDownloadUpdate": "Verfügbares Update herunterladen", "miDownloadingUpdate": "Das Update wird heruntergeladen...", + "miInstallUpdate": "Update installieren …", "miInstallingUpdate": "Update wird installiert...", "miRestartToUpdate": "Zum Aktualisieren neu starten...", "aboutDetail": "\nVersion {0}\nCommit {1}\nDatum {2}\nShell {3}\nRenderer {4}\nNode {5}\nArchitektur {6}", 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 1e55149d610..880b210f63a 100644 --- a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -28,6 +28,7 @@ "scrollBeyondLastLine": "Legt fest, ob der Editor Bildläufe über die letzte Zeile hinaus ausführt.", "smoothScrolling": "Legt fest, ob der Editor Bildläufe animiert ausführt.", "minimap.enabled": "Steuert, ob die Minikarte angezeigt wird", + "minimap.side": "Steuert die Seite, wo die Minikarte gerendert wird. Mögliche Werte sind \"rechts\" und \"links\".", "minimap.showSlider": "Steuert, ob der Minimap-Schieberegler automatisch ausgeblendet wird. Mögliche Werte sind \"always\" und \"mouseover\".", "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", @@ -65,6 +66,10 @@ "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.", "wordBasedSuggestions": "Steuert, ob Vervollständigungen auf Grundlage der Wörter im Dokument berechnet werden sollen.", + "suggestSelection.first": "Immer den ersten Vorschlag auswählen.", + "suggestSelection.recentlyUsed": "Zuletzt verwendete Vorschläge auswählen, sofern keiner durch eine weitere Eingabe ausgewählt wird. Beispiel: \"console.l\" -> \"console.log\", da \"log\" vor Kurzem vervollständigt wurde.", + "suggestSelection.recentlyUsedByPrefix": "Vorschläge auf Grundlage vorheriger Präfixe auswählen, die diese Vorschläge vervollständigt haben. Beispiel: \"co\" -> \"console\" und \"con\" -> \"const\".", + "suggestSelection": "Steuert, wie Vorschläge bei Anzeige der Vorschlagsliste vorab ausgewählt werden.", "suggestFontSize": "Schriftgröße für Vorschlagswidget", "suggestLineHeight": "Zeilenhöhe für Vorschlagswidget", "selectionHighlight": "Steuert, ob der Editor der Auswahl ähnelnde Übereinstimmungen hervorheben soll.", diff --git a/i18n/deu/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/deu/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json index 21a0a646546..8450469b056 100644 --- a/i18n/deu/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -6,5 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "smartSelect.jumpBracket": "Gehe zu Klammer" + "overviewRulerBracketMatchForeground": "Übersichtslineal-Markierungsfarbe für zusammengehörige Klammern.", + "smartSelect.jumpBracket": "Gehe zu Klammer", + "smartSelect.selectToBracket": "Auswählen bis Klammer" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/deu/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json index b9104a3af4e..174b4efc082 100644 --- a/i18n/deu/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -8,5 +8,6 @@ ], "quickFixWithKb": "Korrekturen anzeigen ({0})", "quickFix": "Korrekturen anzeigen", - "quickfix.trigger.label": "Schnelle Problembehebung" + "quickfix.trigger.label": "Schnelle Problembehebung", + "refactor.label": "Umgestalten" } \ No newline at end of file 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 ea9187e53e7..282989aa957 100644 --- a/i18n/deu/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/deu/src/vs/platform/environment/node/argv.i18n.json @@ -10,8 +10,11 @@ "diff": "Vergleicht zwei Dateien.", "add": "Fügt einen oder mehrere Ordner zum letzten aktiven Fenster hinzu.", "goto": "Öffnet eine Datei im Pfad in der angegebenen Zeile und an der Zeichenposition.", + "newWindow": "Öffnen eines neuen Fensters erzwingen.", + "reuseWindow": "Öffnen einer Datei oder eines Ordners im letzten aktiven Fenster erzwingen.", "wait": "Warten Sie, bis die Dateien geschlossen sind, bevor Sie zurück gehen können.", "locale": "Das zu verwendende Gebietsschema (z. B. en-US oder zh-TW).", + "userDataDir": "Gibt das Verzeichnis an, in dem Benutzerdaten gespeichert werden. Kann zum Öffnen mehrerer verschiedener Codeinstanzen verwendet werden.", "version": "Gibt die Version aus.", "help": "Gibt die Syntax aus.", "extensionHomePath": "Legen Sie den Stammpfad für Extensions fest.", diff --git a/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 3c5a8be8f60..aaf357438c6 100644 --- a/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/deu/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -13,6 +13,7 @@ "cancel": "Abbrechen", "errorInstallingDependencies": "Fehler während Installation der Abhängigkeiten. {0}", "notFoundCompatible": "'{0}' kann nicht installiert werden: Es gibt keine mit VS Code '{1}' kompatible Version.", + "malicious extension": "Die Erweiterung kann nicht installiert werden, da sie als problematisch gemeldet wurde.", "notFoundCompatibleDependency": "Kann nicht installiert werden, da die abhängige Erweiterung '{0}', die mit der aktuellen VS Code Version '{1}' kompatibel ist, nicht gefunden werden kann. ", "quitCode": "Fehler bei der Installation der Erweiterung. Beenden und starten Sie VS Code vor der erneuten Installation neu.", "exitCode": "Fehler bei der Installation der Erweiterung. Beenden und starten Sie VS Code vor der erneuten Installation neu.", diff --git a/i18n/deu/src/vs/platform/issue/electron-main/issueService.i18n.json b/i18n/deu/src/vs/platform/issue/electron-main/issueService.i18n.json index 35229bd6699..91ee9e32e4a 100644 --- a/i18n/deu/src/vs/platform/issue/electron-main/issueService.i18n.json +++ b/i18n/deu/src/vs/platform/issue/electron-main/issueService.i18n.json @@ -5,5 +5,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." - ] + ], + "issueReporter": "Problembericht" } \ No newline at end of file diff --git a/i18n/deu/src/vs/platform/list/browser/listService.i18n.json b/i18n/deu/src/vs/platform/list/browser/listService.i18n.json index 99b767c2190..204a5c783e7 100644 --- a/i18n/deu/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/deu/src/vs/platform/list/browser/listService.i18n.json @@ -8,5 +8,9 @@ ], "workbenchConfigurationTitle": "Workbench", "multiSelectModifier.ctrlCmd": "Ist unter Windows und Linux der Taste \"STRG\" und unter macOSX der Befehlstaste zugeordnet.", - "multiSelectModifier.alt": "Ist unter Windows und Linux der Taste \"Alt\" und unter macOSX der Wahltaste zugeordnet. " + "multiSelectModifier.alt": "Ist unter Windows und Linux der Taste \"Alt\" und unter macOSX der Wahltaste zugeordnet. ", + "multiSelectModifier": "Der Modifizierer zum Hinzufügen eines Elements in Bäumen und Listen zu einer Mehrfachauswahl mit der Maus (zum Beispiel im Explorer, in geöffneten Editoren und in der SCM-Ansicht). \"ctrlCmd\" wird unter Windows und Linux der Taste \"STRG\" und unter macOSX der Befehlstaste zugeordnet. Die Mausbewegung \"Seitlich öffnen\" wird – sofern unterstützt – so angepasst, dass kein Konflikt mit dem Modifizierer zur Mehrfachauswahl entsteht.", + "openMode.singleClick": "Öffnet Elemente mit einem einzelnen Mausklick.", + "openMode.doubleClick": "Öffnet Elemente mit einem doppelten Mausklick.", + "openModeModifier": "Steuert, wie Elemente in Bäumen und Listen mithilfe der Maus geöffnet werden (sofern unterstützt). Legen Sie \"singleClick\" fest, um Elemente mit einem einzelnen Mausklick zu öffnen, und \"doubleClick\", damit sie nur mit einem doppelten Mausklick geöffnet werden. Bei übergeordneten Elementen, deren untergeordnete Elemente sich in Bäumen befinden, steuert diese Einstellung, ob ein Einfachklick oder ein Doppelklick das übergeordnete Elemente erweitert. Beachten Sie, dass einige Bäume und Listen diese Einstellung ggf. ignorieren, wenn sie nicht zutrifft." } \ No newline at end of file diff --git a/i18n/deu/src/vs/platform/localizations/common/localizations.i18n.json b/i18n/deu/src/vs/platform/localizations/common/localizations.i18n.json index bbfd4984d81..ec17b7e0321 100644 --- a/i18n/deu/src/vs/platform/localizations/common/localizations.i18n.json +++ b/i18n/deu/src/vs/platform/localizations/common/localizations.i18n.json @@ -6,5 +6,12 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "vscode.extension.contributes.localizations.languageName": "Name der Sprache in Englisch." + "vscode.extension.contributes.localizations": "Trägt Lokalisierungen zum Editor bei", + "vscode.extension.contributes.localizations.languageId": "ID der Sprache, in die Anzeigezeichenfolgen übersetzt werden.", + "vscode.extension.contributes.localizations.languageName": "Name der Sprache in Englisch.", + "vscode.extension.contributes.localizations.languageNameLocalized": "Name der Sprache in beigetragener Sprache.", + "vscode.extension.contributes.localizations.translations": "Liste der Übersetzungen, die der Sprache zugeordnet sind.", + "vscode.extension.contributes.localizations.translations.id": "ID von VS Code oder der Erweiterung, für die diese Übersetzung beigetragen wird. Die ID von VS Code ist immer \"vscode\", und die ID einer Erweiterung muss im Format \"publisherId.extensionName\" vorliegen.", + "vscode.extension.contributes.localizations.translations.id.pattern": "Die ID muss \"vscode\" sein oder im Format \"publisherId.extensionName\" vorliegen, um VS Code bzw. eine Erweiterung zu übersetzen.", + "vscode.extension.contributes.localizations.translations.path": "Ein relativer Pfad zu einer Datei mit Übersetzungen für die Sprache." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json index 35229bd6699..4290f5cc693 100644 --- a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json +++ b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json @@ -5,5 +5,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." - ] + ], + "saveParticipants": "Speichern von Teilnehmern wird ausgeführt …" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json index 35229bd6699..e0a6dee0eee 100644 --- a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json +++ b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "folderStatusMessageAddSingleFolder": "Die Erweiterung \"{0}\" hat 1 Ordner zum Arbeitsbereich hinzugefügt", + "folderStatusMessageAddMultipleFolders": "Die Erweiterung \"{0}\" hat {1} Ordner zum Arbeitsbereich hinzugefügt", + "folderStatusMessageRemoveSingleFolder": "Die Erweiterung \"{0}\" hat 1 Ordner aus dem Arbeitsbereich entfernt", + "folderStatusMessageRemoveMultipleFolders": "Die Erweiterung \"{0}\" hat {1} Ordner aus dem Arbeitsbereich entfernt", + "folderStatusChangeFolder": "Die Erweiterung \"{0}\" hat Ordner des Arbeitsbereichs geändert" } \ 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 2e6d401a66b..41189883731 100644 --- a/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "treeView.notRegistered": "Kein Treeviw mit der id '{0}' registriert." + "treeView.notRegistered": "Kein Treeviw mit der id '{0}' registriert.", + "treeView.duplicateElement": "Das Element mit der ID {0} ist bereits registriert" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostWorkspace.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostWorkspace.i18n.json index 35229bd6699..c79dfb308b8 100644 --- a/i18n/deu/src/vs/workbench/api/node/extHostWorkspace.i18n.json +++ b/i18n/deu/src/vs/workbench/api/node/extHostWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "updateerror": "Die Erweiterung \"{0}\" konnte die Arbeitsbereichsordner nicht aktualisieren: {1}" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json b/i18n/deu/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json index f729837e222..c57365ae862 100644 --- a/i18n/deu/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "toggleSidebarPosition": "Position der Seitenleiste umschalten", "view": "Anzeigen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json index 55a6b88e370..51ea4c67e48 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json @@ -22,6 +22,7 @@ "closeAllUnmodified": "Nicht geänderte schließen", "closeAll": "Alle schließen", "keepOpen": "Geöffnet lassen", + "toggleInlineView": "Inlineansicht umschalten", "showOpenedEditors": "Geöffnete Editoren anzeigen", "keepEditor": "Editor beibehalten", "closeEditorsInGroup": "Alle Editoren in der Gruppe schließen", 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 3d757fb4c00..1fe62d2efcb 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 @@ -50,5 +50,8 @@ "moveEditorLeft": "Editor nach links verschieben", "moveEditorRight": "Editor nach rechts verschieben", "moveEditorToPreviousGroup": "Editor in vorherige Gruppe verschieben", - "moveEditorToNextGroup": "Editor in nächste Gruppe verschieben" + "moveEditorToNextGroup": "Editor in nächste Gruppe verschieben", + "moveEditorToFirstGroup": "Editor in die erste Gruppe verschieben", + "moveEditorToSecondGroup": "Editor in die zweite Gruppe verschieben", + "moveEditorToThirdGroup": "Editor in die dritte Gruppe verschieben" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index 900a51155e6..21a390445da 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,7 +11,9 @@ "sizeMB": "{0} MB", "sizeGB": "{0} GB", "sizeTB": "{0} TB", + "largeImageError": "Die Dateigröße des Bilds ist zu groß (über 1 MB), um im Editor angezeigt zu werden.", "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.", + "zoom.action.fit.label": "Ganzes Bild", "imgMeta": "{0}x{1} {2}" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/views/viewsViewlet.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/views/viewsViewlet.i18n.json index 35229bd6699..5d61536336c 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/views/viewsViewlet.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/views/viewsViewlet.i18n.json @@ -5,5 +5,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." - ] + ], + "hideView": "Ausblenden" } \ 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 8516171d68a..2902fc87006 100644 --- a/i18n/deu/src/vs/workbench/common/theme.i18n.json +++ b/i18n/deu/src/vs/workbench/common/theme.i18n.json @@ -39,6 +39,8 @@ "statusBarNoFolderBorder": "Rahmenfarbe der Statusleiste zur Abtrennung von der Randleiste und dem Editor, 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. Ändern Sie den Modus mithilfe von \"TAB-Umschalttaste verschiebt Fokus\" auf der Befehlspalette, um ein Beispiel anzuzeigen. 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. Ändern Sie den Modus mithilfe von \"TAB-Umschalttaste verschiebt Fokus\" auf der Befehlspalette, um ein Beispiel anzuzeigen. 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.", 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 bb58ec89340..9ec35c27d27 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 @@ -35,9 +35,11 @@ "panelDefaultLocation": "Steuert die Standardposition des Panels. Dieses kann entweder unterhalb oder rechts von der Workbench angezeigt werden.", "statusBarVisibility": "Steuert die Sichtbarkeit der Statusleiste im unteren Bereich der Workbench.", "activityBarVisibility": "Steuert die Sichtbarkeit der Aktivitätsleiste in der Workbench.", + "fontAliasing": "Steuert die Schriftartaliasingmethode in der Workbench.\n - default: Subpixel-Schriftartglättung. Auf den meisten Nicht-Retina-Displays wird Text bei dieser Einstellung am schärfsten dargestellt. \n- antialiased: Glättet die Schriftart auf der Pixelebene (im Gegensatz zur Subpixelebene). Bei dieser Einstellung kann die Schriftart insgesamt heller wirken.\n- none: Deaktiviert die Schriftartglättung. Text wird mit gezackten scharfen Kanten dargestellt.\n- auto: Wendet ausgehend vom DPI der Anzeige automatisch \"default\" oder \"antialiased\" an.", "workbench.fontAliasing.default": "Subpixel-Schriftartglättung. Auf den meisten Nicht-Retina-Displays wird Text bei dieser Einstellung am schärfsten dargestellt.", "workbench.fontAliasing.antialiased": "Glättet die Schriftart auf der Pixelebene (im Gegensatz zur Subpixelebene). Bei dieser Einstellung kann die Schriftart insgesamt heller wirken.", "workbench.fontAliasing.none": "Deaktiviert die Schriftartglättung. Text wird mit gezackten scharfen Kanten dargestellt.", + "workbench.fontAliasing.auto": "Wendet ausgehend vom DPI der Anzeige automatisch \"default\" oder \"antialiased\" an.", "enableNaturalLanguageSettingsSearch": "Steuert, ob der Suchmodus mit natürlicher Sprache für die Einstellungen aktiviert werden soll.", "windowConfigurationTitle": "Fenster", "window.openFilesInNewWindow.on": "Dateien werden in einem neuen Fenster geöffnet.", diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index 5e893c6c5ca..d64bb26e64f 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -21,6 +21,8 @@ "vscode.extension.contributes.debuggers.configurationAttributes": "JSON-Schemakonfigurationen zum Überprüfen von \"launch.json\".", "vscode.extension.contributes.debuggers.windows": "Windows-spezifische Einstellungen.", "vscode.extension.contributes.debuggers.windows.runtime": "Die für Windows verwendete Laufzeit.", + "vscode.extension.contributes.debuggers.osx": "macOS-spezifische Einstellungen.", + "vscode.extension.contributes.debuggers.osx.runtime": "Für macOS verwendete Laufzeit.", "vscode.extension.contributes.debuggers.linux": "Linux-spezifische Einstellungen.", "vscode.extension.contributes.debuggers.linux.runtime": "Die für Linux verwendete Laufzeit.", "vscode.extension.contributes.breakpoints": "Trägt Haltepunkte bei.", @@ -30,8 +32,12 @@ "app.launch.json.configurations": "Die Liste der Konfigurationen. Fügen Sie neue Konfigurationen hinzu, oder bearbeiten Sie vorhandene Konfigurationen mit IntelliSense.", "app.launch.json.compounds": "Liste der Verbundelemente. Jeder Verbund verweist auf mehrere Konfigurationen, die zusammen gestartet werden.", "app.launch.json.compound.name": "Name des Verbunds. Wird im Dropdownmenü der Startkonfiguration angezeigt.", + "useUniqueNames": "Verwenden Sie eindeutige Konfigurationsnamen.", + "app.launch.json.compound.folder": "Name des Ordners, in dem sich der Verbund befindet.", "app.launch.json.compounds.configurations": "Namen von Konfigurationen, die als Bestandteil dieses Verbunds gestartet werden.", "debugNoType": "Der \"type\" des Debugadapters kann nicht ausgelassen werden und muss vom Typ \"string\" sein.", "selectDebug": "Umgebung auswählen", - "DebugConfig.failed": "Die Datei \"launch.json\" kann nicht im Ordner \".vscode\" erstellt werden ({0})." + "DebugConfig.failed": "Die Datei \"launch.json\" kann nicht im Ordner \".vscode\" erstellt werden ({0}).", + "workspace": "Arbeitsbereich", + "user settings": "Benutzereinstellungen" } \ 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 25396cea2b5..3174c5b2796 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 @@ -13,6 +13,9 @@ "breakpointAdded": "Der Haltepunkt wurde hinzugefügt. Zeile {0}, Datei \"{1}\".", "breakpointRemoved": "Der Haltepunkt wurde entfernt. Zeile {0}, Datei \"{1}\".", "compoundMustHaveConfigurations": "Für den Verbund muss das Attribut \"configurations\" festgelegt werden, damit mehrere Konfigurationen gestartet werden können.", + "noConfigurationNameInWorkspace": "Die Startkonfiguration \"{0}\" wurde im Arbeitsbereich nicht gefunden.", + "multipleConfigurationNamesInWorkspace": "Es gibt mehrere Startkonfigurationen \"{0}\" im Arbeitsbereich. Verwenden Sie den Ordnernamen, um die Konfiguration zu qualifizieren.", + "noFolderWithName": "Der Ordner mit dem Namen \"{0}\" für die Konfiguration \"{1}\" wurde im Verbund \"{2}\" nicht gefunden.", "configMissing": "Konfiguration \"{0}\" fehlt in \"launch.json\".", "launchJsonDoesNotExist": "\"launch.json\" ist nicht vorhanden.", "debugRequestNotSupported": "Das Attribut \"{0}\" hat in der ausgewählten Debugkonfiguration den nicht unterstützten Wert \"{1}\".", @@ -23,6 +26,7 @@ "preLaunchTaskError": "Buildfehler während preLaunchTask \"{0}\".", "preLaunchTaskExitCode": "Der preLaunchTask \"{0}\" wurde mit dem Exitcode {1} beendet.", "debugAnyway": "Trotzdem debuggen", + "showErrors": "Fehler anzeigen", "cancel": "Abbrechen", "noFolderWorkspaceDebugError": "Debuggen der aktiven Datei ist nicht möglich. Stellen Sie sicher, dass sie auf einem Datenträger gespeichert ist und dass Sie die Debugerweiterung für diesen Dateityp installiert haben.", "DebugTaskNotFound": "Der preLaunchTask \"{0}\" wurde nicht gefunden.", 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 99c67ee657c..b094f314c81 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 @@ -33,6 +33,10 @@ "view id": "ID", "view name": "Name", "view location": "Wo", + "localizations": "Lokalisierungen ({0})", + "localizations language id": "Sprach-ID", + "localizations language name": "Sprachname", + "localizations localized language name": "Sprachname (lokalisiert)", "colorThemes": "Farbdesigns ({0})", "iconThemes": "Symboldesigns ({0})", "colors": "Farben ({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 5991e08616a..e651a4b4ffc 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 @@ -52,6 +52,8 @@ "configureWorkspaceRecommendedExtensions": "Empfohlene Erweiterungen konfigurieren (Arbeitsbereich)", "configureWorkspaceFolderRecommendedExtensions": "Empfohlene Erweiterungen konfigurieren (Arbeitsbereichsordner)", "builtin": "Integriert", + "malicious tooltip": "Die Erweiterung wurde als problematisch gemeldet.", + "malicious": "Böswillig", "disableAll": "Alle installierten Erweiterungen löschen", "disableAllWorkspace": "Alle installierten Erweiterungen für diesen Arbeitsbereich deaktivieren", "enableAll": "Alle installierten Erweiterungen aktivieren", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 80327bb0f12..225bd3cf3d6 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "noPro": "Führen Sie zum Profilieren von Erweiterungen den Start mit \"--inspect-extensions=<port>\" durch.", "selectAndStartDebug": "Klicken Sie, um die Profilerstellung zu beenden." } \ 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 e491d647531..32a7731c5fd 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 @@ -11,10 +11,13 @@ "workspaceRecommendation": "Diese Erweiterung wird von Benutzern des aktuellen Arbeitsbereichs empfohlen.", "fileBasedRecommendation": "Ausgehend von den kürzlich geöffneten Dateien wird diese Erweiterung empfohlen.", "exeBasedRecommendation": "Diese Erweiterung wird empfohlen, da Sie {0} installiert haben.", + "dynamicWorkspaceRecommendation": "Diese Erweiterung ist für Sie möglicherweise interessant, da sie von vielen anderen Benutzern des aktuellen Arbeitsbereichs verwendet wird.", "reallyRecommended2": "Für diesen Dateityp wird die Erweiterung \"{0}\" empfohlen.", "reallyRecommendedExtensionPack": "Für diesen Dateityp wird das Erweiterungspaket \"{0}\" empfohlen.", "showRecommendations": "Empfehlungen anzeigen", "install": "Installieren", + "showLanguageExtensions": "Der Marketplace enthält Erweiterungen, die bei \".{0}\"-Dateien behilflich sind.", + "searchMarketplace": "Marketplace durchsuchen", "workspaceRecommended": "Für diesen Arbeitsbereich sind Erweiterungsempfehlungen verfügbar.", "installAll": "Alle installieren", "ignoreExtensionRecommendations": "Möchten Sie alle Erweiterungsempfehlungen ignorieren?", 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 c38717835d6..a3725fa64c5 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 @@ -19,5 +19,6 @@ "suggestProxyError": "Marketplace hat \"ECONNREFUSED\" zurückgegeben. Überprüfen Sie die Einstellung \"http.proxy\".", "extensions": "Erweiterungen", "outdatedExtensions": "{0} veraltete Erweiterungen", + "malicious warning": "\"{0}\" wurde als problematisch gemeldet und wurde daher deinstalliert.", "reloadNow": "Jetzt erneut laden" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index 5fa89a5902e..eea50360cc9 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -6,6 +6,10 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "installingVSIXExtension": "Die Erweiterung wird aus VSIX installiert …", + "malicious": "Diese Erweiterung wird als problematisch gemeldet.", + "installingMarketPlaceExtension": "Die Erweiterung wird aus dem Marketplace installiert …", + "uninstallingExtension": "Die Erweiterung wird deinstalliert …", "enableDependeciesConfirmation": "Durch Aktivieren von \"{0}\" werden auch die dazugehörigen Abhängigkeiten aktiviert. Möchten Sie fortfahren?", "enable": "Ja", "doNotEnable": "Nein", diff --git a/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json index a2f3b7a167d..9164d64820a 100644 --- a/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "workbenchConfigurationTitle": "Workbench" + "workbenchConfigurationTitle": "Workbench", + "feedbackVisibility": "Steuert die Sichtbarkeit des Twitter-Feedbacks (Smiley) in der Statusleiste am unteren Rand der Workbench." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json b/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json index e331942de6b..4155c1298c2 100644 --- a/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json @@ -18,6 +18,7 @@ "request a missing feature": "Fehlendes Feature anfordern", "tell us why?": "Warum?", "commentsHeader": "Kommentare", + "showFeedback": "Feedbacksmiley in der Statusleiste anzeigen", "tweet": "Tweet", "character left": "verbleibende Zeichen", "characters left": "verbleibende Zeichen", diff --git a/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json b/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json index 35229bd6699..c4df2826046 100644 --- a/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json @@ -5,5 +5,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." - ] + ], + "hide": "Ausblenden" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json index 968c208fb47..befad730156 100644 --- a/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -24,7 +24,9 @@ "copyPath": "Pfad kopieren", "saveAll": "Alle speichern", "compareWithSaved": "Mit gespeicherter Datei vergleichen", + "compareWithSelected": "Mit Auswahl vergleichen", "compareSource": "Für Vergleich auswählen", + "compareSelected": "Auswahl vergleichen", "close": "Schließen", "closeOthers": "Andere schließen", "closeUnmodified": "Nicht geänderte schließen", diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json index 5d69462d717..fb478bf901e 100644 --- a/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -20,15 +20,18 @@ "deleteButtonLabelRecycleBin": "&&In Papierkorb verschieben", "deleteButtonLabelTrash": "&&In Papierkorb verschieben", "deleteButtonLabel": "&&Löschen", + "dirtyMessageFilesDelete": "Sie löschen Dateien mit nicht gespeicherten Änderungen. Möchten Sie den Vorgang fortsetzen?", "dirtyMessageFolderOneDelete": "Sie löschen einen Ordner mit nicht gespeicherten Änderungen in einer Datei. Möchten Sie den Vorgang fortsetzen?", "dirtyMessageFolderDelete": "Sie löschen einen Ordner mit nicht gespeicherten Änderungen in {0} Dateien. Möchten Sie den Vorgang fortsetzen?", "dirtyMessageFileDelete": "Sie löschen eine Datei mit nicht gespeicherten Änderungen. Möchten Sie den Vorgang fortsetzen?", "dirtyWarning": "Ihre Änderungen gehen verloren, wenn Sie diese nicht speichern.", + "confirmMoveTrashMessageMultiple": "Möchten Sie die folgenden {0} Dateien löschen?", "confirmMoveTrashMessageFolder": "Möchten Sie \"{0}\" samt Inhalt wirklich löschen?", "confirmMoveTrashMessageFile": "Möchten Sie \"{0}\" wirklich löschen?", "undoBin": "Die Wiederherstellung kann aus dem Papierkorb erfolgen.", "undoTrash": "Die Wiederherstellung kann aus dem Papierkorb erfolgen.", "doNotAskAgain": "Nicht erneut fragen", + "confirmDeleteMessageMultiple": "Möchten Sie die folgenden {0} Dateien endgültig löschen?", "confirmDeleteMessageFolder": "Möchten Sie \"{0}\" samt Inhalt wirklich endgültig löschen?", "confirmDeleteMessageFile": "Möchten Sie \"{0}\" wirklich endgültig löschen?", "irreversible": "Diese Aktion kann nicht rückgängig gemacht werden.", @@ -36,6 +39,8 @@ "importFiles": "Dateien importieren", "confirmOverwrite": "Im Zielordner ist bereits eine Datei oder ein Ordner mit dem gleichen Namen vorhanden. Möchten Sie sie bzw. ihn ersetzen?", "replaceButtonLabel": "&&Ersetzen", + "fileDeleted": "Die Datei wurde zwischenzeitlich gelöscht oder verschoben.", + "fileIsAncestor": "Die zu kopierende Datei ist ein Vorgänger des Zielordners", "duplicateFile": "Duplikat", "globalCompareFile": "Aktive Datei vergleichen mit...", "openFileToCompare": "Zuerst eine Datei öffnen, um diese mit einer anderen Datei zu vergleichen", diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json index 90eb9a59429..3a121e07e4e 100644 --- a/i18n/deu/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -38,6 +38,7 @@ "editorConfigurationTitle": "Editor", "formatOnSave": "Hiermit wird eine Datei beim Speichern formatiert. Es muss ein Formatierer vorhanden sein, die Datei darf nicht automatisch gespeichert werden, und der Editor darf nicht geschlossen werden.", "explorerConfigurationTitle": "Datei-Explorer", + "openEditorsVisible": "Die Anzahl der Editoren, die im Bereich \"Geöffnete Editoren\" angezeigt werden.", "autoReveal": "Steuert, ob der Explorer Dateien beim Öffnen automatisch anzeigen und auswählen soll.", "enableDragAndDrop": "Steuert, ob der Explorer das Verschieben von Dateien und Ordnern mithilfe von Drag Drop zulassen soll.", "confirmDragAndDrop": "Steuert, ob der Explorer um Bestätigung bittet, um Dateien und Ordner per Drag & Drop zu verschieben.", diff --git a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json index 9d65fed4b7f..939255ddb78 100644 --- a/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -12,6 +12,7 @@ "dropFolder": "Möchten Sie den Ordner zum Arbeitsbereich hinzufügen?", "addFolders": "&&Ordner hinzufügen", "addFolder": "&&Ordner hinzufügen", + "confirmMultiMove": "Möchten Sie die folgenden {0} Dateien verschieben?", "confirmMove": "Möchten Sie \"{0}\" wirklich verschieben?", "doNotAskAgain": "Nicht erneut fragen", "moveButtonLabel": "&&Verschieben", diff --git a/i18n/deu/src/vs/workbench/parts/logs/electron-browser/logs.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/logs/electron-browser/logs.contribution.i18n.json index 0c1f5497f13..2d9f1d89efa 100644 --- a/i18n/deu/src/vs/workbench/parts/logs/electron-browser/logs.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/logs/electron-browser/logs.contribution.i18n.json @@ -6,5 +6,9 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "mainLog": "Protokoll (Haupt)", + "sharedLog": "Protokoll (freigegeben)", + "rendererLog": "Protokoll (Fenster)", + "extensionsLog": "Protokoll (Erweiterungshost)", "developer": "Entwickler" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/deu/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index 81aadc9a45f..49305c0e3f8 100644 --- a/i18n/deu/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -8,9 +8,15 @@ ], "openLogsFolder": "Protokollordner öffnen", "showLogs": "Protokolle anzeigen...", + "rendererProcess": "Fenster ({0})", "emptyWindow": "Fenster", "extensionHost": "Erweiterungshost", + "sharedProcess": "Freigegeben", + "mainProcess": "Haupt", + "selectProcess": "Protokoll für Prozess auswählen", + "openLogFile": "Protokolldatei öffnen …", "setLogLevel": "Protokollstufe festlegen", + "trace": "Nachverfolgen", "debug": "Debuggen", "info": "Info", "warn": "Warnung", @@ -18,5 +24,7 @@ "critical": "Kritisch", "off": "Aus", "selectLogLevel": "Protokollstufe auswählen", - "default": "Standard" + "default and current": "Standard und aktuell", + "default": "Standard", + "current": "Aktuell" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json index dc3115a9a3b..08feefc0086 100644 --- a/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -7,6 +7,8 @@ "Do not edit this file. It is machine generated." ], "viewCategory": "Anzeigen", + "problems.view.toggle.label": "Probleme umschalten (Fehler, Warnungen, Informationen)", + "problems.view.focus.label": "Probleme fokussieren (Fehler, Warnungen, Informationen)", "problems.panel.configuration.title": "Ansicht \"Probleme\"", "problems.panel.configuration.autoreveal": "Steuert, ob die Ansicht \"Probleme\" automatisch Dateien anzeigen sollte, wenn diese geöffnet werden.", "markers.panel.title.problems": "Probleme", diff --git a/i18n/deu/src/vs/workbench/parts/output/electron-browser/output.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/output/electron-browser/output.contribution.i18n.json index 8954d15539b..88ed08aa1d5 100644 --- a/i18n/deu/src/vs/workbench/parts/output/electron-browser/output.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/output/electron-browser/output.contribution.i18n.json @@ -7,6 +7,7 @@ "Do not edit this file. It is machine generated." ], "output": "Ausgabe", + "logViewer": "Protokollanzeige", "viewCategory": "Anzeigen", "clearOutput.label": "Ausgabe löschen" } \ 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 7adf632c309..90fed2917e7 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 @@ -17,7 +17,9 @@ "addLabel": "Tastenzuordnung hinzufügen", "removeLabel": "Tastenzuordnung entfernen", "resetLabel": "Tastenbindung zurücksetzen", + "showSameKeybindings": "Die gleichen Tastenzuordnung anzeigen", "copyLabel": "Kopieren", + "copyCommandLabel": "Befehl kopieren", "error": "Fehler '{0}' beim Bearbeiten der Tastenzuordnung. Überprüfen Sie die Datei 'keybindings.json'.", "command": "Befehlstaste", "keybinding": "Tastenzuordnung", diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 11ed109afd5..6baba95d0bf 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -10,7 +10,11 @@ "SearchSettingsWidget.AriaLabel": "Einstellungen suchen", "SearchSettingsWidget.Placeholder": "Einstellungen suchen", "noSettingsFound": "Keine Ergebnisse", + "oneSettingFound": "1 Einstellung gefunden", + "settingsFound": "{0} Einstellungen gefunden", "totalSettingsMessage": "Insgesamt {0} Einstellungen", + "nlpResult": "Ergebnisse in natürlicher Sprache", + "filterResult": "Gefilterte Ergebnisse", "defaultSettings": "Standardeinstellungen", "defaultFolderSettings": "Standardordnereinstellungen", "defaultEditorReadonly": "Nehmen Sie im Editor auf der rechten Seite Änderungen vor, um Standardwerte zu überschreiben.", 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 a08bfa9fee8..91d7c1dbf42 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 @@ -9,6 +9,7 @@ "emptyUserSettingsHeader": "Platzieren Sie Ihre Einstellungen hier, um die Standardeinstellungen zu überschreiben.", "emptyWorkspaceSettingsHeader": "Platzieren Sie Ihre Einstellungen hier, um die Benutzereinstellungen zu überschreiben.", "emptyFolderSettingsHeader": "Platzieren Sie Ihre Ordnereinstellungen hier, um die Einstellungen in den Arbeitsbereichseinstellungen zu überschreiben.", + "newExtensionLabel": "Erweiterung \"{0}\" anzeigen", "editTtile": "Bearbeiten", "replaceDefaultValue": "In Einstellungen ersetzen", "copyDefaultValue": "In Einstellungen kopieren", 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 c8eac2ecc99..a9fedc14f84 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 @@ -11,5 +11,6 @@ "toggleSCMViewlet": "SCM anzeigen", "view": "Anzeigen", "scmConfigurationTitle": "SCM", - "alwaysShowProviders": "Ob der Quellcodeverwaltungsanbieter-Abschnitt immer angezeigt wird." + "alwaysShowProviders": "Ob der Quellcodeverwaltungsanbieter-Abschnitt immer angezeigt wird.", + "diffDecorations": "Steuert die Diff-Dekorationen im Editor." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/deu/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 5bb3da1c7b6..f953fa7ad28 100644 --- a/i18n/deu/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -18,6 +18,7 @@ "RefreshAction.label": "Aktualisieren", "CollapseDeepestExpandedLevelAction.label": "Alle zuklappen", "ClearSearchResultsAction.label": "Löschen", + "CancelSearchAction.label": "Suche abbrechen", "FocusNextSearchResult.label": "Fokus auf nächstes Suchergebnis", "FocusPreviousSearchResult.label": "Fokus auf vorheriges Suchergebnis", "RemoveAction.label": "Schließen", diff --git a/i18n/deu/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index c87e814819b..d91ba5a50c7 100644 --- a/i18n/deu/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -23,5 +23,7 @@ "useRipgrep": "Steuert, ob \"ripgrep\" in der Text- und Dateisuche verwendet wird.", "useIgnoreFiles": "Steuert, ob bei der Suche nach Dateien GITIGNORE- und IGNORE-Dateien verwendet werden.", "search.quickOpen.includeSymbols": "Konfigurieren Sie diese Option, um Ergebnisse aus einer globalen Symbolsuche in die Dateiergebnisse für Quick Open einzuschließen.", - "search.followSymlinks": "Steuert, ob Symlinks während der Suche gefolgt werden." + "search.followSymlinks": "Steuert, ob Symlinks während der Suche gefolgt werden.", + "search.smartCase": "Sucht ohne Berücksichtigung von Groß-/Kleinschreibung, wenn das Muster kleingeschrieben ist, andernfalls wird mit Berücksichtigung von Groß-/Kleinschreibung gesucht.", + "search.globalFindClipboard": "Steuert, ob das Viewlet zum Suchen die freigegebene Suchzwischenablage auf macOS lesen oder verändern soll" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json index 2a877be64f0..e92da46ec50 100644 --- a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json @@ -6,6 +6,12 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "global.scope": "(global)", "global.1": "({0})", + "new.global": "Neue globale Codeausschnittsdatei …", + "group.global": "Vorhandene Codeausschnitte", + "new.global.sep": "Neue Codeausschnitte", + "openSnippet.pickLanguage": "Codeausschnittsdatei auswählen oder Codeausschnitte erstellen", + "openSnippet.label": "Benutzercodeausschnitte konfigurieren", "preferences": "Einstellungen" } \ 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 3c3154ef728..a09996ad139 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 @@ -10,5 +10,6 @@ "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 \"$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." + "snippetSchema.json.description": "Die Beschreibung des Codeausschnitts.", + "snippetSchema.json.scope": "Eine Liste von Sprachnamen, für die dieser Codeausschnitt gilt. Beispiel: \"typescript,javascript\"." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index d129b489023..ddf2fdf01ab 100644 --- a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "Globaler Benutzercodeausschnitt", "source.snippet": "Benutzercodeausschnitt" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json index e978325bc6f..da21c5deaa2 100644 --- a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json @@ -7,6 +7,7 @@ "Do not edit this file. It is machine generated." ], "invalid.path.0": "Expected string in `contributes.{0}.path`. Provided value: {1}", + "invalid.language.0": "Beim Auslassen der Sprache muss der Wert von \"contributes.{0}.path\" eine \".code-snippets\"-Datei sein. Angegebener Wert: {1}", "invalid.language": "Unbekannte Sprache in \"contributes.{0}.language\". Bereitgestellter Wert: {1}", "invalid.path.1": "Es wurde erwartet, dass \"contributes.{0}.path\" ({1}) im Ordner ({2}) der Erweiterung enthalten ist. Dies führt ggf. dazu, dass die Erweiterung nicht portierbar ist.", "vscode.extension.contributes.snippets": "Trägt Codeausschnitte bei.", 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 4bd363ba285..31dfb0b2d5e 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 @@ -21,6 +21,10 @@ "JsonSchema.tasks.terminal": "Die terminal-Eigenschaft ist veraltet. Verwenden Sie stattdessen \"presentation\". ", "JsonSchema.tasks.group.kind": "Die Ausführungsgruppe der Aufgabe.", "JsonSchema.tasks.group.isDefault": "Definiert, ob diese Aufgabe die Standardaufgabe in der Gruppe ist.", + "JsonSchema.tasks.group.defaultBuild": "Markiert die Aufgabe als Standardbuildaufgabe.", + "JsonSchema.tasks.group.defaultTest": "Markiert die Aufgabe als Standardtestaufgabe.", + "JsonSchema.tasks.group.build": "Markiert die Aufgabe als Buildaufgabe, auf die über den Befehl \"Buildtask ausführen\" zugegriffen werden kann.", + "JsonSchema.tasks.group.test": "Markiert die Aufgaben als Testaufgabe, auf die über den Befehl \"Testtask ausführen\" zugegriffen werden kann.", "JsonSchema.tasks.group.none": "Weist die Aufgabe keiner Gruppe zu.", "JsonSchema.tasks.group": "Definiert die Ausführungsgruppe, zu der diese Aufgabe gehört. Zum Hinzufügen der Aufgabe zur Buildgruppe wird \"build\" unterstützt und zum Hinzufügen zur Testgruppe \"test\".", "JsonSchema.tasks.type": "Definiert, ob die Aufgabe als Prozess oder als Befehl innerhalb einer Shell ausgeführt wird.", 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 836f833e80f..23701807e37 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 @@ -15,21 +15,26 @@ "terminal.integrated.shellArgs.osx": "Die Befehlszeilenargumente, die für das OS X-Terminal verwendet werden sollen.", "terminal.integrated.shell.windows": "Der Pfad der Shell, den das Terminal unter Windows verwendet, wenn in Windows enthaltene Terminals verwendet werden (cmd, PowerShell oder Bash unter Ubuntu).", "terminal.integrated.shellArgs.windows": "Die Befehlszeilenargumente, die im Windows-Terminal verwendet werden sollen.", + "terminal.integrated.macOptionIsMeta": "Optionsschlüssel als Metaschlüssel im Terminal auf macOS behandeln.", "terminal.integrated.rightClickCopyPaste": "Wenn dies festgelegt ist, erscheint das Kontextmenü bei einem Rechtsklick im Terminal nicht mehr. Stattdessen erfolgen die Vorgänge Kopieren, wenn eine Auswahl vorgenommen wurde, sowie Einfügen, wenn keine Auswahl vorgenommen wurde.", "terminal.integrated.copyOnSelection": "Wenn gesetzt, wird der im Terminal ausgewählte Text in die Zwischenablage kopiert.", "terminal.integrated.fontFamily": "Steuert die Schriftartfamilie des Terminals. Der Standardwert ist \"editor.fontFamily\".", "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.fontWeight": "Die innerhalb des Terminals zu verwendende Schriftbreite für nicht fetten Text.", + "terminal.integrated.fontWeightBold": "Die innerhalb des Terminals zu verwendende Schriftbreite für fetten Text.", "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.", "terminal.integrated.setLocaleVariables": "Steuert, ob Gebietsschemavariablen beim Start des Terminals festgelegt werden. Der Standardwert ist unter OS X TRUE und FALSE auf anderen Plattformen.", "terminal.integrated.cwd": "Ein expliziter Startpfad zum Starten des Terminals, dies dient als das aktuelle Arbeitsverzeichnis (CWD) für den Shellprozess. Dies ist insbesondere in Arbeitsbereichseinstellungen praktisch, wenn das Stammverzeichnis kein passendes CWD ist.", "terminal.integrated.confirmOnExit": "Ob aktive Terminalsitzungen beim Beenden bestätigt werden sollen.", + "terminal.integrated.enableBell": "Gibt an, ob die Terminalglocke aktiviert ist.", "terminal.integrated.commandsToSkipShell": "Eine Sammlung von Befehls-IDs, deren Tastenzuordnungen nicht an die Shell gesendet und die stattdessen immer durch Code verarbeitet werden. Dies ermöglicht die Verwendung von Tastenzuordnungen, die normalerweise von der Shell verwendet würden, um das gleiche Verhalten wie bei einem Terminal ohne Fokus zu erzielen, z. B. STRG+P zum Starten von Quick Open.", "terminal.integrated.env.osx": "Objekt mit Umgebungsvariablen, das dem unter OS X vom Terminal zu verwendenden VS Code-Prozess hinzugefügt wird", "terminal.integrated.env.linux": "Objekt mit Umgebungsvariablen, das dem unter Linux vom Terminal zu verwendenden VS Code-Prozess hinzugefügt wird", "terminal.integrated.env.windows": "Objekt mit Umgebungsvariablen, das dem unter Windows vom Terminal zu verwendenden VS Code-Prozess hinzugefügt wird", + "terminal.integrated.showExitAlert": "Warnung \"Der Terminalprozess wurde mit folgendem Exitcode beendet\" anzeigen, wenn der Exitcode nicht Null ist.", "terminalCategory": "Terminal", "viewCategory": "Anzeigen" } \ 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 f4cfedf333b..d2d35c523b0 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 @@ -10,5 +10,6 @@ "terminal.foreground": "Die Vordergrundfarbe des Terminal.", "terminalCursor.foreground": "Die Vordergrundfarbe des Terminalcursors.", "terminalCursor.background": "Die Hintergrundfarbe des Terminalcursors. Ermöglicht das Anpassen der Farbe eines Zeichens, das von einem Blockcursor überdeckt wird.", - "terminal.selectionBackground": "Die Auswahlvordergrundfarbe des Terminals." + "terminal.selectionBackground": "Die Auswahlvordergrundfarbe des Terminals.", + "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/terminalInstance.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index 0e7a25d469a..d16dc80c2da 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 @@ -6,6 +6,9 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "terminal.integrated.a11yBlankLine": "Leere Zeile", + "terminal.integrated.a11yPromptLabel": "Terminaleingabe", + "terminal.integrated.a11yTooMuchOutput": "Zu viele Ausgaben zum Anzeigen, navigieren Sie manuell zu den Zeilen, um sie zu lesen", "terminal.integrated.copySelection.noSelection": "Das Terminal enthält keine Auswahl zum Kopieren.", "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.", diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json index 8382b744970..4f31639f0ae 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -9,6 +9,7 @@ "terminal.integrated.chooseWindowsShellInfo": "Sie können die Standardterminalshell über die Schaltfläche \"Anpassen\" ändern.", "customize": "Anpassen", "cancel": "Abbrechen", + "never again": "OK, nicht mehr anzeigen", "terminal.integrated.chooseWindowsShell": "Wählen Sie Ihre bevorzugte Terminalshell. Sie können diese später in Ihren Einstellungen ändern.", "terminalService.terminalCloseConfirmationSingular": "Eine aktive Terminalsitzung ist vorhanden. Möchten Sie sie beenden?", "terminalService.terminalCloseConfirmationPlural": "{0} aktive Terminalsitzungen sind vorhanden. Möchten Sie sie beenden?" diff --git a/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json index 9596e70c245..e3ed2866854 100644 --- a/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -8,5 +8,6 @@ ], "release notes": "Anmerkungen zu dieser Version", "updateConfigurationTitle": "Aktualisieren", - "updateChannel": "Konfiguriert, ob automatische Updates aus einem Updatekanal empfangen werden sollen. Erfordert einen Neustart nach der Änderung." + "updateChannel": "Konfiguriert, ob automatische Updates aus einem Updatekanal empfangen werden sollen. Erfordert einen Neustart nach der Änderung.", + "enableWindowsBackgroundUpdates": "Aktiviert Windows-Hintergrundaktualisierungen." } \ No newline at end of file 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 84809623043..a2ff426010d 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 @@ -20,6 +20,9 @@ "noUpdatesAvailable": "Zurzeit sind keine Updates verfügbar.", "download now": "Jetzt herunterladen", "thereIsUpdateAvailable": "Ein Update ist verfügbar.", + "installUpdate": "Update installieren", + "updateAvailable": "Ein Update ist verfügbar: {0} {1}", + "updateInstalling": "{0} {1} wird im Hintergrund installiert. Wir informieren Sie, wenn dies abgeschlossen ist.", "updateNow": "Jetzt aktualisieren", "updateAvailableAfterRestart": "{0} wird nach dem Neustart aktualisiert.", "commandPalette": "Befehlspalette...", @@ -31,6 +34,7 @@ "checkForUpdates": "Nach Aktualisierungen suchen...", "checkingForUpdates": "Überprüfen auf Updates...", "DownloadingUpdate": "Das Update wird heruntergeladen...", + "installUpdate...": "Update installieren …", "installingUpdate": "Update wird installiert...", "restartToUpdate": "Für Update neu starten..." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/deu/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 9ea62fa02aa..8b206a77c77 100644 --- a/i18n/deu/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/deu/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -21,6 +21,7 @@ "workspaceConfig.name.description": "Ein optionaler Name für den Ordner.", "workspaceConfig.uri.description": "URI des Ordners", "workspaceConfig.settings.description": "Arbeitsbereichseinstellungen", + "workspaceConfig.launch.description": "Arbeitsbereichs-Startkonfigurationen", "workspaceConfig.extensions.description": "Arbeitsbereichserweiterungen", "unknownWorkspaceProperty": "Unbekannte Arbeitsbereichs-Konfigurationseigenschaft" } \ No newline at end of file diff --git a/i18n/esn/extensions/emmet/package.i18n.json b/i18n/esn/extensions/emmet/package.i18n.json index 85f3567181f..371fe6268da 100644 --- a/i18n/esn/extensions/emmet/package.i18n.json +++ b/i18n/esn/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "Una lista separada por comas de nombres de atributos que debe existir en la abreviatura para el filtro de comentarios ser aplicado", "emmetPreferencesFormatNoIndentTags": "Una matriz de nombres de etiqueta que no debería recibir una sangría interna", "emmetPreferencesFormatForceIndentTags": "Una matriz de nombres de etiqueta que siempre debería recibir una sangría interna", - "emmetPreferencesAllowCompactBoolean": "Si es 'true', se produce una anotación compacta de atributos booleanos" + "emmetPreferencesAllowCompactBoolean": "Si es 'true', se produce una anotación compacta de atributos booleanos", + "emmetPreferencesCssWebkitProperties": "Propiedades CSS separadas por comas que consiguen el prefijo de proveedor WebKit cuando se utiliza en la abreviatura Emmet que comienza con '-'. Establecer en la cadena vacía para evitar el prefijo WebKit siempre.", + "emmetPreferencesCssMozProperties": "Propiedades CSS separadas por comas que consiguen el prefijo de proveedor moz cuando se utiliza en la abreviatura Emmet que empieza por '-'. Establecer en la cadena vacía para evitar el prefijo moz siempre.", + "emmetPreferencesCssOProperties": "Propiedades CSS separadas por comas que consiguen o prefijo de proveedor cuando se utiliza en la abreviatura Emmet que comienza con '-'. Establecer en la cadena vacía para evitar o prefijo siempre.", + "emmetPreferencesCssMsProperties": "Propiedades CSS separadas por comas que consiguen el prefijo proveedor de MS cuando se utilizan en la abreviatura Emmet que empieza por '-'. Establecer en la cadena vacía para evitar el prefijo de MS siempre." } \ 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 63b41aa2e8f..cc607b168e4 100644 --- a/i18n/esn/extensions/git/package.i18n.json +++ b/i18n/esn/extensions/git/package.i18n.json @@ -73,6 +73,8 @@ "config.decorations.enabled": "Controla si Git contribuye los colores y distintivos al explorador y a los editores abiertos.", "config.promptToSaveFilesBeforeCommit": "Controla si Git debe comprobar los archivos no guardados antes de confirmar las actualizaciones. ", "config.showInlineOpenFileAction": "Controla si se debe mostrar una acción de archivo abierto en la vista de cambios en Git", + "config.inputValidation": "Controla cuándo mostrar la validación de entrada el contador de entrada.", + "config.detectSubmodules": "Controla si se detectan automáticamente los submódulos Git. ", "colors.modified": "Color para recursos modificados.", "colors.deleted": "Color para los recursos eliminados.", "colors.untracked": "Color para los recursos a los que no se les hace seguimiento.", diff --git a/i18n/esn/extensions/markdown/out/security.i18n.json b/i18n/esn/extensions/markdown/out/security.i18n.json index 09a54bc2ce3..cd6b70bb3a2 100644 --- a/i18n/esn/extensions/markdown/out/security.i18n.json +++ b/i18n/esn/extensions/markdown/out/security.i18n.json @@ -15,5 +15,6 @@ "moreInfo.title": "Más información", "enableSecurityWarning.title": "Habilitar advertencias de seguridad de vista previa en este espacio de trabajo", "disableSecurityWarning.title": "Deshabilitar advertencias de seguridad de vista previa en este espacio de trabajo", + "toggleSecurityWarning.description": "No afecta el nivel de seguridad de contenido", "preview.showPreviewSecuritySelector.title": "Seleccione configuración de seguridad para las previsualizaciones de Markdown en esta área de trabajo" } \ No newline at end of file diff --git a/i18n/esn/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/esn/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index aa0a765d692..ad704b8b174 100644 --- a/i18n/esn/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/esn/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -9,6 +9,7 @@ "previewOnGitHub": "Visualizar en GitHub", "similarIssues": "Problemas similares", "noResults": "No se encontraron resultados", + "rateLimited": "Límite de la API superado", "stepsToReproduce": "Pasos para reproducir", "bugDescription": "¿Cómo se enfrentó a este problema? ¿Qué pasos hay que realizar para reproducir de forma fiable el problema? ¿Qué esperabas que ocurriera y qué pasó realmente?", "performanceIssueDesciption": "¿Cuándo ocurrió este problema de rendimiento? Por ejemplo, ¿se produce al iniciar o después de una serie específica de acciones? Cualquier detalle que usted puede proporcionar ayuda a nuestra investigación", diff --git a/i18n/esn/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/esn/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 4f166939ad6..52308fd1777 100644 --- a/i18n/esn/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/esn/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -20,6 +20,7 @@ "processes": "Procesos actualmente en ejecución", "workspaceStats": "Estadísticas de mi área de trabajo", "extensions": "Mis extensiones", + "tryDisablingExtensions": "El problema es reproducible cuando se deshabilitan las extensiones", "disableExtensions": "Deshabilitar todas las extensiones y volver a cargar la ventana", "showRunningExtensions": "Ver todas las extensiones en ejecución", "githubMarkdown": "Apoyamos Markdown tipo GitHub. Podrá editar su problema y añadir capturas de pantallas para cuando lo previsualicemos en GitHub.", 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 2ba6f8738b8..966708573a3 100644 --- a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -66,6 +66,10 @@ "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.", "wordBasedSuggestions": "Habilita sugerencias basadas en palabras.", + "suggestSelection.first": "Siempre seleccione la primera sugerencia.", + "suggestSelection.recentlyUsed": "Seleccione sugerencias recientes a menos que escriba una nueva opción, por ejemplo ' Console. | -> Console. log ' porque ' log ' se ha completado recientemente.", + "suggestSelection.recentlyUsedByPrefix": "Seleccione sugerencias basadas en prefijos anteriores que han completado esas sugerencias, por ejemplo, ' Co-> Console ' y ' con-> const '.", + "suggestSelection": "Controla cómo se preseleccionan las sugerencias cuando se muestra la lista,", "suggestFontSize": "Tamaño de fuente para el widget de sugerencias", "suggestLineHeight": "Alto de línea para el widget de sugerencias", "selectionHighlight": "Controla si el editor debería destacar coincidencias similares a la selección", 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 b63b822852d..88d96d8cc16 100644 --- a/i18n/esn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/esn/src/vs/platform/environment/node/argv.i18n.json @@ -14,6 +14,7 @@ "reuseWindow": "Forzar para abrir un archivo o carpeta en la última ventana activa.", "wait": "Espere a que los archivos sean cerrados antes de volver.", "locale": "La configuración regional que se usará (por ejemplo, en-US o zh-TW).", + "userDataDir": "Especifica el directorio donde se guardan los datos del usuario. Se puede utilizar para abrir varias instancias de código distintas.", "version": "Versión de impresión.", "help": "Imprima el uso.", "extensionHomePath": "Establezca la ruta de acceso raíz para las extensiones.", diff --git a/i18n/esn/src/vs/platform/list/browser/listService.i18n.json b/i18n/esn/src/vs/platform/list/browser/listService.i18n.json index 83f5d1c197f..3c5d4431859 100644 --- a/i18n/esn/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/esn/src/vs/platform/list/browser/listService.i18n.json @@ -11,5 +11,6 @@ "multiSelectModifier.alt": "Se asigna a \"Alt\" en Windows y Linux y a \"Opción\" en macOS.", "multiSelectModifier": "El modificador que se usará para agregar un elemento en árboles y listas a una selección múltiple con el mouse (por ejemplo en el explorador, los editores abiertos y la vista SCM). ' ctrlCmd ' se asigna a ' control ' en Windows y Linux y a ' Command ' en macOS. Los gestos de ratón \"abrir a lado\", si se admiten, se adaptarán de tal manera que no estén en conflicto con el modificador multiselección.", "openMode.singleClick": "Abre elementos en solo clic de ratón.", - "openMode.doubleClick": "Abre elementos en doble clic del ratón. " + "openMode.doubleClick": "Abre elementos en doble clic del ratón. ", + "openModeModifier": "Controla cómo abrir elementos en árboles y listas con el ratón (si está soportado). Establecer en ' singleClick ' para abrir elementos con un solo clic del ratón y ' DoubleClick ' para abrir sólo a través del doble clic del ratón. Para los elementos padres con hijos en los árboles, este ajuste controlará si un solo clic expande el padre o un doble clic. Tenga en cuenta que algunos árboles y listas pueden optar por ignorar esta configuración si no es aplicable" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index 1f1a35ca71c..400b2707b25 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,6 +11,7 @@ "sizeMB": "{0} MB", "sizeGB": "{0} GB", "sizeTB": "{0} TB", + "largeImageError": "El tamaño del archivo de la imagen es demasiado grande (> 1MB) para mostrarlo 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.", "zoom.action.fit.label": "Imagen completa", diff --git a/i18n/esn/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/esn/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index 4bd190cdebb..a69b23ccc62 100644 --- a/i18n/esn/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -8,10 +8,12 @@ ], "openLogsFolder": "Abrir carpeta de registros", "showLogs": "Mostrar registros...", + "rendererProcess": "Ventana ({0})", "emptyWindow": "Ventana", "extensionHost": "Host de extensión", "sharedProcess": "Compartido", "mainProcess": "Principal", + "selectProcess": "Seleccionar un registro para procesar", "openLogFile": "Abrir archivo de log...", "setLogLevel": "Establecer nivel de registro", "trace": "Seguimiento", diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index c05869af64d..71c57f44157 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -17,6 +17,7 @@ "addLabel": "Agregar enlace de teclado", "removeLabel": "Quitar enlace de teclado", "resetLabel": "Restablecer enlaces de teclado", + "showSameKeybindings": "Mostrar mismo KeyBindings ", "copyLabel": "Copiar", "copyCommandLabel": "Comando Copiar", "error": "Error \"{0}\" al editar el enlace de teclado. Abra el archivo \"keybindings.json\" y compruébelo.", diff --git a/i18n/esn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index b0e42525c30..88d1c104f8f 100644 --- a/i18n/esn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -24,5 +24,6 @@ "useIgnoreFiles": "Controla si se utilizan los archivos .gitignore e .ignore al buscar archivos.", "search.quickOpen.includeSymbols": "Configurar para incluir los resultados de una búsqueda global de símbolos en los resultados de archivos de Quick Open.", "search.followSymlinks": "Controla si debe seguir enlaces simbólicos durante la búsqueda.", - "search.smartCase": "Proporciona busquedas de mayúsculas y minúsculas si el patrón es todo en minúsculas, de lo contrario, busca en mayúsculas y minúsculas" + "search.smartCase": "Proporciona busquedas de mayúsculas y minúsculas si el patrón es todo en minúsculas, de lo contrario, busca en mayúsculas y minúsculas", + "search.globalFindClipboard": "Controla si la Viewlet de búsqueda debe leer o modificar el portapapeles de búsqueda compartido en macOS" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index 05b055f9344..4e9dde048d3 100644 --- a/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "Fragmento del usuario global", "source.snippet": "Fragmento de código del usuario" } \ No newline at end of file diff --git a/i18n/fra/extensions/emmet/package.i18n.json b/i18n/fra/extensions/emmet/package.i18n.json index 099d68b5de1..a84bbf2b573 100644 --- a/i18n/fra/extensions/emmet/package.i18n.json +++ b/i18n/fra/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "Une liste séparée par des virgules de noms d’attributs qui devraient exister en abrégé pour que le filtre de commentaire soit appliqué", "emmetPreferencesFormatNoIndentTags": "Un tableau de noms de balises qui ne devraient pas être indentées", "emmetPreferencesFormatForceIndentTags": "Un tableau de noms de balises qui devraient toujours être indentées", - "emmetPreferencesAllowCompactBoolean": "Si true, la notation compacte des attributs booléens est produite" + "emmetPreferencesAllowCompactBoolean": "Si true, la notation compacte des attributs booléens est produite", + "emmetPreferencesCssWebkitProperties": "Les propriétés css séparées par des virgules qui ont un préfixe webkit vendor lorsqu’elles sont utilisées dans une abréviation emmet qui commence par '-'. Mettre une chaîne vide pour éviter le préfixe webkit.", + "emmetPreferencesCssMozProperties": "Les propriétés css séparées par des virgules qui ont un préfixe moz vendor lorsqu’elles sont utilisées dans une abréviation emmet qui commence par '-'. Mettre une chaîne vide pour éviter le préfixe moz.", + "emmetPreferencesCssOProperties": "Les propriétés css séparées par des virgules qui ont un préfixe o vendor lorsqu’elles sont utilisées dans une abréviation emmet qui commence par '-'. Mettre une chaîne vide pour éviter le préfixe o.", + "emmetPreferencesCssMsProperties": "Les propriétés css séparées par des virgules qui ont un préfixe ms vendor lorsqu’elles sont utilisées dans une abréviation emmet qui commence par '-'. Mettre une chaîne vide pour éviter le préfixe o." } \ 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 6faff6f0ebc..8914c99a8ba 100644 --- a/i18n/fra/extensions/git/package.i18n.json +++ b/i18n/fra/extensions/git/package.i18n.json @@ -73,6 +73,8 @@ "config.decorations.enabled": "Contrôle si Git contribue aux couleurs et aux badges de l’Explorateur et à l'affichage des éditeurs ouverts.", "config.promptToSaveFilesBeforeCommit": "Contrôle si Git doit vérifier les fichiers non sauvegardés avant d'effectuer le commit.", "config.showInlineOpenFileAction": "Contrôle s’il faut afficher une action Ouvrir le fichier dans l’affichage des modifications de Git.", + "config.inputValidation": "Contrôle quand afficher la validation du compteur de saisie.", + "config.detectSubmodules": "Contrôle s’il faut détecter automatiquement les sous-modules git.", "colors.modified": "Couleur pour les ressources modifiées.", "colors.deleted": "Couleur pour les ressources supprimées.", "colors.untracked": "Couleur pour les ressources non tracées.", diff --git a/i18n/fra/extensions/markdown/out/security.i18n.json b/i18n/fra/extensions/markdown/out/security.i18n.json index 493c76e28d6..b3c4ab567f3 100644 --- a/i18n/fra/extensions/markdown/out/security.i18n.json +++ b/i18n/fra/extensions/markdown/out/security.i18n.json @@ -15,5 +15,6 @@ "moreInfo.title": "Informations", "enableSecurityWarning.title": "Activer l'aperçu d'avertissements de sécurité pour cet espace de travail", "disableSecurityWarning.title": "Désactiver l'aperçu d'avertissements de sécurité pour cet espace de travail", + "toggleSecurityWarning.description": "N’affecte pas le niveau de sécurité du contenu", "preview.showPreviewSecuritySelector.title": "Sélectionner les paramètres de sécurité pour les aperçus Markdown dans cet espace de travail" } \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/fra/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index e0b6c0e0890..62f42ce6d30 100644 --- a/i18n/fra/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/fra/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -6,6 +6,13 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "previewOnGitHub": "Prévisualiser sur GitHub", + "similarIssues": "Problèmes similaires", "noResults": "Résultats introuvables", - "description": "Description" + "rateLimited": "Limite de fréquence d’appel à l'API dépassée", + "stepsToReproduce": "Étapes à reproduire", + "bugDescription": "Comment avez-vous rencontré ce problème ? Quelles étapes devez-vous effectuer pour reproduire efficacement le problème ? Qu'attendiez-vous qu'il se produise et qu'est-il réellement arrivé ?", + "performanceIssueDesciption": "Quand ce problème de performance est-il arrivé ? Par exemple, s'est-il produit au démarrage ou après une série d’actions spécifiques ? Tous les détails que vous pouvez fournir peuvent aider notre investigation.", + "description": "Description", + "disabledExtensions": "Les extensions sont désactivées" } \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/fra/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 35229bd6699..8d6402b57cf 100644 --- a/i18n/fra/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/fra/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -5,5 +5,25 @@ "Licensed under the MIT License. See License.txt in the project root for license information.", "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." - ] + ], + "completeInEnglish": "Veuillez remplir le formulaire en anglais.", + "issueTypeLabel": "Je veux soumettre un(e)", + "bugReporter": "Rapport de bug", + "performanceIssue": "Problème de performance", + "featureRequest": "Demande de fonctionnalité", + "issueTitleLabel": "Titre", + "issueTitleRequired": "Veuillez s’il vous plaît entrer un titre.", + "vscodeVersion": "Version de VS Code", + "osVersion": "Version de l’OS", + "systemInfo": "Mes infos système", + "sendData": "Envoyer mes données", + "processes": "Processus en cours d’exécution", + "workspaceStats": "Mes Stats de l’espace de travail", + "extensions": "Mes Extensions", + "tryDisablingExtensions": "Le problème est reproductible lorsque les extensions sont désactivées", + "disableExtensions": "en désactivant toutes les extensions et en rechargeant la fenêtre", + "showRunningExtensions": "Voir toutes les extensions en cours d’exécution", + "githubMarkdown": "Nous supportons la syntaxe GitHub Markdown. Vous pourrez modifier votre question et ajouter des captures d’écran lorsque nous la prévisualiserons sur GitHub.", + "issueDescriptionRequired": "Veuillez entrer une description.", + "loadingData": "Chargement des données..." } \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-main/logUploader.i18n.json b/i18n/fra/src/vs/code/electron-main/logUploader.i18n.json index 35229bd6699..b85eee766a0 100644 --- a/i18n/fra/src/vs/code/electron-main/logUploader.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/logUploader.i18n.json @@ -5,5 +5,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." - ] + ], + "invalidEndpoint": "Point de terminaison d'upload de journal non valide", + "beginUploading": "Téléchargement (Upload) ...", + "didUploadLogs": "Téléchargement réussi ! ID du fichier de log : {0}", + "userDeniedUpload": "Téléchargement (Upload) annulé", + "logUploadPromptHeader": "Télécharger les journaux de session pour sécuriser le point de terminaison ?", + "logUploadPromptBody": "Veuillez vérifier vos fichiers journaux ici : '{0}'", + "logUploadPromptBodyDetails": "Les journaux peuvent contenir des informations personnelles telles que des chemins d’accès complets et des contenus de fichiers.", + "logUploadPromptKey": "J’ai passé en revue mes logs (entrez 'y' pour confirmer le téléchargement)", + "postError": "Erreur en postant les journaux : {0}", + "responseError": "Erreur en postant les journaux. Reçu {0} — {1}", + "parseError": "Erreur en analysant la réponse", + "zipError": "Erreur en compressant les journaux : {0}" } \ 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 43fe327de40..20c287bd863 100644 --- a/i18n/fra/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/menus.i18n.json @@ -90,6 +90,7 @@ "miMarker": "&&Problèmes", "miAdditionalViews": "Affic&&hages supplémentaires", "miCommandPalette": "Palette de &&commandes...", + "miOpenView": "&&Ouvrir la vue...", "miToggleFullScreen": "Plei&&n écran", "miToggleZenMode": "Activer/désactiver le mode zen", "miToggleMenuBar": "Activer/désactiver la &&barre de menus", @@ -184,6 +185,7 @@ "miCheckingForUpdates": "Recherche des mises à jour...", "miDownloadUpdate": "Télécharger la mise à jour disponible", "miDownloadingUpdate": "Téléchargement de la mise à jour...", + "miInstallUpdate": "Installer la mise à jour...", "miInstallingUpdate": "Installation de la mise à jour...", "miRestartToUpdate": "Redémarrer pour mettre à jour...", "aboutDetail": "Version {0}\nCommit {1}\nDate {2}\nShell {3}\nRenderer {4}\nNode {5}\nArchitecture {6}", 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 017c5422686..c59fa7756c3 100644 --- a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -28,6 +28,7 @@ "scrollBeyondLastLine": "Contrôle si l'éditeur défile au-delà de la dernière ligne", "smoothScrolling": "Contrôle si l'éditeur défilera en utilisant une animation", "minimap.enabled": "Contrôle si la minicarte est affichée", + "minimap.side": "Contrôle le côté où afficher la minicarte. Les valeurs possibles sont 'right' et 'left'", "minimap.showSlider": "Contrôle si le curseur de la minicarte est automatiquement masqué. Les valeurs possibles sont 'always' et 'mouseover'", "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", @@ -65,6 +66,10 @@ "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.", "wordBasedSuggestions": "Contrôle si la saisie semi-automatique doit être calculée en fonction des mots présents dans le document.", + "suggestSelection.first": "Sélectionnez toujours la première suggestion.", + "suggestSelection.recentlyUsed": "Sélectionnez les suggestions récentes à moins qu'une saisie ultérieure en sélectionne un, par exemple 'console.| -> console.log' parce que `log` a été complété récemment.", + "suggestSelection.recentlyUsedByPrefix": "Sélectionnez des suggestions basées sur des préfixes précédents qui ont complété ces suggestions, par exemple `co -> console` et `con -> const`.", + "suggestSelection": "Contrôle comment les suggestions sont pré-sélectionnés lors de l’affichage de la liste de suggestion.", "suggestFontSize": "Taille de police du widget de suggestion", "suggestLineHeight": "Hauteur de ligne du widget de suggestion", "selectionHighlight": "Détermine si l'éditeur doit surligner les correspondances similaires à la sélection", diff --git a/i18n/fra/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/fra/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json index 01aa43c6709..aaf27ea984b 100644 --- a/i18n/fra/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -7,5 +7,6 @@ "Do not edit this file. It is machine generated." ], "overviewRulerBracketMatchForeground": "Couleur du marqueur de la règle d'aperçu pour rechercher des parenthèses.", - "smartSelect.jumpBracket": "Atteindre le crochet" + "smartSelect.jumpBracket": "Atteindre le crochet", + "smartSelect.selectToBracket": "Select to Bracket" } \ No newline at end of file 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 cb790c12d8f..c0b0bc6e351 100644 --- a/i18n/fra/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/fra/src/vs/platform/environment/node/argv.i18n.json @@ -10,8 +10,11 @@ "diff": "Comparez deux fichiers entre eux.", "add": "Ajoutez un ou plusieurs dossiers à la dernière fenêtre active.", "goto": "Ouvrez un fichier dans le chemin, à la ligne et la position de caractère spécifiées.", + "newWindow": "Force à ouvrir une nouvelle fenêtre.", + "reuseWindow": "Force à ouvrir un fichier ou un dossier dans la dernière fenêtre active.", "wait": "Attendre que les fichiers soient fermés avant de retourner.", "locale": "Paramètres régionaux à utiliser (exemple : fr-FR ou en-US).", + "userDataDir": "Spécifie le répertoire de l’utilisateur dans lequel les données sont conservées. Peut être utilisé pour ouvrir plusieurs instances distinctes du Code.", "version": "Affichez la version.", "help": "Affichez le mode d'utilisation.", "extensionHomePath": "Définissez le chemin racine des extensions.", diff --git a/i18n/fra/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/fra/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index fe7f9c69fac..f962bfa91d8 100644 --- a/i18n/fra/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/fra/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -13,6 +13,7 @@ "cancel": "Annuler", "errorInstallingDependencies": "Erreur lors de l'installation des dépendances. {0}", "notFoundCompatible": "Impossible d’installer '{0}'; Il n’y a pas de version disponible compatible avec VS Code '{1}'.", + "malicious extension": "Impossible d’installer l'extension car elle a été signalée comme problématique.", "notFoundCompatibleDependency": "Installation impossible car l'extension dépendante '{0}' compatible avec la version actuelle '{1}' de VS Code est introuvable.", "quitCode": "Impossible d’installer l’extension. Veuillez s’il vous plaît quitter et redémarrer VS Code avant de le réinstaller.", "exitCode": "Impossible d’installer l’extension. Veuillez s’il vous plaît sortir et redémarrer VS Code avant de le réinstaller.", diff --git a/i18n/fra/src/vs/platform/issue/electron-main/issueService.i18n.json b/i18n/fra/src/vs/platform/issue/electron-main/issueService.i18n.json index 35229bd6699..cfbd6f443b7 100644 --- a/i18n/fra/src/vs/platform/issue/electron-main/issueService.i18n.json +++ b/i18n/fra/src/vs/platform/issue/electron-main/issueService.i18n.json @@ -5,5 +5,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." - ] + ], + "issueReporter": "Rapporteur du problème" } \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/list/browser/listService.i18n.json b/i18n/fra/src/vs/platform/list/browser/listService.i18n.json index b6216ff7d5a..e512ed15ca9 100644 --- a/i18n/fra/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/fra/src/vs/platform/list/browser/listService.i18n.json @@ -8,5 +8,9 @@ ], "workbenchConfigurationTitle": "Banc d'essai", "multiSelectModifier.ctrlCmd": "Mappe vers 'Contrôle' dans Windows et Linux, et vers 'Commande' dans macOS.", - "multiSelectModifier.alt": "Mappe vers 'Alt' dans Windows et Linux, et vers 'Option' dans macOS." + "multiSelectModifier.alt": "Mappe vers 'Alt' dans Windows et Linux, et vers 'Option' dans macOS.", + "multiSelectModifier": "Le modificateur à utiliser pour ajouter un élément à une multi-sélection avec la souris (par exemple dans l’Explorateur, des éditeurs ouverts et scm view). 'ctrlCmd' mappe vers 'Contrôle' dans Windows et Linux, et vers 'Commande' dans macOS. Les mouvements de souris 'Ouvrir sur le côté', si supportés, s'adaptent pour ne pas entrer en conflit avec le modificateur multiselect.", + "openMode.singleClick": "Ouvre les éléments sur un simple clic de souris.", + "openMode.doubleClick": "Ouvre les éléments sur un double clic de souris.", + "openModeModifier": "Contrôle l’ouverture des éléments dans les arbres et listes à l’aide de la souris (si pris en charge). Mettre la valeur `singleClick` pour ouvrir des éléments avec un simple clic de souris et `doubleClick` pour ouvrir uniquement via un double-clic de souris. Pour les parents ayant des enfants dans les arbres, ce paramètre contrôle si un simple clic développe le parent ou un double-clic. Notez que certains arbres et listes peuvent choisir d’ignorer ce paramètre, si ce n’est pas applicable. " } \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/localizations/common/localizations.i18n.json b/i18n/fra/src/vs/platform/localizations/common/localizations.i18n.json index 35229bd6699..56aac124ab3 100644 --- a/i18n/fra/src/vs/platform/localizations/common/localizations.i18n.json +++ b/i18n/fra/src/vs/platform/localizations/common/localizations.i18n.json @@ -5,5 +5,13 @@ "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.localizations": "Contribuer aux localisations de l’éditeur", + "vscode.extension.contributes.localizations.languageId": "Id de la langue dans laquelle les chaînes d’affichage sont traduites.", + "vscode.extension.contributes.localizations.languageName": "Nom de la langue en anglais.", + "vscode.extension.contributes.localizations.languageNameLocalized": "Nom de la langue dans la langue contribuée.", + "vscode.extension.contributes.localizations.translations": "Liste des traductions associées à la langue.", + "vscode.extension.contributes.localizations.translations.id": "Id de VS Code ou Extension pour lesquels cette traduction contribue. L'Id de VS Code est toujours `vscode` et d’extension doit être au format `publisherId.extensionName`.", + "vscode.extension.contributes.localizations.translations.id.pattern": "L’Id doit être `vscode` ou au format `publisherId.extensionName` pour traduire respectivement VS code ou une extension.", + "vscode.extension.contributes.localizations.translations.path": "Un chemin relatif vers un fichier contenant les traductions pour la langue." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json index 35229bd6699..6b8c2481d1f 100644 --- a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json +++ b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json @@ -5,5 +5,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." - ] + ], + "saveParticipants": "Exécution de la sauvegarde des participants..." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json index 35229bd6699..7a21fce3aaa 100644 --- a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json +++ b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "folderStatusMessageAddSingleFolder": "L'extension '{0}' a ajouté 1 dossier à l’espace de travail", + "folderStatusMessageAddMultipleFolders": "L'extension '{0}' a ajouté {1} dossiers à l’espace de travail", + "folderStatusMessageRemoveSingleFolder": "L'extension '{0}' a supprimé 1 dossier de l’espace de travail", + "folderStatusMessageRemoveMultipleFolders": "L'extension '{0}' a supprimé {1} dossiers de l’espace de travail", + "folderStatusChangeFolder": "L'extension '{0}' a modifié des dossiers de l’espace de travail" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostWorkspace.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostWorkspace.i18n.json index 35229bd6699..b0aeaf56f6a 100644 --- a/i18n/fra/src/vs/workbench/api/node/extHostWorkspace.i18n.json +++ b/i18n/fra/src/vs/workbench/api/node/extHostWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "updateerror": "L'extension '{0}' n’a pas pu mettre à jour les dossiers de l’espace de travail : {1}" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index 58d22a471b8..e91a76e9b43 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,7 +11,9 @@ "sizeMB": "{0} Mo", "sizeGB": "{0} Go", "sizeTB": "{0} To", + "largeImageError": "La taille du fichier de l’image est trop grande (> à 1Mo) pour afficher 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.", + "zoom.action.fit.label": "Toute l’Image", "imgMeta": "{0}x{1} {2}" } \ 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 286165f993f..a586a353490 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 @@ -35,9 +35,11 @@ "panelDefaultLocation": "Contrôle l’emplacement par défaut du panneau. Il peut être affiché soit en bas ou à droite du banc d'essai.", "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.", + "fontAliasing": "Contrôle la méthode de font aliasing dans le workbench.\n- default : Lissage des polices de sous-pixel. Sur la plupart des affichages non-ratina, cela vous donnera le texte le plus vif\n- antialiased : Lisse les polices au niveau du pixel, plutôt que les sous-pixels. Peut faire en sorte que la police apparaisse plus fine dans l’ensemble \n- none : Désactive le lissage des polices. Le texte s'affichera avec des bordures dentelées\n- auto: Applique `default` ou `antialiased` automatiquement en se basant sur la résolution de l'affichage.", "workbench.fontAliasing.default": "Lissage de sous-pixel des polices. Sur la plupart des affichages non-retina, cela vous donnera le texte le plus vif.", "workbench.fontAliasing.antialiased": "Lisser les polices au niveau du pixel, plutôt que les sous-pixels. Peut faire en sorte que la police apparaisse plus légère dans l’ensemble.", "workbench.fontAliasing.none": "Désactive le lissage des polices. Le texte s'affichera avec des bordures dentelées.", + "workbench.fontAliasing.auto": "Applique `default` ou `antialiased`automatiquement en se basant sur la résolution de l'affichage.", "enableNaturalLanguageSettingsSearch": "Contrôle s’il faut activer le mode de recherche en langage naturel pour les paramètres.", "windowConfigurationTitle": "Fenêtre", "window.openFilesInNewWindow.on": "Les fichiers s'ouvrent dans une nouvelle fenêtre", diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index d3b5c5753a7..4839400b9f6 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -32,8 +32,12 @@ "app.launch.json.configurations": "Liste des configurations. Ajoutez de nouvelles configurations, ou modifiez celles qui existent déjà à l'aide d'IntelliSense.", "app.launch.json.compounds": "Liste des composés. Chaque composé référence plusieurs configurations qui sont lancées ensemble.", "app.launch.json.compound.name": "Nom du composé. Apparaît dans le menu déroulant de la configuration de lancement.", + "useUniqueNames": "Veuillez utiliser des noms de configuration uniques.", + "app.launch.json.compound.folder": "Nom du dossier dans lequel le composé se trouve.", "app.launch.json.compounds.configurations": "Noms des configurations qui sont lancées dans le cadre de ce composé.", "debugNoType": "Le 'type' de l'adaptateur de débogage ne peut pas être omis. Il doit s'agir du type 'string'.", "selectDebug": "Sélectionner l'environnement", - "DebugConfig.failed": "Impossible de créer le fichier 'launch.json' dans le dossier '.vscode' ({0})." + "DebugConfig.failed": "Impossible de créer le fichier 'launch.json' dans le dossier '.vscode' ({0}).", + "workspace": "espace de travail", + "user settings": "paramètres utilisateur" } \ 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 4e7aec72ee2..58b7007f072 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 @@ -13,6 +13,9 @@ "breakpointAdded": "Point d'arrêt ajouté, ligne {0}, fichier {1}", "breakpointRemoved": "Point d'arrêt supprimé, ligne {0}, fichier {1}", "compoundMustHaveConfigurations": "L'attribut \"configurations\" du composé doit être défini pour permettre le démarrage de plusieurs configurations.", + "noConfigurationNameInWorkspace": "La configuration de lancement '{0}' est introuvable dans l’espace de travail.", + "multipleConfigurationNamesInWorkspace": "Il y a plusieurs configurations de lancement `{0}` dans l’espace de travail. Utilisez le nom du dossier pour qualifier la configuration.", + "noFolderWithName": "Impossible de trouver le dossier avec le nom '{0}' pour la configuration '{1}' dans le composé '{2}'.", "configMissing": "Il manque la configuration '{0}' dans 'launch.json'.", "launchJsonDoesNotExist": "'launch.json' n’existe pas.", "debugRequestNotSupported": "L’attribut '{0}' a une valeur '{1}' non prise en charge dans la configuration de débogage sélectionnée.", @@ -23,6 +26,7 @@ "preLaunchTaskError": "Une erreur de build a été détectée durant le preLaunchTask '{0}'.", "preLaunchTaskExitCode": "Le preLaunchTask '{0}' s'est terminé avec le code de sortie {1}.", "debugAnyway": "Déboguer quand même", + "showErrors": "Afficher les erreurs", "cancel": "Annuler", "noFolderWorkspaceDebugError": "Impossible de déboguer le fichier actif. Vérifiez qu'il est enregistré sur le disque et qu'une extension de débogage est installée pour ce type de fichier.", "DebugTaskNotFound": "preLaunchTask '{0}' introuvable.", 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 8d073926340..cd8c8f19229 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 @@ -33,6 +33,10 @@ "view id": "ID", "view name": "Nom", "view location": "Emplacement", + "localizations": "Localisations ({0})", + "localizations language id": "Id de langue", + "localizations language name": "Nom de langue", + "localizations localized language name": "Nom de langue (localisé)", "colorThemes": "Thèmes de couleurs ({0})", "iconThemes": "Thèmes d’icônes ({0})", "colors": "Couleurs ({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 302b1f3356f..b36eb21c3f6 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 @@ -52,6 +52,8 @@ "configureWorkspaceRecommendedExtensions": "Configurer les extensions recommandées (espace de travail)", "configureWorkspaceFolderRecommendedExtensions": "Configurer les extensions recommandées (Dossier d'espace de travail)", "builtin": "Intégrée", + "malicious tooltip": "Cette extension a été signalée comme problématique.", + "malicious": "Malveillant", "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", diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index c1f0a70b06b..e3c50234698 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "noPro": "Pour profiler les extensions, lancer avec `--inspect-extensions=<port>`.", "selectAndStartDebug": "Cliquer pour arrêter le profilage" } \ 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 6336a023890..885898a8f46 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 @@ -11,6 +11,7 @@ "workspaceRecommendation": "Cette extension est recommandée par les utilisateurs de l’espace de travail actuel.", "fileBasedRecommendation": "Cette extension est recommandée basé sur les fichiers que vous avez ouverts récemment.", "exeBasedRecommendation": "Cette extension est recommandée parce que {0} est installé.", + "dynamicWorkspaceRecommendation": "Cette extension peut vous intéresser car beaucoup d'utilisateurs de l'espace de travail actuel l'utilise.", "reallyRecommended2": "L'extension '{0}' est recommandée pour ce type de fichier.", "reallyRecommendedExtensionPack": "Le pack d’extensions '{0}' est recommandé pour ce type de fichier.", "showRecommendations": "Afficher les recommandations", 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 73f4e9667be..557f45e5910 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 @@ -19,5 +19,6 @@ "suggestProxyError": "Marketplace a retourné 'ECONNREFUSED'. Vérifiez le paramètre 'http.proxy'.", "extensions": "Extensions", "outdatedExtensions": "{0} extensions obsolètes", + "malicious warning": "Nous avons désinstallé '{0}' qui a été signalé comme problématique.", "reloadNow": "Recharger maintenant" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index 6a8d5b6d58e..19955e42403 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -7,6 +7,8 @@ "Do not edit this file. It is machine generated." ], "installingVSIXExtension": "Installation d'extension depuis un VSIX...", + "malicious": "Cette extension est signalée comme problématique.", + "installingMarketPlaceExtension": "Installation d’extension depuis le Marketplace...", "uninstallingExtension": "Désinstallation d'extension...", "enableDependeciesConfirmation": "L'activation de '{0}' entraîne également l'activation de ses dépendances. Voulez-vous continuer ?", "enable": "Oui", diff --git a/i18n/fra/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/fra/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index a5a27d438f2..22ec4bca1a4 100644 --- a/i18n/fra/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -8,10 +8,12 @@ ], "openLogsFolder": "Ouvrir le dossier des journaux", "showLogs": "Afficher les journaux...", + "rendererProcess": "Fenêtre ({0})", "emptyWindow": "Fenêtre", "extensionHost": "Hôte d'extension", "sharedProcess": "Partagé", "mainProcess": "Principal", + "selectProcess": "Sélectionnez le journal pour les processus", "openLogFile": "Ouvrir le fichier de log...", "setLogLevel": "Définir le niveau de journalisation (log)", "trace": "Trace", @@ -22,5 +24,7 @@ "critical": "Critique", "off": "Désactivé", "selectLogLevel": "Sélectionner le niveau de journalisation (log)", - "default": "Par défaut" + "default and current": "Par défaut & actuel", + "default": "Par défaut", + "current": "Actuel" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/fra/src/vs/workbench/parts/markers/common/messages.i18n.json index 4f0b8255dd0..26c532d9d00 100644 --- a/i18n/fra/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -7,6 +7,8 @@ "Do not edit this file. It is machine generated." ], "viewCategory": "Affichage", + "problems.view.toggle.label": "Activer/désactiver les problèmes (Erreurs, Avertissements, Infos)", + "problems.view.focus.label": " Focus sur les problèmes (Erreurs, Avertissements, Infos)", "problems.panel.configuration.title": "Affichage des problèmes", "problems.panel.configuration.autoreveal": "Contrôle si l'affichage des problèmes doit automatiquement montrer les fichiers quand il les ouvre", "markers.panel.title.problems": "Problèmes", 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 30ecf112fb6..6479583ddf2 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 @@ -17,6 +17,7 @@ "addLabel": "Ajouter une combinaison de touches", "removeLabel": "Supprimer la combinaison de touches", "resetLabel": "Définir une combinaison de touches", + "showSameKeybindings": "Afficher les mêmes raccourcis clavier", "copyLabel": "Copier", "copyCommandLabel": "Copier la Commande", "error": "Erreur '{0}' durant la modification de la combinaison de touches. Ouvrez le fichier 'keybindings.json', puis effectuez la vérification.", diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 46d2aa7ed76..9576e2a4552 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -10,6 +10,8 @@ "SearchSettingsWidget.AriaLabel": "Paramètres de recherche", "SearchSettingsWidget.Placeholder": "Paramètres de recherche", "noSettingsFound": "Aucun résultat", + "oneSettingFound": "1 paramètre trouvé", + "settingsFound": "{0} paramètres trouvés", "totalSettingsMessage": "Total de {0} paramètres", "nlpResult": "Résultats en langage naturel", "filterResult": "Résultats filtrés", 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 d1f1c499307..2d6bafcf633 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 @@ -9,6 +9,7 @@ "emptyUserSettingsHeader": "Placer vos paramètres ici pour remplacer les paramètres par défaut.", "emptyWorkspaceSettingsHeader": "Placer vos paramètres ici pour remplacer les paramètres utilisateur.", "emptyFolderSettingsHeader": "Placer les paramètres de votre dossier ici pour remplacer ceux des paramètres de l’espace de travail.", + "newExtensionLabel": "Afficher l’Extension \"{0}\"", "editTtile": "Modifier", "replaceDefaultValue": "Remplacer dans les paramètres", "copyDefaultValue": "Copier dans Paramètres", diff --git a/i18n/fra/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/fra/src/vs/workbench/parts/search/browser/searchActions.i18n.json index d3c41fcdfcc..675880ca4b7 100644 --- a/i18n/fra/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -18,6 +18,7 @@ "RefreshAction.label": "Actualiser", "CollapseDeepestExpandedLevelAction.label": "Réduire tout", "ClearSearchResultsAction.label": "Effacer", + "CancelSearchAction.label": "Annuler la recherche", "FocusNextSearchResult.label": "Focus sur le résultat de la recherche suivant", "FocusPreviousSearchResult.label": "Focus sur le résultat de la recherche précédent", "RemoveAction.label": "Rejeter", diff --git a/i18n/fra/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index 4162ef81ca4..338fbbcaab1 100644 --- a/i18n/fra/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -24,5 +24,6 @@ "useIgnoreFiles": "Contrôle s'il faut utiliser les fichiers .gitignore et .ignore par défaut pendant la recherche de fichiers.", "search.quickOpen.includeSymbols": "Configurez l'ajout des résultats d'une recherche de symboles globale dans le fichier de résultats pour Quick Open.", "search.followSymlinks": "Contrôle s'il faut suivre les symlinks pendant la recherche.", - "search.smartCase": "Recherches de manière non case-sensitive si le modèle est entièrement en minuscules, dans le cas contraire, recherche de manière case-sensitive" + "search.smartCase": "Recherches de manière non case-sensitive si le modèle est entièrement en minuscules, dans le cas contraire, recherche de manière case-sensitive", + "search.globalFindClipboard": "Contrôle si le viewlet de recherche doit lire ou modifier le presse-papiers partagé sur macOS" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index 3fa060ac6da..6d8d447dfa2 100644 --- a/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "Extrait de code global de l’utilisateur", "source.snippet": "Extrait de code utilisateur" } \ 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 fb9dc3578ab..25af594698d 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 @@ -21,6 +21,10 @@ "JsonSchema.tasks.terminal": "La propriété de terminal est dépréciée. Utilisez la présentation à la place", "JsonSchema.tasks.group.kind": "Groupe d'exécution de la tâche.", "JsonSchema.tasks.group.isDefault": "Définit si cette tâche est la tâche par défaut du groupe.", + "JsonSchema.tasks.group.defaultBuild": "Marque la tâche comme tâche de génération par défaut.", + "JsonSchema.tasks.group.defaultTest": "Marque la tâche comme tâche de test par défaut.", + "JsonSchema.tasks.group.build": "Marque la tâche comme tâche de génération accessible par la commande 'Exécuter la tâche de génération'.", + "JsonSchema.tasks.group.test": "Marque la tâche comme tâche de test accessible par la commande 'Exécuter la tâche de test'.", "JsonSchema.tasks.group.none": "N'assigne la tâche à aucun groupe", "JsonSchema.tasks.group": "Définit le groupe d'exécution auquel la tâche appartient. Prend en charge \"build\" pour l'ajouter au groupe de génération et \"test\" pour l'ajouter au groupe de test.", "JsonSchema.tasks.type": "Définit si la tâche est exécutée comme un processus ou comme une commande à l’intérieur d’un shell.", 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 b0481602ad8..dd371d2b4a0 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 @@ -21,12 +21,15 @@ "terminal.integrated.fontFamily": "Contrôle la famille de polices du terminal. La valeur par défaut est la valeur associée à editor.fontFamily.", "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.fontWeight": "La police de caractères à utiliser dans le terminal pour le texte non gras.", + "terminal.integrated.fontWeightBold": "La police de caractères à utiliser dans le terminal pour le texte en gras.", "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.", "terminal.integrated.setLocaleVariables": "Contrôle si les variables locales sont définies au démarrage du terminal. La valeur par défaut est true sur OS X, false sur les autres plateformes.", "terminal.integrated.cwd": "Chemin explicite de lancement du terminal. Il est utilisé comme répertoire de travail actif du processus d'interpréteur de commandes. Cela peut être particulièrement utile dans les paramètres d'espace de travail, si le répertoire racine n'est pas un répertoire de travail actif adéquat.", "terminal.integrated.confirmOnExit": "Indique s'il est nécessaire de confirmer l'existence de sessions de terminal actives au moment de quitter.", + "terminal.integrated.enableBell": "Si la cloche du terminal est activée ou non.", "terminal.integrated.commandsToSkipShell": "Ensemble d'ID de commandes dont les combinaisons de touches sont gérées par Code au lieu d'être envoyées à l'interpréteur de commandes. Cela permet d'utiliser des combinaisons de touches qui sont normalement consommées par l'interpréteur de commandes et d'obtenir le même résultat quand le terminal n'a pas le focus, par exemple Ctrl+P pour lancer Quick Open.", "terminal.integrated.env.osx": "Objet avec les variables d’environnement qui seront ajoutées au processus VS Code pour être utilisées par le terminal sous OS X", "terminal.integrated.env.linux": "Objet avec les variables d’environnement qui seront ajoutées au processus VS Code pour être utilisées par le terminal sous Linux", 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 36366528bb4..96e9b0fe397 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 @@ -6,6 +6,9 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "terminal.integrated.a11yBlankLine": "Ligne vide", + "terminal.integrated.a11yPromptLabel": "Entrée du terminal", + "terminal.integrated.a11yTooMuchOutput": "Trop de sorties à annoncer, naviguer dans les lignes manuellement pour lire", "terminal.integrated.copySelection.noSelection": "Le terminal n'a aucune sélection à copier", "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", diff --git a/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json index 37c7f279e2b..29c8735c1ee 100644 --- a/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -8,5 +8,6 @@ ], "release notes": "Notes de publication", "updateConfigurationTitle": "Mettre à jour", - "updateChannel": "Indiquez si vous recevez des mises à jour automatiques en provenance d'un canal de mises à jour. Un redémarrage est nécessaire en cas de modification." + "updateChannel": "Indiquez si vous recevez des mises à jour automatiques en provenance d'un canal de mises à jour. Un redémarrage est nécessaire en cas de modification.", + "enableWindowsBackgroundUpdates": "Active les mises à jour Windows en arrière-plan." } \ No newline at end of file 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 d57577cf970..ca0a706dda8 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 @@ -20,6 +20,9 @@ "noUpdatesAvailable": "Aucune mise à jour n'est disponible actuellement.", "download now": "Télécharger maintenant", "thereIsUpdateAvailable": "Une mise à jour est disponible.", + "installUpdate": "Installer la mise à jour", + "updateAvailable": "Il y a une mise à jour disponible : {0} {1}", + "updateInstalling": "{0} {1} est en train d'être installé en arrière-plan, nous vous ferons savoir quand c’est fini.", "updateNow": "Mettre à jour maintenant", "updateAvailableAfterRestart": "{0} sera mis à jour après avoir redémarré.", "commandPalette": "Palette de commandes...", @@ -31,6 +34,7 @@ "checkForUpdates": "Rechercher les mises à jour...", "checkingForUpdates": "Recherche des mises à jour...", "DownloadingUpdate": "Téléchargement de la mise à jour...", + "installUpdate...": "Installation de la mise à jour...", "installingUpdate": "Installation de la mise à jour...", "restartToUpdate": "Redémarrer pour mettre à jour..." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/fra/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index e0d37d9bb65..bce1f4235aa 100644 --- a/i18n/fra/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/fra/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -21,6 +21,7 @@ "workspaceConfig.name.description": "Un nom facultatif pour le dossier. ", "workspaceConfig.uri.description": "URI du dossier", "workspaceConfig.settings.description": "Paramètres de l’espace de travail", + "workspaceConfig.launch.description": "Configurations de lancement de l’espace de travail", "workspaceConfig.extensions.description": "Extensions de l’espace de travail", "unknownWorkspaceProperty": "Propriété de configuration d’espace de travail inconnue" } \ No newline at end of file diff --git a/i18n/hun/extensions/emmet/package.i18n.json b/i18n/hun/extensions/emmet/package.i18n.json index 34caaff29fe..3df37c61cd7 100644 --- a/i18n/hun/extensions/emmet/package.i18n.json +++ b/i18n/hun/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "Attribútumnevek vesszővel elválasztott listája, amelyeknek léteznie kell a megjegyzésszűrő alkalmazásához.", "emmetPreferencesFormatNoIndentTags": "Azon elemek neveit tartalmazó tömb, melyek nem kapnak belső indentálást", "emmetPreferencesFormatForceIndentTags": "Azon elemek neveit tartalmazó tömb, melyek mindig kapnak belső indentálást", - "emmetPreferencesAllowCompactBoolean": "Ha az értéke true, a logikai értékeket tartalmazó attribútumok esetén a rövidített jelölés lesz használva" + "emmetPreferencesAllowCompactBoolean": "Ha az értéke true, a logikai értékeket tartalmazó attribútumok esetén a rövidített jelölés lesz használva", + "emmetPreferencesCssWebkitProperties": "CSS-tulajdonságok vesszővel ellátott listája, melyek 'webkit' gyártói előtagot kapnak azoknál az Emmet-rövidtéseknél, melyek `-` karakterrel kezdődnek. Állítsa üres szövegre, ha soha nem szeretne 'webkit' előtagot használni.", + "emmetPreferencesCssMozProperties": "CSS-tulajdonságok vesszővel ellátott listája, melyek 'moz' gyártói előtagot kapnak azoknál az Emmet-rövidtéseknél, melyek `-` karakterrel kezdődnek. Állítsa üres szövegre, ha soha nem szeretne 'moz' előtagot használni.", + "emmetPreferencesCssOProperties": "CSS-tulajdonságok vesszővel ellátott listája, melyek 'o' gyártói előtagot kapnak azoknál az Emmet-rövidtéseknél, melyek `-` karakterrel kezdődnek. Állítsa üres szövegre, ha soha nem szeretne 'o' előtagot használni.", + "emmetPreferencesCssMsProperties": "CSS-tulajdonságok vesszővel ellátott listája, melyek 'ms' gyártói előtagot kapnak azoknál az Emmet-rövidtéseknél, melyek `-` karakterrel kezdődnek. Állítsa üres szövegre, ha soha nem szeretne 'ms' előtagot használni." } \ 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 index 8ef19727403..b06c2c09402 100644 --- a/i18n/hun/extensions/git/out/commands.i18n.json +++ b/i18n/hun/extensions/git/out/commands.i18n.json @@ -28,6 +28,7 @@ "revert": "Módosítások visszaállítása", "discard": "Módosítások elvetése", "confirm delete": "Biztosan TÖRLI a következőt: {0}?", + "delete file": "Fájl törlése", "confirm discard": "Elveti a módosításokat a következő helyen: {0}?", "confirm discard multiple": "Elveti {0} fájl módosításait?", "warn untracked": "A művelet {0} nem követett fájl TÖRLÉSÉT fogja eredményezni!", @@ -36,6 +37,7 @@ "discardAll multiple": "Egy fájl elvetése", "discardAll": "Mind a(z) {0} fájl elvetése", "confirm delete multiple": "Biztosan TÖRÖLNI akar {0} fájlt?", + "delete files": "Fájlok törlése", "there are untracked files single": "A következő, nem követett fájl TÖRÖLVE LESZ A LEMEZRŐL, ha elvetésre kerül: {0}.", "there are untracked files": "{0} nem követett fájl TÖRÖLVE LESZ A LEMEZRŐL, ha elvetésre kerülnek. ", "confirm discard all 2": "{0}\n\nA művelet NEM VONHATÓ VISSZA, az aktuális munka ÖRÖKRE EL FOG VESZNI.", @@ -60,7 +62,9 @@ "branch already exists": "Már van '{0}' nevű ág", "select a branch to merge from": "Válassza ki az ágat, amit olvasztani szeretne", "merge conflicts": "Összeolvasztási konfliktusok keletkeztek. Oldja fel őket a beadás (commit) előtt!", + "tag name": "Címke neve", "provide tag name": "Adja meg a címke nevét", + "tag message": "Üzenet", "provide tag message": "Adja meg a címke leírását tartalmazó üzenetet", "no remotes to fetch": "A forráskódtárhoz nincsenek távoli szerverek konfigurálva, ahonnan le lehetne kérni.", "no remotes to pull": "A forráskódtárhoz nincsenek távoli szerverek konfigurálva, ahonnan pullozni lehetne.", diff --git a/i18n/hun/extensions/git/package.i18n.json b/i18n/hun/extensions/git/package.i18n.json index 2d1e53ad170..4901736229c 100644 --- a/i18n/hun/extensions/git/package.i18n.json +++ b/i18n/hun/extensions/git/package.i18n.json @@ -71,6 +71,10 @@ "config.enableCommitSigning": "Commit GPG-vel történő aláírásának engedélyezése.", "config.discardAllScope": "Meghatározza, hogy milyen módosítások kerülnek elvetésre az \"Összes módosítás elvetése\" parancs kiadása esetén. `all` esetén minden módosítás elvetődik. `tracked` esetén csak a követett fájlok módosításai vetődnek el. `prompt` esetén a parancs minden futtatásánál felugrik egy párbeszédablak.", "config.decorations.enabled": "Meghatározza, hogy a Git megjelölje-e színnel és jelvénnyekkel a fájlokat a fájlkezelőben és a nyitott szerkesztőablakok nézetben.", + "config.promptToSaveFilesBeforeCommit": "Meghatározza, hogy a Git ellenőrizze-e, hogy van-e mentetlen fájl beadás (commit) előtt.", + "config.showInlineOpenFileAction": "Meghatározza, hogy megjelenjen-e a sorok között egy 'Fájl megnyitása' művelet a git változások nézetén.", + "config.inputValidation": "Meghatározza, hogy mikor jelenjen meg a bemeneti karakterszámláló.", + "config.detectSubmodules": "Meghatározza, hogy automatikusan fel legyenek-e derítve a git almodulok.", "colors.modified": "A módosított erőforrások színe.", "colors.deleted": "A törölt erőforrások színe.", "colors.untracked": "A nem követett erőforrások színe.", diff --git a/i18n/hun/extensions/markdown/out/security.i18n.json b/i18n/hun/extensions/markdown/out/security.i18n.json index 04355ed0724..def0928c3a2 100644 --- a/i18n/hun/extensions/markdown/out/security.i18n.json +++ b/i18n/hun/extensions/markdown/out/security.i18n.json @@ -6,6 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "strict.title": "Szigorú", "strict.description": "Csak biztonságos tartalmak betöltése", "insecureContent.title": "Nem biztonságos tartalom engedélyezése", "insecureContent.description": "Tartalom betöltésének engedélyezése HTTP-n keresztül.", @@ -14,5 +15,6 @@ "moreInfo.title": "További információ", "enableSecurityWarning.title": "Előnézettel kapcsolatos biztonsági figyelmeztetések engedélyezése ezen a munkaterületen", "disableSecurityWarning.title": "Előnézettel kapcsolatos biztonsági figyelmeztetések letiltása ezen a munkaterületen", + "toggleSecurityWarning.description": "Nem befolyásolja a tartalom biztonsági szintjét", "preview.showPreviewSecuritySelector.title": "Válassza ki a munkaterület Markdown-előnézeteinek biztonsági beállítását!" } \ No newline at end of file diff --git a/i18n/hun/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/hun/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index 016d26a725b..45d84d1c04e 100644 --- a/i18n/hun/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/hun/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -6,6 +6,13 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "previewOnGitHub": "Előnézet GitHubon", + "similarIssues": "Hasonló problémák", "noResults": "Nincs találat", - "description": "Leírás" + "rateLimited": "API-híváskorlát túllépve", + "stepsToReproduce": "A probléma előidézésének lépései", + "bugDescription": "Hogyan találkozott a problémával? Milyen lépéseket kell tenni a hiba megbízható reprodukálásához? Minek kellett volna történnie, és mi történt helyette?", + "performanceIssueDesciption": "Mikor fordult elő ez a teljesítménybeli probléma? Például előfordul indulásnál vagy végre kell hajtani bizonyos műveleteket? Bármilyen részlet segítheti a vizsgálatot.", + "description": "Leírás", + "disabledExtensions": "A kiegészítők le vannak tiltva." } \ No newline at end of file diff --git a/i18n/hun/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/hun/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 35229bd6699..e0afa073ad0 100644 --- a/i18n/hun/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/hun/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -5,5 +5,23 @@ "Licensed under the MIT License. See License.txt in the project root for license information.", "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." - ] + ], + "completeInEnglish": "Kérjük, hogy angolul töltse ki az űrlapot!", + "issueTypeLabel": "Szeretnék bejelenteni egy", + "bugReporter": "hibát", + "performanceIssue": "teljesítményproblémát", + "featureRequest": "funkcióigényt", + "issueTitleLabel": "Cím", + "issueTitleRequired": "Kérjük, adja meg a címet!", + "vscodeVersion": "VS Code-verzió", + "osVersion": "Operációs rendszer verziója", + "systemInfo": "Rendszerinformációk", + "sendData": "Adatok elküldése", + "processes": "Jelenleg futó folyamatok", + "workspaceStats": "Munkaterület-statisztikák", + "extensions": "Kiegészítők", + "tryDisablingExtensions": "A probléma letiltott kiegészítőkkel is előidézhető", + "githubMarkdown": "A mezőben GitHub-stílusú markdown használható. A hibajelentés szerkeszthető lesz és képernyőfotók is csatolhatók a githubos előnézetnél.", + "issueDescriptionRequired": "Kérjük, adja meg a leírást.", + "loadingData": "Adatok betöltése..." } \ No newline at end of file diff --git a/i18n/hun/src/vs/code/electron-main/logUploader.i18n.json b/i18n/hun/src/vs/code/electron-main/logUploader.i18n.json index 35229bd6699..68750e05607 100644 --- a/i18n/hun/src/vs/code/electron-main/logUploader.i18n.json +++ b/i18n/hun/src/vs/code/electron-main/logUploader.i18n.json @@ -5,5 +5,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." - ] + ], + "invalidEndpoint": "Érvénytelen naplófájl-feltöltési végpont", + "beginUploading": "Feltöltés...", + "didUploadLogs": "Feltöltés sikeres! Naplófájl-azonosító: {0}", + "userDeniedUpload": "Feltöltés megszakítása", + "logUploadPromptHeader": "Munkamenet naplójának feltöltése egy biztonságos végpontra?", + "logUploadPromptBody": "A naplófájlok itt tekinthetők át: '{0}'", + "logUploadPromptBodyDetails": "A naplók személyes információkat tartalmazhatnak, például teljes elérési utakat és fájlok tartalmát.", + "logUploadPromptKey": "Áttekintettem a naplófájljaimat (írjon be egy 'y'-t a feltöltés megerősítéséhez)", + "postError": "Hiba a naplók beküldése közben: {0}", + "responseError": "Hiba a naplók beküldése közben: {0} – {1}", + "parseError": "Hiba a válasz feldolgozása közben", + "zipError": "Hiba a naplók tömörítése közben: {0}" } \ 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 index 94919096b31..4cccb93b736 100644 --- a/i18n/hun/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/hun/src/vs/code/electron-main/menus.i18n.json @@ -90,6 +90,7 @@ "miMarker": "&&Problémák", "miAdditionalViews": "További &&nézetek", "miCommandPalette": "Paran&&cskatalógus...", + "miOpenView": "&&Nézet megnyitása...", "miToggleFullScreen": "&&Teljes képernyő be- és kikapcsolása", "miToggleZenMode": "Zen mód be- és kikapcsolása", "miToggleMenuBar": "Menüsáv &&be- és kikapcsolása", @@ -184,6 +185,7 @@ "miCheckingForUpdates": "Frissítések keresése...", "miDownloadUpdate": "Elérhető frissítés letöltése", "miDownloadingUpdate": "Frissítés letöltése...", + "miInstallUpdate": "Frissítés telepítése...", "miInstallingUpdate": "Frissítés telepítése...", "miRestartToUpdate": "Újraindítás a frissítéshez...", "aboutDetail": "Verzió: {0}\nCommit: {1}\nDátum: {2}\nShell: {3}\nRendelő: {4}\nNode: {5}\nArchitektúra: {6}", diff --git a/i18n/hun/src/vs/platform/environment/node/argv.i18n.json b/i18n/hun/src/vs/platform/environment/node/argv.i18n.json index 966e4e365e6..b9c872c074c 100644 --- a/i18n/hun/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/hun/src/vs/platform/environment/node/argv.i18n.json @@ -10,8 +10,11 @@ "diff": "Két fájl összehasonlítása egymással.", "add": "Mappá(k) hozzáadása a legutolsó aktív ablakhoz.", "goto": "Megnyitja a megadott elérési úton található fájlt a megadott sornál és oszlopnál.", + "newWindow": "Mindenképp új ablakban nyíljon meg", + "reuseWindow": "Fájl vagy mappa a legutolsó aktív ablakban nyíljon meg.", "wait": "Várjon a fájlok bezárására a visszatérés előtt.", "locale": "A használt lokalizáció (pl. en-US vagy zh-TW)", + "userDataDir": "Meghatározza azt a mappát, ahol a felhasználói adatok vannak tárolva. Egyszerre több megnyitott Code-példány is használhatja.", "version": "Verzió kiírása.", "help": "Használati útmutató kiírása.", "extensionHomePath": "A kiegészítők gyökérkönyvtárának beállítása.", diff --git a/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 2f08f3c0a08..9f9b5cc3316 100644 --- a/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -13,6 +13,7 @@ "cancel": "Mégse", "errorInstallingDependencies": "Hiba a függőségek telepítése közben. {0}", "notFoundCompatible": "A(z) '{0}' nem telepíthető: nincs a VS Code '{1}' verziójával kompatibilis változat.", + "malicious extension": "A kiegészítő nem telepíthető, mert jelentették, hogy problémás.", "notFoundCompatibleDependency": "A telepítés nem sikerült, mert a(z) '{0}' kiegészítő függőség VS Code '{1}' verziójával kompatibilis változata nem található. ", "quitCode": "A kiegészítő telepítése nem sikerült. Lépjen ki és indítsa el a VS Code-ot az újratelepítés előtt!", "exitCode": "A kiegészítő telepítése nem sikerült. Lépjen ki és indítsa el a VS Code-ot az újratelepítés előtt!", diff --git a/i18n/hun/src/vs/platform/issue/electron-main/issueService.i18n.json b/i18n/hun/src/vs/platform/issue/electron-main/issueService.i18n.json index 35229bd6699..570645f055d 100644 --- a/i18n/hun/src/vs/platform/issue/electron-main/issueService.i18n.json +++ b/i18n/hun/src/vs/platform/issue/electron-main/issueService.i18n.json @@ -5,5 +5,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." - ] + ], + "issueReporter": "Hibajelentő" } \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/list/browser/listService.i18n.json b/i18n/hun/src/vs/platform/list/browser/listService.i18n.json index f820502bc2b..c91ae24bd28 100644 --- a/i18n/hun/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/hun/src/vs/platform/list/browser/listService.i18n.json @@ -8,5 +8,9 @@ ], "workbenchConfigurationTitle": "Munkaterület", "multiSelectModifier.ctrlCmd": "Windows és Linux alatt a `Control`, macOS alatt a `Command` billentyűt jelenti.", - "multiSelectModifier.alt": "Windows és Linux alatt az `Alt`, macOS alatt az `Option` billentyűt jelenti." + "multiSelectModifier.alt": "Windows és Linux alatt az `Alt`, macOS alatt az `Option` billentyűt jelenti.", + "multiSelectModifier": "Több elem kijelölése esetén újabb elem hozzáadásához használt módosítóbillentyű a fanézetekben és listákban (például a fájlkezelőben, a megnyitott szerkesztőablakok listájában és a verziókezelő rendszer nézeten). A `ctrlCmd` Windows és Linux alatt a `Control`, macOS alatt a `Command` billentyűt jelenti. A 'Megnyitás oldalt\" egérgesztusok – ha támogatva vannak – automatikusan úgy lesznek beállítva, hogy ne ütközzenek a több elem kijelöléséhez tartozó módosító billentyűvel.", + "openMode.singleClick": "Elemek megnyitása egyetlen kattintásra.", + "openMode.doubleClick": "Elemek megnyitása dupla kattintásra.", + "openModeModifier": "Meghatározza, hogyan nyíljanak meg az elemek a fanézetekben és listákban egér használata esetén (ha támogatott). `singleClick` esetén egyetlen kattintásra megnyílnak az elemek, míg `doubleClick` esetén dupla kattintás szükséges. Fanézeteknél meghatározza, hogy a szülőelemek egyetlen vagy dupla kattintásra nyílnak ki. Megjegyzés: néhány fanézet és lista figyelmen kívül hagyja ezt a beállítást ott, ahol ez nem alkalmazható. " } \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/localizations/common/localizations.i18n.json b/i18n/hun/src/vs/platform/localizations/common/localizations.i18n.json index 9d2a66e5573..abad9f3e01b 100644 --- a/i18n/hun/src/vs/platform/localizations/common/localizations.i18n.json +++ b/i18n/hun/src/vs/platform/localizations/common/localizations.i18n.json @@ -7,5 +7,11 @@ "Do not edit this file. It is machine generated." ], "vscode.extension.contributes.localizations": "Lokalizációkat szolgáltat a szerkesztőhöz", - "vscode.extension.contributes.localizations.languageId": "Annak a nyelvnek az azonosítója, amelyre a megjelenített szövegek fordítva vannak." + "vscode.extension.contributes.localizations.languageId": "Annak a nyelvnek az azonosítója, amelyre a megjelenített szövegek fordítva vannak.", + "vscode.extension.contributes.localizations.languageName": "A nyelv neve angolul.", + "vscode.extension.contributes.localizations.languageNameLocalized": "A nyelv neve a szolgáltatott nyelven.", + "vscode.extension.contributes.localizations.translations": "A nyelvhez rendelt fordítások listája.", + "vscode.extension.contributes.localizations.translations.id": "Azonosító, ami a VS Code-ra vagy arra a kiegészítőre hivatkozik, amihez a fordítás szolgáltatva van. A VS Code azonosítója mindig `vscode`, kiegészítők esetén pedig a `publisherId.extensionName` formátumban kell megadni.", + "vscode.extension.contributes.localizations.translations.id.pattern": "Az id értéke VS Code fordítása esetében `vscode`, egy kiegészítő esetében pedig `publisherId.extensionName` formátumú lehet.", + "vscode.extension.contributes.localizations.translations.path": "A nyelvhez tartozó fordításokat tartalmazó fájl relatív elérési útja." } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json b/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json index 35229bd6699..8a2823620d5 100644 --- a/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json +++ b/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "folderStatusMessageAddSingleFolder": "A(z) '{0}' kiegészítő egy mappát adott hozzá a munkaterülethez.", + "folderStatusMessageAddMultipleFolders": "A(z) '{0}' kiegészítő {0} mappát adott hozzá a munkaterülethez.", + "folderStatusMessageRemoveSingleFolder": "A(z) '{0}' kiegészítő eltávolított egy mappát a munkaterületről.", + "folderStatusMessageRemoveMultipleFolders": "A(z) '{0}' kiegészítő {1} mappát távolított el a munkaterületről.", + "folderStatusChangeFolder": "A(z) '{0}' kiegészítő módosította a munkaterület mappáit." } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/node/extHostWorkspace.i18n.json b/i18n/hun/src/vs/workbench/api/node/extHostWorkspace.i18n.json index 35229bd6699..9c6051394b9 100644 --- a/i18n/hun/src/vs/workbench/api/node/extHostWorkspace.i18n.json +++ b/i18n/hun/src/vs/workbench/api/node/extHostWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "updateerror": "A(z) '{0}' kiegészítőnek nem sikerült módosítani a munkaterület mappáit: {1}" } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index c5650196af2..3e1e7156096 100644 --- a/i18n/hun/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,7 +11,9 @@ "sizeMB": "{0} MB", "sizeGB": "{0} GB", "sizeTB": "{0} TB", + "largeImageError": "A képfájl mérete túl nagy (>1 MB) 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.", + "zoom.action.fit.label": "Teljes kép", "imgMeta": "{0}x{1} {2}" } \ 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 index fb26cad0fa6..ad1c52f6a8d 100644 --- a/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -35,9 +35,11 @@ "panelDefaultLocation": "Meghatározza a panel alapértelmezett pozícióját. A panel a munkaterület alján vagy jobb oldalán jelenhet meg.", "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.", + "fontAliasing": "Meghatározza a munkaterületen megjelenő betűtípusok élsimítási módszerét.\n- default: Szubpixeles betűsimítás. A legtöbb nem-retina típusú kijelzőn ez adja a legélesebb szöveget.\n- antialiased: A betűket pixelek, és nem szubpixelek szintjén simítja. A betűtípus vékonyabbnak tűnhet összességében.\n- none: Letiltja a betűtípusok élsimítését. A szövegek egyenetlen, éles szélekkel jelennek meg.\n- auto: A `default` vagy `antialiased` beállítások automatikus alkalmazása a kijelzők DPI-je alapján.", "workbench.fontAliasing.default": "Szubpixeles betűsimítás. A legtöbb nem-retina típusú kijelzőn ez adja a legélesebb szöveget.", "workbench.fontAliasing.antialiased": "A betűket pixelek, és nem szubpixelek szintjén simítja. A betűtípus vékonyabbnak tűnhet összességében.", "workbench.fontAliasing.none": "Letiltja a betűtípusok élsimítését. A szövegek egyenetlen, éles szélekkel jelennek meg.", + "workbench.fontAliasing.auto": " A `default` vagy `antialiased` beállítások automatikus alkalmazása a kijelzők DPI-je alapján.", "enableNaturalLanguageSettingsSearch": "Meghatározza, hogy engedélyezve van-e a természetes nyelvi keresési mód a beállításoknál.", "windowConfigurationTitle": "Ablak", "window.openFilesInNewWindow.on": "A fájlok új ablakban nyílnak meg", 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 index 94900abbcc1..b07cb0ef2cd 100644 --- 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 @@ -32,8 +32,12 @@ "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.", + "useUniqueNames": "Használjon egyedi konfigurációs neveket!", + "app.launch.json.compound.folder": "A mappa neve, ahol az összetett konfiguráció található.", "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.", "selectDebug": "Környezet kiválasztása", - "DebugConfig.failed": "Nem sikerült létrehozni a 'launch.json' fájlt a '.vscode' mappánan ({0})." + "DebugConfig.failed": "Nem sikerült létrehozni a 'launch.json' fájlt a '.vscode' mappánan ({0}).", + "workspace": "munkaterület", + "user settings": "felhasználói beállítások" } \ 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 index c0d50b4b05c..c4fc5ba9093 100644 --- 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 @@ -13,6 +13,9 @@ "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.", + "noConfigurationNameInWorkspace": "A(z) '{0}' indítási konfiguráció nem található a munkaterületen.", + "multipleConfigurationNamesInWorkspace": "Több `{0}` névvel rendelkező indítási konfiguráció is van a munkaterületen. Használja a mappa nevét a konfiguráció pontos megadásához!", + "noFolderWithName": "Nem található '{0}' nevű mappa a(z) '{1}' konfigurációhoz a(z) '{2}' összetett konfigurációban.", "configMissing": "A(z) '{0}' konfiguráció hiányzik a 'launch.json'-ból.", "launchJsonDoesNotExist": "A 'launch.json' nem létezik.", "debugRequestNotSupported": "A(z) `{0}` attribútumnak nem támogatott értéke van ('{1}') a kiválasztott hibakeresési konfigurációban.", @@ -23,6 +26,7 @@ "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", + "showErrors": "Hibák megjelenítése", "cancel": "Mégse", "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ő.", "DebugTaskNotFound": "A(z) '{0}' preLaunchTask nem található.", 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 index 788695273d2..bbce48ea15e 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -33,6 +33,10 @@ "view id": "Azonosító", "view name": "Név", "view location": "Hol?", + "localizations": "Lokalizációk ({0})", + "localizations language id": "Nyelv azonosítója", + "localizations language name": "Nyelv neve", + "localizations localized language name": "Nyelv neve (lokalizálva)", "colorThemes": "Színtémák ({0})", "iconThemes": "Ikontémák ({0})", "colors": "Színek ({0})", 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 index 19ba7826b26..591fd152602 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -52,6 +52,8 @@ "configureWorkspaceRecommendedExtensions": "Ajánlott kiegészítők konfigurálása (munkaterületre vonatkozóan)", "configureWorkspaceFolderRecommendedExtensions": "Ajánlott kiegészítők konfigurálása (munkaterület-mappára vonatkozóan)", "builtin": "Beépített", + "malicious tooltip": "A kiegészítőt korábban problémásnak jelezték.", + "malicious": "Rosszindulatú", "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", diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index d86f17e2c4a..2185e1f6316 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "noPro": "Kiegészítők profilozásához indítsa az alkalmazást az `--inspect-extensions=<port>` kapcsolóval!", "selectAndStartDebug": "Kattintson a profilozás leállításához!" } \ 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 index e7feafa73c2..a877a7c58ff 100644 --- 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 @@ -11,6 +11,7 @@ "workspaceRecommendation": "Ez a kiegészítő az aktuális munkaterület felhasználói által ajánlott.", "fileBasedRecommendation": "Ez a kiegészítő a közelmúltban megnyitott fájlok alapján ajánlott.", "exeBasedRecommendation": "Ez a kiegészítő azért ajánlott, mert a következő telepítve van: {0}.", + "dynamicWorkspaceRecommendation": "Ez a kiegészítő lehet, hogy érdekelni fogja, mert az aktuális munkaterület felhasználói közül sokan használják.", "reallyRecommended2": "Ehhez a fájltípushoz a(z) '{0}' kiegészítő ajánlott.", "reallyRecommendedExtensionPack": "Ehhez a fájltípushoz a(z) '{0}' kiegészítőcsomag ajánlott.", "showRecommendations": "Ajánlatok megjelenítése", 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 index 8c69d5e6f09..e46c9945604 100644 --- 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 @@ -19,5 +19,6 @@ "suggestProxyError": "A piactér 'ECONNREFUSED' hibával tért vissza. Ellenőrizze a 'http.proxy' beállítást!", "extensions": "Kiegészítők", "outdatedExtensions": "{0} elavult kiegészítő", + "malicious warning": "Eltávolítottuk a(z) '{0}' kiegészítőt, mert jelezték, hogy problémás.", "reloadNow": "Újratöltés most" } \ 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 index eb7e9655776..3afdba07a67 100644 --- a/i18n/hun/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -7,6 +7,8 @@ "Do not edit this file. It is machine generated." ], "installingVSIXExtension": "Kiegészítő telepítése VSIX-ből...", + "malicious": "Jelezték, hogy a kiegészítőt problémás.", + "installingMarketPlaceExtension": "Kiegészítő telepítése a piactérről...", "uninstallingExtension": "Kiegészítő eltávolítása...", "enableDependeciesConfirmation": "A(z) '{0}' engedélyezésével annak függőségei is engedélyezve lesznek. Szeretné folytatni?", "enable": "Igen", diff --git a/i18n/hun/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/hun/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index 435a44357b5..02537c879c2 100644 --- a/i18n/hun/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -8,10 +8,12 @@ ], "openLogsFolder": "Naplómappa megnyitása", "showLogs": "Naplók megjelenítése...", + "rendererProcess": "Ablak ({0})", "emptyWindow": "Ablak", "extensionHost": "Kiegészítő gazdafolyamata", "sharedProcess": "Megosztott", "mainProcess": "Elsődleges", + "selectProcess": "Válasszon folyamatnaplót!", "openLogFile": "Naplófájl megnyitása...", "setLogLevel": "Naplózási szint beállítása", "trace": "Nyomkövetés", @@ -22,5 +24,7 @@ "critical": "Kritikus", "off": "Kikapcsolva", "selectLogLevel": "Naplózási szint beállítása", - "default": "Alapértelmezett" + "default and current": "Alapértelmezett & jelenlegi", + "default": "Alapértelmezett", + "current": "Aktuális" } \ 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 index 3b95fa88154..a7216cca1d6 100644 --- a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -17,6 +17,7 @@ "addLabel": "Billentyűparancs hozzáadása", "removeLabel": "Billentyűparancs eltávolítása", "resetLabel": "Billentyűparancs visszaállítása", + "showSameKeybindings": "Egyező billentyűparancsok megjelenítése", "copyLabel": "Másolás", "copyCommandLabel": "Parancs másolása", "error": "'{0}' hiba a billentyűparancsok szerkesztése közben. Nyissa meg a 'keybindings.json' fájlt, és ellenőrizze!", 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 index 2affc6ad1ad..3f82c002188 100644 --- a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -10,6 +10,8 @@ "SearchSettingsWidget.AriaLabel": "Beállítások keresése", "SearchSettingsWidget.Placeholder": "Beállítások keresése", "noSettingsFound": "Nincs eredmény", + "oneSettingFound": "1 egyező beállítás", + "settingsFound": "{0} egyező beállítás", "totalSettingsMessage": "Összesen {0} beállítás", "nlpResult": "Természetes nyelvi keresés eredményei", "filterResult": "Szűrt találatok", 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 index e1d5c2e0db6..febf379cc1e 100644 --- a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -9,6 +9,7 @@ "emptyUserSettingsHeader": "Az ebben a fájlban elhelyezett beállítások felülírják az alapértelmezett beállításokat.", "emptyWorkspaceSettingsHeader": "Az ebben a fájlban elhelyezett beállítások felülírják a felhasználói beállításokat.", "emptyFolderSettingsHeader": "Az ebben a fájlban elhelyezett beállítások felülírják a munkaterületre vonatkozó beállításokat.", + "newExtensionLabel": "\"{0}\" kiegészítő megjelenítése", "editTtile": "Szerkesztés", "replaceDefaultValue": "Csere a beállításokban", "copyDefaultValue": "Másolás a beállításokba", 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 index 56a5f129a8a..6c9f746df9e 100644 --- a/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -18,6 +18,7 @@ "RefreshAction.label": "Frissítés", "CollapseDeepestExpandedLevelAction.label": "Összes bezárása", "ClearSearchResultsAction.label": "Törlés", + "CancelSearchAction.label": "Keresés megszakítása", "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": "Elvetés", diff --git a/i18n/hun/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index 4fe5ac2c712..99bf550dddd 100644 --- a/i18n/hun/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -24,5 +24,6 @@ "useIgnoreFiles": "Meghatározza, hogy a .gitignore és .ignore fájlok használva legyenek-e 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.", "search.followSymlinks": "Meghatározza, hogy keresés során követve legyenek-e a szimbolikus linkek.", - "search.smartCase": "Figyelmen kívül hagyja a kis- és nagybetűket, ha a minta csak kisbetűkből áll, ellenkező esetben kis- és nagybetűérzékenyen keres" + "search.smartCase": "Figyelmen kívül hagyja a kis- és nagybetűket, ha a minta csak kisbetűkből áll, ellenkező esetben kis- és nagybetűérzékenyen keres", + "search.globalFindClipboard": "Meghatározza, hogy a keresőmodul olvassa és módosítsa-e a megosztott keresési vágólapot macOS-en." } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index f0a13c73159..869515c3c57 100644 --- a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "Globális felhasználói kódrészket", "source.snippet": "Felhasználói kódrészlet" } \ 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 index 273ee125f36..65bf3fa4359 100644 --- 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 @@ -21,6 +21,10 @@ "JsonSchema.tasks.terminal": "A terminal tulajdonság elavult. Használja helyette a presentation tulajdonságot!", "JsonSchema.tasks.group.kind": "A feladat végrehajtási csoportja.", "JsonSchema.tasks.group.isDefault": "Meghatározza, hogy ez a feladat egy elsődleges feladat-e a csoportban.", + "JsonSchema.tasks.group.defaultBuild": "A feladatot az alapértelmezett buildelési feladatnak jelöli meg.", + "JsonSchema.tasks.group.defaultTest": "A feladatot az alapértelmezett tesztelési feladatnak jelöli meg.", + "JsonSchema.tasks.group.build": "A feladatot a 'Buildelési feladat futtatása' parancson keresztül elérhető buildelési feladatnak jelöli meg.", + "JsonSchema.tasks.group.test": "A feladatot a 'Tesztelési feladat futtatása' parancson keresztül elérhető tesztelési feladatnak jelöli meg.", "JsonSchema.tasks.group.none": "A feladatot egyetlen csoporthoz sem rendeli", "JsonSchema.tasks.group": "Meghatározza a feladat végrehajtási csoportját. A \"build\" esetén a buildelési csoportba, a \"test\" esetén a tesztelési csoportba kerül bele a feladat.", "JsonSchema.tasks.type": "Meghatározza, hogy a feladat folyamatként van-e végrehajtva vagy egy parancsként a shellben.", 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 index 75d507968be..cf62370d670 100644 --- 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 @@ -21,12 +21,15 @@ "terminal.integrated.fontFamily": "Meghatározza a terminál betűtípusát. Alapértelmezett értéke az editor.fontFamily értéke.", "terminal.integrated.fontSize": "Meghatározza a terminálban használt betű méretét, pixelekben.", "terminal.integrated.lineHeight": "Meghatározza a terminál sormagasságát. 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.fontWeight": "A nem félkövér szöveg esetén használt betűvastagság a terminálban.", + "terminal.integrated.fontWeightBold": "A félkövér szöveg esetén használt betűvastagság a terminálban.", "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.enableBell": "Meghatározza, hogy engedélyezve van-e a csengő a terminálba.", "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.integrated.env.osx": "A VS Code folyamatához hozzáadott környezeti változókat tartalmazó objektum, amit az OS X-es terminál használ.", "terminal.integrated.env.linux": "A VS Code folyamatához hozzáadott környezeti változókat tartalmazó objektum, amit a linuxos terminál használ.", 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 index 3c3464193dc..50576796b1f 100644 --- 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 @@ -6,6 +6,9 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "terminal.integrated.a11yBlankLine": "Üres sor", + "terminal.integrated.a11yPromptLabel": "Terminál bemenet", + "terminal.integrated.a11yTooMuchOutput": "Túl sok felolvasásra váró kimenet, navigáljon a sorokhoz manuálisan a felolvasáshoz!", "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...", 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 index a3fffba1fdc..2650b5d6516 100644 --- 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 @@ -8,5 +8,6 @@ ], "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." + "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.", + "enableWindowsBackgroundUpdates": "Háttérben történő frissítés engedélyezése Windowson." } \ 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 index d001933dd31..5bdd6066042 100644 --- 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 @@ -20,6 +20,9 @@ "noUpdatesAvailable": "Jelenleg nincs elérhető frissítés.", "download now": "Letöltés most", "thereIsUpdateAvailable": "Van elérhető frissítés.", + "installUpdate": "Frissítés telepítése", + "updateAvailable": "Frissítés érhető el: {0} {1}", + "updateInstalling": "{0} {1} a háttérben települ. Jelzünk, ha elkészült.", "updateNow": "Frissítés most", "updateAvailableAfterRestart": "A {0} frissül az újraindítás után.", "commandPalette": "Parancskatalógus...", @@ -31,6 +34,7 @@ "checkForUpdates": "Frissítések keresése...", "checkingForUpdates": "Frissítések keresése...", "DownloadingUpdate": "Frissítés letöltése...", + "installUpdate...": "Frissítés telepítése...", "installingUpdate": "Frissítés telepítése...", "restartToUpdate": "Újraindítás a frissítéshez..." } \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/hun/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index a8fb58c22e3..dc9b5a6e5f0 100644 --- a/i18n/hun/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/hun/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -21,6 +21,7 @@ "workspaceConfig.name.description": "A mappa neve. Nem kötelező megadni.", "workspaceConfig.uri.description": "A mappa URI-ja", "workspaceConfig.settings.description": "Munkaterület-beállítások", + "workspaceConfig.launch.description": "Munkaterületspecifikus indítási konfigurációk", "workspaceConfig.extensions.description": "Munkaterület-kiegészítők", "unknownWorkspaceProperty": "Ismeretlen munkaterület-konfigurációs tulajdonság" } \ No newline at end of file diff --git a/i18n/ita/extensions/emmet/package.i18n.json b/i18n/ita/extensions/emmet/package.i18n.json index a62c898a9fb..edb1fa71491 100644 --- a/i18n/ita/extensions/emmet/package.i18n.json +++ b/i18n/ita/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "Un elenco delimitato da virgole di nomi di attributi che dovrebbero esistere come abbreviazione per il filtro commenti da applicare", "emmetPreferencesFormatNoIndentTags": "Una matrice di nomi di tag che non dovrebbe ottenere il rientro interno", "emmetPreferencesFormatForceIndentTags": "Una matrice di nomi di tag che dovrebbe sempre ottenere il rientro interno", - "emmetPreferencesAllowCompactBoolean": "Se true, viene prodotta una notazione compatta degli attributi booleani" + "emmetPreferencesAllowCompactBoolean": "Se true, viene prodotta una notazione compatta degli attributi booleani", + "emmetPreferencesCssWebkitProperties": "Proprietà CSS delimitate da virgole che ottengono il prefisso del fornitore webkit quando vengono usate in un'abbreviazione Emmet che inizia con `-`. Impostare su una stringa vuota per evitare sempre il prefisso webkit.", + "emmetPreferencesCssMozProperties": "Proprietà CSS delimitate da virgole che ottengono il prefisso del fornitore moz quando vengono usate in un'abbreviazione Emmet che inizia con `-`. Impostare su una stringa vuota per evitare sempre il prefisso moz.", + "emmetPreferencesCssOProperties": "Proprietà CSS delimitate da virgole che ottengono il prefisso del fornitore o quando vengono usate in un'abbreviazione Emmet che inizia con `-`. Impostare su una stringa vuota per evitare sempre il prefisso o.", + "emmetPreferencesCssMsProperties": "Proprietà CSS delimitate da virgole che ottengono il prefisso del fornitore ms quando vengono usate in un'abbreviazione Emmet che inizia con `-`. Impostare su una stringa vuota per evitare sempre il prefisso ms." } \ 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 fc40253cbec..3ce147e64bc 100644 --- a/i18n/ita/extensions/git/out/commands.i18n.json +++ b/i18n/ita/extensions/git/out/commands.i18n.json @@ -28,6 +28,7 @@ "revert": "Annulla modifiche", "discard": "Rimuovi modifiche", "confirm delete": "ELIMINARE {0}?", + "delete file": "Elimina file", "confirm discard": "Rimuovere le modifiche in {0}?", "confirm discard multiple": "Rimuovere le modifiche in {0} file?", "warn untracked": "Verranno ELIMINATI {0} file di cui non viene tenuta traccia.", @@ -61,7 +62,9 @@ "branch already exists": "La branch denominata '{0}' esiste già", "select a branch to merge from": "Selezionare un ramo da cui eseguire il merge", "merge conflicts": "Ci sono conflitti di merge. Risolverli prima di eseguire commit.", + "tag name": "Nome tag", "provide tag name": "Specificare un nome di tag", + "tag message": "Messaggio", "provide tag message": "Specificare un messaggio per aggiungere un'annotazione per il tag", "no remotes to fetch": "Questo repository non ha remote configurati da cui eseguire un fetch.", "no remotes to pull": "Il repository non contiene elementi remoti configurati come origini del pull.", diff --git a/i18n/ita/extensions/git/out/main.i18n.json b/i18n/ita/extensions/git/out/main.i18n.json index d8c93e7a514..528e87d5fde 100644 --- a/i18n/ita/extensions/git/out/main.i18n.json +++ b/i18n/ita/extensions/git/out/main.i18n.json @@ -8,6 +8,7 @@ ], "looking": "Ricerca di git in: {0}", "using git": "Uso di GIT {0} da {1}", + "downloadgit": "Scarica GIT", "neverShowAgain": "Non visualizzare più questo messaggio", "notfound": "Git non trovato. Installarlo o configurarlo utilizzando l'impostazione 'git.path'.", "updateGit": "Aggiorna GIT", diff --git a/i18n/ita/extensions/git/out/repository.i18n.json b/i18n/ita/extensions/git/out/repository.i18n.json index d5f49463711..5e17db881b4 100644 --- a/i18n/ita/extensions/git/out/repository.i18n.json +++ b/i18n/ita/extensions/git/out/repository.i18n.json @@ -9,9 +9,18 @@ "open": "Apri", "index modified": "Indice modificato", "modified": "Modificato", + "index added": "Indice aggiunto", + "index deleted": "Indice eliminato", "deleted": "Eliminato", + "index renamed": "Indice rinominato", + "index copied": "Indice copiato", "untracked": "Non registrato", "ignored": "Ignorato", + "both deleted": "Entrambi eliminati", + "added by us": "Aggiunto da Microsoft", + "deleted by them": "Eliminato dall'utente", + "added by them": "Aggiunto dall'utente", + "deleted by us": "Eliminato da Microsoft", "both added": "Entrambi aggiunti", "both modified": "Entrambi modificati", "commitMessage": "Message (press {0} to commit)", diff --git a/i18n/ita/extensions/git/package.i18n.json b/i18n/ita/extensions/git/package.i18n.json index 487e573a372..7a906a3987e 100644 --- a/i18n/ita/extensions/git/package.i18n.json +++ b/i18n/ita/extensions/git/package.i18n.json @@ -71,6 +71,10 @@ "config.enableCommitSigning": "Abilita la firma del commit con GPG.", "config.discardAllScope": "Controlla quali modifiche vengono rimosse tramite il comando `Rimuovi tutte le modifiche`. Con `all` vengono rimosse tutte le modifiche. Con `tracked` vengono rimossi solo i file di cui viene tenuta traccia. Con `prompt` viene visualizzata una finestra di dialogo ogni volta che si esegue l'azione.", "config.decorations.enabled": "Controlla se Git fornisce colori e distintivi alle visualizzazioni Esplora risorse e Editor aperti.", + "config.promptToSaveFilesBeforeCommit": "Controlla se GIT deve verificare la presenza di file non salvati prima di eseguire il commit.", + "config.showInlineOpenFileAction": "Controlla se visualizzare un'azione Apri file inline nella visualizzazione modifiche GIT.", + "config.inputValidation": "Controlla quando visualizzare la convalida dell'input nel contatore di input.", + "config.detectSubmodules": "Controlla se rilevare automaticamente i moduli secondari GIT.", "colors.modified": "Colore delle risorse modificate.", "colors.deleted": "Colore delle risorse eliminate.", "colors.untracked": "Colore delle risorse non tracciate.", diff --git a/i18n/ita/extensions/markdown/out/commands.i18n.json b/i18n/ita/extensions/markdown/out/commands.i18n.json index eb5c477e4c1..ac76c4524dc 100644 --- a/i18n/ita/extensions/markdown/out/commands.i18n.json +++ b/i18n/ita/extensions/markdown/out/commands.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "previewTitle": "Anteprima {0}", "onPreviewStyleLoadError": "Impossibile caricare 'markdown.styles': {0}" } \ No newline at end of file diff --git a/i18n/ita/extensions/markdown/out/security.i18n.json b/i18n/ita/extensions/markdown/out/security.i18n.json index 3bbe03d07a3..17900416bd6 100644 --- a/i18n/ita/extensions/markdown/out/security.i18n.json +++ b/i18n/ita/extensions/markdown/out/security.i18n.json @@ -15,5 +15,6 @@ "moreInfo.title": "Altre informazioni", "enableSecurityWarning.title": "Abilita anteprima degli avvisi di protezione in questa area di lavoro", "disableSecurityWarning.title": "Disabilita anteprima degli avvisi di protezione in questa area di lavoro", + "toggleSecurityWarning.description": "Non influisce sul livello di sicurezza del contenuto", "preview.showPreviewSecuritySelector.title": "Seleziona impostazioni di protezione per le anteprime Markdown in questa area di lavoro" } \ No newline at end of file diff --git a/i18n/ita/extensions/npm/out/main.i18n.json b/i18n/ita/extensions/npm/out/main.i18n.json index 35229bd6699..c3dbec06958 100644 --- a/i18n/ita/extensions/npm/out/main.i18n.json +++ b/i18n/ita/extensions/npm/out/main.i18n.json @@ -5,5 +5,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." - ] + ], + "npm.parseError": "Rilevamento attività npm: non è stato possibile analizzare il file {0}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/ita/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index 2e0da47978c..300d0ef225b 100644 --- a/i18n/ita/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/ita/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -6,6 +6,13 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "previewOnGitHub": "Anteprima in GitHub", + "similarIssues": "Problemi simili", "noResults": "Non sono stati trovati risultati", - "description": "Descrizione" + "rateLimited": "Superato il limite di frequenza API", + "stepsToReproduce": "Passi da riprodurre", + "bugDescription": "Come è stato riscontrato il problema? Quali passaggi è necessario eseguire per riprodurre il problema in modo affidabile? Che cosa doveva accadere e cosa è invece effettivamente accaduto?", + "performanceIssueDesciption": "Quando si è verificato questo problema di prestazioni? Si è ad esempio verificato all'avvio o dopo una serie specifica di azioni? Qualsiasi dettaglio fornito può essere utile ai fini dell'analisi del problema.", + "description": "Descrizione", + "disabledExtensions": "Le estensioni sono disabilitate" } \ No newline at end of file diff --git a/i18n/ita/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/ita/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 35229bd6699..473368cf559 100644 --- a/i18n/ita/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/ita/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -5,5 +5,25 @@ "Licensed under the MIT License. See License.txt in the project root for license information.", "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." - ] + ], + "completeInEnglish": "Completare il modulo in lingua inglese.", + "issueTypeLabel": "Tipo di segnalazione", + "bugReporter": "Segnalazione di bug", + "performanceIssue": "Problema di prestazioni", + "featureRequest": "Richiesta di funzionalità", + "issueTitleLabel": "Titolo", + "issueTitleRequired": "Immettere un titolo.", + "vscodeVersion": "Versione di VS Code", + "osVersion": "Versione del sistema operativo", + "systemInfo": "Informazioni sul sistema in uso", + "sendData": "Invia i dati", + "processes": "Processi attualmente in esecuzione", + "workspaceStats": "Statistiche area di lavoro personale", + "extensions": "Estensioni personali", + "tryDisablingExtensions": "Il problema è riproducibile quando le estensioni sono disabilitate", + "disableExtensions": "disabilitando tutte le estensioni e ricaricando la finestra", + "showRunningExtensions": "visualizzare tutte le estensioni in esecuzione", + "githubMarkdown": "È supportato il linguaggio Markdown per GitHub. Sarà possibile modificare il problema e aggiungere screenshot quando verrà visualizzato in anteprima in GitHub.", + "issueDescriptionRequired": "Immettere una descrizione.", + "loadingData": "Caricamento dei dati..." } \ No newline at end of file diff --git a/i18n/ita/src/vs/code/electron-main/logUploader.i18n.json b/i18n/ita/src/vs/code/electron-main/logUploader.i18n.json index 35229bd6699..0b72a4d2fb9 100644 --- a/i18n/ita/src/vs/code/electron-main/logUploader.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/logUploader.i18n.json @@ -5,5 +5,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." - ] + ], + "invalidEndpoint": "Endpoint dell'uploader di log non valido", + "beginUploading": "Caricamento...", + "didUploadLogs": "Caricamento riuscito. ID file di log: {0}", + "userDeniedUpload": "Caricamento annullato", + "logUploadPromptHeader": "Caricare i log di sessione per proteggere l'endpoint?", + "logUploadPromptBody": "È possibile esaminare i file di log qui: '{0}'", + "logUploadPromptBodyDetails": "I log possono contenere informazioni personali, come percorsi completi e contenuto di file.", + "logUploadPromptKey": "I log sono stati esaminati (immettere 's' per confermare l'upload)", + "postError": "Si è verificato un errore durante l'invio dei log: {0}", + "responseError": "Si è verificato un errore durante l'invio dei log. È stato ottenuto {0} - {1}", + "parseError": "Si è verificato un errore durante l'analisi della risposta", + "zipError": "Si è verificato un errore durante la compressione dei log: {0}" } \ 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 06696549d5d..b0d0998bd4d 100644 --- a/i18n/ita/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/menus.i18n.json @@ -90,6 +90,7 @@ "miMarker": "&&Problemi", "miAdditionalViews": "&&Visualizzazioni aggiuntive", "miCommandPalette": "&&Riquadro comandi...", + "miOpenView": "&&Apri visualizzazione...", "miToggleFullScreen": "Attiva/Disattiva sc&&hermo intero", "miToggleZenMode": "Attiva/Disattiva modalità Zen", "miToggleMenuBar": "Attiva/Disattiva &&barra dei menu", @@ -184,6 +185,7 @@ "miCheckingForUpdates": "Verifica della disponibilità di aggiornamenti...", "miDownloadUpdate": "Scarica l'aggiornamento disponibile", "miDownloadingUpdate": "Download dell'aggiornamento...", + "miInstallUpdate": "Installa aggiornamento...", "miInstallingUpdate": "Installazione dell'aggiornamento...", "miRestartToUpdate": "Riavvia per aggiornare...", "aboutDetail": "Versione {0}\nCommit {1}\nData {2}\nShell {3}\nRenderer {4}\nNodo {5}\nArchitettura {6}", 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 c10a03cda1b..e88f3f97e71 100644 --- a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -66,6 +66,10 @@ "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.", "wordBasedSuggestions": "Controlla se calcolare i completamenti in base alle parole presenti nel documento.", + "suggestSelection.first": "Consente di selezionare sempre il primo suggerimento.", + "suggestSelection.recentlyUsed": "Consente di selezionare suggerimenti recenti a meno che continuando a digitare non ne venga selezionato uno, ad esempio `console.| -> console.log` perché `log` è stato completato di recente.", + "suggestSelection.recentlyUsedByPrefix": "Consente di selezionare i suggerimenti in base a prefissi precedenti che hanno completato tali suggerimenti, ad esempio `co -> console` e `con -> const`.", + "suggestSelection": "Controlla la modalità di preselezione dei suggerimenti durante la visualizzazione degll'elenco dei suggerimenti.", "suggestFontSize": "Dimensioni del carattere per il widget dei suggerimenti", "suggestLineHeight": "Altezza della riga per il widget dei suggerimenti", "selectionHighlight": "Controlla se l'editor deve evidenziare gli elementi corrispondenti simili alla selezione", diff --git a/i18n/ita/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/ita/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json index fdbfe573f79..850895f114f 100644 --- a/i18n/ita/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -6,6 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "overviewRulerBracketMatchForeground": "Colore del marcatore del righello delle annotazioni per la corrispondenza delle parentesi.", "smartSelect.jumpBracket": "Vai alla parentesi", "smartSelect.selectToBracket": "Seleziona fino alla parentesi" } \ No newline at end of file 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 ea39baecdc9..b8a56734d34 100644 --- a/i18n/ita/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/ita/src/vs/platform/environment/node/argv.i18n.json @@ -14,6 +14,7 @@ "reuseWindow": "Forza l'apertura di un file o di una cartella nell'ultima finestra attiva.", "wait": "Attendere la chiusura dei file prima della restituzione.", "locale": "Impostazioni locali da usare, ad esempio en-US o it-IT.", + "userDataDir": "Consente di specificare la directory in cui si trovano i dati utente. Può essere usata per aprire più istanze diverse di Code.", "version": "Visualizza la versione.", "help": "Visualizza la sintassi.", "extensionHomePath": "Impostare il percorso radice per le estensioni.", diff --git a/i18n/ita/src/vs/platform/list/browser/listService.i18n.json b/i18n/ita/src/vs/platform/list/browser/listService.i18n.json index b1080ce0418..adf48cd06e8 100644 --- a/i18n/ita/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/ita/src/vs/platform/list/browser/listService.i18n.json @@ -9,6 +9,8 @@ "workbenchConfigurationTitle": "Area di lavoro", "multiSelectModifier.ctrlCmd": "Rappresenta il tasto 'Control' (ctrl) su Windows e Linux e il tasto 'Comando' (cmd) su OSX.", "multiSelectModifier.alt": "Rappresenta il tasto 'Alt' su Windows e Linux e il tasto 'Opzione' su OSX.", + "multiSelectModifier": "Modificatore da usare per aggiungere un elemento in alberi ed elenchi a una selezione multipla con il mouse (ad esempio editor aperti e visualizzazione Gestione controllo servizi in Esplora risorse). 'ctrlCmd' rappresenta il tasto 'CTRL' in Windows e Linux e il tasto 'Cmd' in OSX. I gesti del mouse Apri lateralmente, se supportati, si adatteranno in modo da non entrare in conflitto con il modificatore di selezione multipla.", "openMode.singleClick": "Apre elementi facendo un singolo clic col mouse.", - "openMode.doubleClick": "Apre elementi facendo doppio clic col mouse." + "openMode.doubleClick": "Apre elementi facendo doppio clic col mouse.", + "openModeModifier": "Controlla la modalità di apertura degli elementi in alberi ed elenchi con il mouse, se supportata. Impostare su `singleClick` per aprire gli elementi con un unico clic del mouse e `doubleClick` per aprirli solo se viene fatto doppio clic. Per gli elementi padre con elementi figlio negli alberi, questa impostazione controllerà se per espandere l'elemento padre è necessario fare clic una sola volta o fare doppio clic. Tenere presente che alcuni alberi ed elenchi potrebbero scegliere di ignorare questa impostazione se non è applicabile. " } \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/localizations/common/localizations.i18n.json b/i18n/ita/src/vs/platform/localizations/common/localizations.i18n.json index f270a8d2f86..9a74ccf77b6 100644 --- a/i18n/ita/src/vs/platform/localizations/common/localizations.i18n.json +++ b/i18n/ita/src/vs/platform/localizations/common/localizations.i18n.json @@ -10,5 +10,8 @@ "vscode.extension.contributes.localizations.languageId": "Id della lingua in cui sono tradotte le stringhe visualizzate.", "vscode.extension.contributes.localizations.languageName": "Nome della lingua in inglese.", "vscode.extension.contributes.localizations.languageNameLocalized": "Nome della lingua nella lingua stessa.", - "vscode.extension.contributes.localizations.translations": "Lista delle traduzioni associate alla lingua." + "vscode.extension.contributes.localizations.translations": "Lista delle traduzioni associate alla lingua.", + "vscode.extension.contributes.localizations.translations.id": "ID di VS Code o dell'estensione cui si riferisce questa traduzione. L'ID di VS Code è sempre 'vscode' e quello di un'estensione deve essere nel formato 'publisherId.extensionName'.", + "vscode.extension.contributes.localizations.translations.id.pattern": "L'ID deve essere 'vscode' o essere nel formato 'publisherId.extensionName' per tradurre rispettivamente VS Code o un'estensione.", + "vscode.extension.contributes.localizations.translations.path": "Percorso relativo di un file che contiene le traduzioni per la lingua." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json index 35229bd6699..db4d9b00284 100644 --- a/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json +++ b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "folderStatusMessageAddSingleFolder": "L'estensione '{0}' ha aggiunto 1 cartella all'area di lavoro", + "folderStatusMessageAddMultipleFolders": "L'estensione '{0}' ha aggiunto {1} cartelle all'area di lavoro", + "folderStatusMessageRemoveSingleFolder": "L'estensione '{0}' ha rimosso 1 cartella dall'area di lavoro", + "folderStatusMessageRemoveMultipleFolders": "L'estensione '{0}' ha rimosso {1} cartelle dall'area di lavoro", + "folderStatusChangeFolder": "L'estensione '{0}' ha cambiato le cartelle dell'area di lavoro" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostWorkspace.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostWorkspace.i18n.json index 35229bd6699..091a55ded09 100644 --- a/i18n/ita/src/vs/workbench/api/node/extHostWorkspace.i18n.json +++ b/i18n/ita/src/vs/workbench/api/node/extHostWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "updateerror": "L'estensione '{0}' non è riuscita ad aggiornare le cartelle dell'area di lavoro: {1}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index 8299e019741..46399326736 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,7 +11,9 @@ "sizeMB": "{0} MB", "sizeGB": "{0} GB", "sizeTB": "{0} TB", + "largeImageError": "Le dimensioni del file dell'immagine sono eccessive (maggiori di 1 MB) per la visualizzazione nell'editor. ", "resourceOpenExternalButton": "Aprire l'immagine utilizzando un programma esterno?", "nativeBinaryError": "Il file non verrà visualizzato nell'editor perché è binario, è molto grande o usa una codifica testo non supportata.", + "zoom.action.fit.label": "Immagine intera", "imgMeta": "{0}x{1} {2}" } \ 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 b0bde6ad0f4..9cdd21146a8 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 @@ -35,9 +35,11 @@ "panelDefaultLocation": "Controlla la posizione predefinita del pannello. Può essere mostrato nella parte inferiore o a destra del banco di lavoro.", "statusBarVisibility": "Controlla la visibilità della barra di stato nella parte inferiore del workbench.", "activityBarVisibility": "Controlla la visibilità della barra attività nel workbench.", + "fontAliasing": "Controlla il metodo di aliasing dei caratteri nell'area di lavoro.\n- default: anti-aliasing dei caratteri a livello di sub-pixel. Nella maggior parte delle visualizzazioni non retina consentirà di ottenere un testo con il massimo contrasto.\n- antialiased: anti-aliasing dei caratteri a livello di pixel, invece che a livello di sub-pixel. Consente di visualizzare i caratteri più chiari.\n- none: disabilita l'anti-aliasing dei caratteri. Il testo verrà visualizzato con contorni irregolari.\n- auto: applica automaticamente `default` o `antialiased` in base al valore DPI degli schermi.", "workbench.fontAliasing.default": "Anti-aliasing dei caratteri a livello di sub-pixel. Nella maggior parte delle visualizzazioni non retina consentirà di ottenere un testo con il massimo contrasto.", "workbench.fontAliasing.antialiased": "Anti-aliasing dei caratteri a livello di pixel, invece che a livello di sub-pixel. Consente di visualizzare i caratteri più chiari.", "workbench.fontAliasing.none": "Disabilita l'anti-aliasing dei caratteri. Il testo verrà visualizzato con contorni irregolari. ", + "workbench.fontAliasing.auto": "Applica automaticamente `default` o `antialiased` in base al valore DPI degli schermi.", "enableNaturalLanguageSettingsSearch": "Controlla se abilitare la modalità di ricerca in linguaggio naturale per le impostazioni.", "windowConfigurationTitle": "Finestra", "window.openFilesInNewWindow.on": "I file verranno aperti in una nuova finestra", diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index 3b76ad0d268..74e055397e3 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -32,8 +32,12 @@ "app.launch.json.configurations": "Elenco delle configurazioni. Aggiungere nuove configurazioni o modificare quelle esistenti con IntelliSense.", "app.launch.json.compounds": "Elenco degli elementi compounds. Ogni elemento compounds fa riferimento a più configurazioni che verranno avviate insieme.", "app.launch.json.compound.name": "Nome dell'elemento compounds. Viene visualizzato nel menu a discesa della configurazione di avvio.", + "useUniqueNames": "Usare nomi di configurazione univoci.", + "app.launch.json.compound.folder": "Nome della cartella in cui si trova l'elemento compounds.", "app.launch.json.compounds.configurations": "Nomi delle configurazioni che verranno avviate per questo elemento compounds.", "debugNoType": "L'adattatore di debug 'type' non può essere omesso e deve essere di tipo 'string'.", "selectDebug": "Seleziona ambiente", - "DebugConfig.failed": "Non è possibile creare il file 'launch.json' all'interno della cartella '.vscode' ({0})." + "DebugConfig.failed": "Non è possibile creare il file 'launch.json' all'interno della cartella '.vscode' ({0}).", + "workspace": "area di lavoro", + "user settings": "impostazioni utente" } \ 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 4ac06a68557..10217b0f8d5 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 @@ -13,6 +13,9 @@ "breakpointAdded": "Aggiunto un punto di interruzione a riga {0} del file {1}", "breakpointRemoved": "Rimosso un punto di interruzione a riga {0} del file {1}", "compoundMustHaveConfigurations": "Per avviare più configurazioni, deve essere impostato l'attributo \"configurations\" dell'elemento compounds.", + "noConfigurationNameInWorkspace": "Non è stato possibile trovare la configurazione di avvio '{0}' nell'area di lavoro.", + "multipleConfigurationNamesInWorkspace": "Nell'area di lavoro sono presenti più configurazioni di avvio `{0}`. Usare il nome di cartella per qualificare la configurazione.", + "noFolderWithName": "La cartella denominata '{0}' per la configurazione '{1}' nell'elemento compounds '{2}' non è stata trovata.", "configMissing": "In 'launch.json' manca la configurazione '{0}'.", "launchJsonDoesNotExist": "'launch.json' non esiste.", "debugRequestNotSupported": "Nella configurazione di debug scelta l'attributo '{0}' ha un valore non supportato '{1}'.", @@ -23,6 +26,7 @@ "preLaunchTaskError": "È stato rilevato un errore di compilazione durante preLaunchTask '{0}'.", "preLaunchTaskExitCode": "L'attività di preavvio '{0}' è stata terminata ed è stato restituito il codice di uscita {1}.", "debugAnyway": "Eseguire comunque il debug", + "showErrors": "Mostra errori", "cancel": "Annulla", "noFolderWorkspaceDebugError": "Non è possibile eseguire il debug del file attivo. Assicurarsi che sia salvato su disco e che sia installata un'estensione di debug per tale tipo di file.", "DebugTaskNotFound": "L'attività di preavvio '{0}' non è stata trovata.", 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 e61c448033e..68f5fd42101 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 @@ -33,6 +33,10 @@ "view id": "ID", "view name": "Nome", "view location": "Dove", + "localizations": "Localizzazioni ({0})", + "localizations language id": "ID lingua", + "localizations language name": "Nome lingua", + "localizations localized language name": "Nome lingua (localizzato)", "colorThemes": "Temi colore ({0})", "iconThemes": "Temi icona ({0})", "colors": "Colori ({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 7d8a73398d0..491595ed9b7 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 @@ -52,6 +52,8 @@ "configureWorkspaceRecommendedExtensions": "Configura estensioni consigliate (area di lavoro)", "configureWorkspaceFolderRecommendedExtensions": "Configura estensioni consigliate (cartella dell'area di lavoro)", "builtin": "Predefinita", + "malicious tooltip": "Questa estensione è stata segnalata come problematica.", + "malicious": "Dannosa", "disableAll": "Disabilita tutte le estensioni installate", "disableAllWorkspace": "Disabilita tutte le estensioni installate per questa area di lavoro", "enableAll": "Abilita tutte le estensioni installate", diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 7e508ea22ca..4a4b638db58 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "noPro": "Per profilare le estensioni, avviare con `--inspect-extensions=<port>`.", "selectAndStartDebug": "Fare clic per arrestare la profilatura." } \ 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 b4e8d6c6042..92bf689efe7 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 @@ -11,6 +11,7 @@ "workspaceRecommendation": "Questa estensione è consigliata dagli utenti dell'area di lavoro corrente.", "fileBasedRecommendation": "Questa estensione è raccomandata in base ai file aperti di recente.", "exeBasedRecommendation": "Questa estensione è consigliata perché avete installato {0}.", + "dynamicWorkspaceRecommendation": "Questa estensione potrebbe essere interessante perché viene usata da molti altri utenti dell'area di lavoro corrente.", "reallyRecommended2": "Per questo tipo di file è consigliabile utilizzare l'estensione '{0}'.", "reallyRecommendedExtensionPack": "Per questo tipo di file è consigliabile usare il pacchetto di estensione '{0}'.", "showRecommendations": "Mostra gli elementi consigliati", diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 8653c7d9177..d9192794c71 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -19,5 +19,6 @@ "suggestProxyError": "Marketplace ha restituito 'ECONNREFUSED'. Controllare l'impostazione 'http.proxy'.", "extensions": "Estensioni", "outdatedExtensions": "{0} estensioni obsolete", + "malicious warning": "L'estensione '{0}' è stata disinstallata perché è stata segnalata come problematica.", "reloadNow": "Ricarica ora" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index 44ef61d873d..184ccf3b77b 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -7,6 +7,8 @@ "Do not edit this file. It is machine generated." ], "installingVSIXExtension": "Installazione estensione da VSIX in corso...", + "malicious": "Questa estensione è segnalata come problematica.", + "installingMarketPlaceExtension": "Installazione dell'estensione dal Marketplace...", "uninstallingExtension": "Disinstallazione estensione in corso...", "enableDependeciesConfirmation": "Se si abilita '{0}', verranno abilitate anche le relative dipendenze. Continuare?", "enable": "Sì", diff --git a/i18n/ita/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/ita/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index 92d8091e39a..935324eac99 100644 --- a/i18n/ita/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -8,10 +8,12 @@ ], "openLogsFolder": "Apri cartella dei log", "showLogs": "Mostra log...", + "rendererProcess": "Finestra ({0})", "emptyWindow": "Finestra", "extensionHost": "Host dell'estensione", "sharedProcess": "Condiviso", "mainProcess": "Principale", + "selectProcess": "Seleziona log per il processo", "openLogFile": "Apri file di Log...", "setLogLevel": "Imposta livello log", "trace": "Analisi", @@ -22,5 +24,7 @@ "critical": "Errori critici", "off": "Disattivato", "selectLogLevel": "Seleziona il livello log", - "default": "Impostazione predefinita" + "default and current": "Predefinito e corrente", + "default": "Impostazione predefinita", + "current": "Corrente" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 8a1184b8387..70c85a67806 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -17,6 +17,7 @@ "addLabel": "Aggiungi tasto di scelta rapida", "removeLabel": "Rimuovi tasto di scelta rapida", "resetLabel": "Reimposta tasto di scelta rapida", + "showSameKeybindings": "Mostra gli stessi tasti di scelta rapida", "copyLabel": "Copia", "copyCommandLabel": "Copia comando", "error": "Errore '{0}' durante la modifica del tasto di scelta rapida. Si prega di aprire il file 'keybindings.json' e verificare.", diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index e2ecce4b00b..01dd3d9cc62 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -10,6 +10,8 @@ "SearchSettingsWidget.AriaLabel": "Cerca impostazioni", "SearchSettingsWidget.Placeholder": "Cerca impostazioni", "noSettingsFound": "Nessun risultato", + "oneSettingFound": "1 impostazione trovata", + "settingsFound": "{0} impostazioni trovate", "totalSettingsMessage": "{0} impostazioni in totale", "nlpResult": "Risultati linguaggio naturale", "filterResult": "Risultati filtrati", 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 e0e24a895d4..801e215b679 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 @@ -9,6 +9,7 @@ "emptyUserSettingsHeader": "Inserire le impostazioni qui per sovrascrivere quelle predefinite.", "emptyWorkspaceSettingsHeader": "Inserire le impostazioni qui per sovrascrivere le impostazioni utente.", "emptyFolderSettingsHeader": "Inserire le impostazioni cartella qui per sovrascrivere quelle dell'area di lavoro.", + "newExtensionLabel": "Mostra l'estensione \"{0}\"", "editTtile": "Modifica", "replaceDefaultValue": "Sostituisci nelle impostazioni", "copyDefaultValue": "Copia nelle impostazioni", diff --git a/i18n/ita/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/ita/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 7fbd72c66d7..d4755072966 100644 --- a/i18n/ita/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -18,6 +18,7 @@ "RefreshAction.label": "Aggiorna", "CollapseDeepestExpandedLevelAction.label": "Comprimi tutto", "ClearSearchResultsAction.label": "Cancella", + "CancelSearchAction.label": "Annulla ricerca", "FocusNextSearchResult.label": "Sposta lo stato attivo sul risultato della ricerca successivo", "FocusPreviousSearchResult.label": "Sposta lo stato attivo sul risultato della ricerca precedente", "RemoveAction.label": "Chiudi", diff --git a/i18n/ita/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index dbdffad9fb9..1b1409ec716 100644 --- a/i18n/ita/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -24,5 +24,6 @@ "useIgnoreFiles": "Controlla se utilizzare i file .gitignore e .ignore durante la ricerca di file", "search.quickOpen.includeSymbols": "Configurare questa opzione per includere i risultati di una ricerca di simboli globale nei risultati dei file per Quick Open.", "search.followSymlinks": "Controlla se seguire i collegamenti simbolici durante la ricerca.", - "search.smartCase": "Cerca in modo insensibile alle maiuscole/minuscole se il criterio è tutto minuscolo, altrimenti cerca in modalità sensibile a maiuscole/minuscole" + "search.smartCase": "Cerca in modo insensibile alle maiuscole/minuscole se il criterio è tutto minuscolo, altrimenti cerca in modalità sensibile a maiuscole/minuscole", + "search.globalFindClipboard": "Controlla se il viewlet di ricerca deve leggere o modificare gli appunti di ricerca condivisi in macOS" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index 6079c69b94d..0c9e86e93b1 100644 --- a/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "Frammento utente globale", "source.snippet": "Frammento utente" } \ 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 825ff7f9a4e..8d36733b39a 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 @@ -21,6 +21,10 @@ "JsonSchema.tasks.terminal": "La proprietà terminal è deprecata. In alternativa, usare presentation.", "JsonSchema.tasks.group.kind": "Gruppo di esecuzione dell'attività.", "JsonSchema.tasks.group.isDefault": "Definisce se questa attività è l'attività predefinita nel gruppo.", + "JsonSchema.tasks.group.defaultBuild": "Contrassegna l'attività come attività di compilazione predefinita.", + "JsonSchema.tasks.group.defaultTest": "Contrassegna l'attività come attività di test predefinita.", + "JsonSchema.tasks.group.build": "Contrassegna l'attività come attività di compilazione accessibile tramite il comando 'Esegui attività di compilazione'.", + "JsonSchema.tasks.group.test": "Contrassegna l'attività come attività di test accessibile tramite il comando 'Esegui attività di test'.", "JsonSchema.tasks.group.none": "Non assegna l'attività ad alcun gruppo", "JsonSchema.tasks.group": "Definisce il gruppo di esecuzione a cui appartiene questa attività. Supporta \"build\" per aggiungerlo al gruppo di compilazione e \"test\" per aggiungerlo al gruppo di test.", "JsonSchema.tasks.type": "Definisce se l'attività viene eseguita come un processo o come un comando all'interno di una shell.", diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index eaed493cc30..756d5334a1a 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -21,12 +21,15 @@ "terminal.integrated.fontFamily": "Controlla la famiglia di caratteri del terminale. L'impostazione predefinita è il valore di editor.fontFamily.", "terminal.integrated.fontSize": "Consente di controllare le dimensioni del carattere in pixel del terminale.", "terminal.integrated.lineHeight": "Controlla l'altezza della riga del terminale. Questo numero è moltiplicato per la dimensione del carattere del terminale per ottenere l'effettiva altezza della riga in pixel.", + "terminal.integrated.fontWeight": "Spessore del carattere da usare nel terminale per il testo non in grassetto.", + "terminal.integrated.fontWeightBold": "Spessore del carattere da usare nel terminale per il testo in grassetto.", "terminal.integrated.cursorBlinking": "Controlla se il cursore del terminale è intermittente o meno.", "terminal.integrated.cursorStyle": "Controlla lo stile del cursore del terminale.", "terminal.integrated.scrollback": "Consente di controllare il numero massimo di righe che il terminale mantiene nel buffer.", "terminal.integrated.setLocaleVariables": "Controlla se le variabili delle impostazioni locali sono impostate all'avvio del terminale. Il valore predefinito è true per OS X e false per altre piattaforme.", "terminal.integrated.cwd": "Percorso di avvio esplicito in cui verrà avviato il terminale. Viene usato come directory di lavoro corrente per il processo della shell. Può risultare particolarmente utile nelle impostazioni dell'area di lavoro se la directory radice non costituisce una directory di lavoro corrente comoda.", "terminal.integrated.confirmOnExit": "Indica se confermare all'uscita la presenza di sessioni di terminale attive.", + "terminal.integrated.enableBell": "Indica se il cicalino del terminale è abilitato o meno.", "terminal.integrated.commandsToSkipShell": "Set di ID comando i cui tasti di scelta rapida non verranno inviati alla shell e verranno sempre gestiti da Code. In tal modo i tasti di scelta rapida normalmente utilizzati dalla shell avranno lo stesso effetto di quando il terminale non ha lo stato attivo, ad esempio CTRL+P per avviare Quick Open.", "terminal.integrated.env.osx": "Oggetto con variabili di ambiente che verrà aggiunto al processo VS Code per essere utilizzato dal terminale su OS X", "terminal.integrated.env.linux": "Oggetto con variabili di ambiente che verrà aggiunto al processo VS Code per essere utilizzato dal terminale su Linux", 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 e5b98e781d8..90437802e65 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 @@ -6,6 +6,9 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "terminal.integrated.a11yBlankLine": "Riga vuota", + "terminal.integrated.a11yPromptLabel": "Input di terminale", + "terminal.integrated.a11yTooMuchOutput": "L'output è eccessivo per l'annuncio. Passare manualmente alle righe per leggere", "terminal.integrated.copySelection.noSelection": "Il terminale non contiene alcuna selezione da copiare", "terminal.integrated.exitedWithCode": "Il processo del terminale è stato terminato. Codice di uscita: {0}", "terminal.integrated.waitOnExit": "Premere un tasto qualsiasi per chiudere il terminale", diff --git a/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json index 173fc2e3ff5..aacca351fde 100644 --- a/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -8,5 +8,6 @@ ], "release notes": "Note sulla versione", "updateConfigurationTitle": "Aggiorna", - "updateChannel": "Consente di configurare la ricezione degli aggiornamenti automatici da un canale di aggiornamento. Richiede un riavvio dopo la modifica." + "updateChannel": "Consente di configurare la ricezione degli aggiornamenti automatici da un canale di aggiornamento. Richiede un riavvio dopo la modifica.", + "enableWindowsBackgroundUpdates": "Abilita gli aggiornamenti di Windows in background." } \ No newline at end of file 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 2792473dc0b..6a31425dab2 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 @@ -20,6 +20,9 @@ "noUpdatesAvailable": "Al momento non sono disponibili aggiornamenti.", "download now": "Scarica ora", "thereIsUpdateAvailable": "È disponibile un aggiornamento.", + "installUpdate": "Installa aggiornamento", + "updateAvailable": "È disponibile un aggiornamento: {0} {1}", + "updateInstalling": "{0} {1} verrà installato in background. Al termine, verrà visualizzato un messaggio.", "updateNow": "Aggiorna adesso", "updateAvailableAfterRestart": "{0} verrà aggiornato dopo il riavvio.", "commandPalette": "Riquadro comandi...", @@ -31,6 +34,7 @@ "checkForUpdates": "Verifica disponibilità aggiornamenti...", "checkingForUpdates": "Verifica della disponibilità di aggiornamenti...", "DownloadingUpdate": "Download dell'aggiornamento...", + "installUpdate...": "Installa aggiornamento...", "installingUpdate": "Installazione dell'aggiornamento...", "restartToUpdate": "Riavvia per aggiornare..." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/ita/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index c1e824ddedc..34686a60cf9 100644 --- a/i18n/ita/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/ita/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -21,6 +21,7 @@ "workspaceConfig.name.description": "Nome facoltativo per la cartella. ", "workspaceConfig.uri.description": "URI della cartella", "workspaceConfig.settings.description": "Impostazioni area di lavoro", + "workspaceConfig.launch.description": "Configurazioni di avvio dell'area di lavoro", "workspaceConfig.extensions.description": "Estensioni dell'area di lavoro", "unknownWorkspaceProperty": "La proprietà di configurazione dell'area di lavoro è sconosciuta" } \ No newline at end of file diff --git a/i18n/jpn/extensions/emmet/package.i18n.json b/i18n/jpn/extensions/emmet/package.i18n.json index 2a3b7fbff60..717d87371fb 100644 --- a/i18n/jpn/extensions/emmet/package.i18n.json +++ b/i18n/jpn/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "コメント フィルターに適用される略語に存在する属性名のカンマ区切りのリスト", "emmetPreferencesFormatNoIndentTags": "内部インデントを取得しないタグ名の配列", "emmetPreferencesFormatForceIndentTags": "内部インデントを常に取得するタグ名の配列", - "emmetPreferencesAllowCompactBoolean": "true の場合、 Boolean 型属性の短縮表記が生成されます" + "emmetPreferencesAllowCompactBoolean": "true の場合、 Boolean 型属性の短縮表記が生成されます", + "emmetPreferencesCssWebkitProperties": "emmet 省略記法で使用される場合に `-` で始まる webkit ベンダー プレフィックスを取得するカンマ区切りの CSS プロパティ。常に webkit プレフィックスを避ける場合は空の文字列に設定します。", + "emmetPreferencesCssMozProperties": "emmet 省略記法で使用される場合に `-` で始まる moz ベンダー プレフィックスを取得するカンマ区切りの CSS プロパティ。常に moz プレフィックスを避ける場合は空の文字列に設定します。", + "emmetPreferencesCssOProperties": "emmet 省略記法で使用される場合に `-` で始まる o ベンダー プレフィックスを取得するカンマ区切りの CSS プロパティ。常に o プレフィックスを避ける場合は空の文字列に設定します。", + "emmetPreferencesCssMsProperties": "emmet 省略記法で使用される場合に `-` で始まる ms ベンダー プレフィックスを取得するカンマ区切りの CSS プロパティ。常に ms プレフィックスを避ける場合は空の文字列に設定します。" } \ 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 b764f7a053a..8b6874c3974 100644 --- a/i18n/jpn/extensions/git/out/commands.i18n.json +++ b/i18n/jpn/extensions/git/out/commands.i18n.json @@ -62,6 +62,9 @@ "branch already exists": "ブランチ名 '{0}' は既に存在します", "select a branch to merge from": "マージ元のブランチを選択", "merge conflicts": "マージの競合があります。コミットする前にこれを解決してください。", + "tag name": "タグ名", + "provide tag name": "タグ名を入力してください", + "tag message": "メッセージ", "provide tag message": "注釈付きタグにつけるメッセージを入力してください", "no remotes to fetch": "リポジトリには、フェッチ元として構成されているリモートがありません。", "no remotes to pull": "リポジトリには、プル元として構成されているリモートがありません。", diff --git a/i18n/jpn/extensions/git/out/main.i18n.json b/i18n/jpn/extensions/git/out/main.i18n.json index d94864fc45a..0fab781f4ca 100644 --- a/i18n/jpn/extensions/git/out/main.i18n.json +++ b/i18n/jpn/extensions/git/out/main.i18n.json @@ -6,6 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "looking": "Git を求めて次の場所を探しています: {0}", "using git": "{1} から Git {0} を使用しています", "downloadgit": "Git のダウンロード", "neverShowAgain": "今後は表示しない", diff --git a/i18n/jpn/extensions/git/out/repository.i18n.json b/i18n/jpn/extensions/git/out/repository.i18n.json index fe638b7b050..9ed02afc01c 100644 --- a/i18n/jpn/extensions/git/out/repository.i18n.json +++ b/i18n/jpn/extensions/git/out/repository.i18n.json @@ -7,8 +7,10 @@ "Do not edit this file. It is machine generated." ], "open": "開く", + "index modified": "変更されたインデックス", "modified": "変更済み", "index added": "インデックスの追加", + "index deleted": "削除されたインデックス", "deleted": "削除済み", "index renamed": "インデックスの名前変更", "index copied": "インデックスをコピー", diff --git a/i18n/jpn/extensions/git/package.i18n.json b/i18n/jpn/extensions/git/package.i18n.json index 32ac162d5ba..506073ca6e3 100644 --- a/i18n/jpn/extensions/git/package.i18n.json +++ b/i18n/jpn/extensions/git/package.i18n.json @@ -73,6 +73,8 @@ "config.decorations.enabled": "Git が配色とバッジをエクスプローラーと開いているエディターのビューに提供するかどうかを制御します。", "config.promptToSaveFilesBeforeCommit": "コミット前に Git が保存していないファイルを確認すべきかどうかを制御します。", "config.showInlineOpenFileAction": "Git 変更の表示内にインラインのファイルを開くアクションを表示するかどうかを制御します。", + "config.inputValidation": "入力検証の入力カウンターを表示するタイミングを制御します。", + "config.detectSubmodules": "Git のサブモジュールを自動的に検出するかどうかを制御します。", "colors.modified": "リソースを改変した場合の配色", "colors.deleted": "リソースを検出した場合の配色", "colors.untracked": "リソースを追跡しない場合の配色", diff --git a/i18n/jpn/extensions/markdown/out/security.i18n.json b/i18n/jpn/extensions/markdown/out/security.i18n.json index 9c71e76f1d2..fd9bf5f6a30 100644 --- a/i18n/jpn/extensions/markdown/out/security.i18n.json +++ b/i18n/jpn/extensions/markdown/out/security.i18n.json @@ -15,5 +15,6 @@ "moreInfo.title": "詳細情報", "enableSecurityWarning.title": "このワークスペースでプレビューのセキュリティ警告を有効にする", "disableSecurityWarning.title": "このワークスペースでプレビューのセキュリティ警告を有効にする", + "toggleSecurityWarning.description": "コンテンツのセキュリティ レベルには影響しません", "preview.showPreviewSecuritySelector.title": "ワークスペースのマークダウン プレビューに関するセキュリティ設定を選択 " } \ No newline at end of file diff --git a/i18n/jpn/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/jpn/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index f174b2a04e1..add172ddedb 100644 --- a/i18n/jpn/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/jpn/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -9,6 +9,7 @@ "previewOnGitHub": "GitHub 上でプレビュー", "similarIssues": "類似の問題", "noResults": "一致する項目はありません", + "rateLimited": "API のレート制限を超えました", "stepsToReproduce": "再現手順", "bugDescription": "どのようにこの問題に遭遇しましたか?問題を確実に再現するためには、どのような手順を踏む必要がありますか?何が起きることを期待し、何が実際に発生しましたか?", "performanceIssueDesciption": "このパフォーマンスの問題はいつ発生しましたか?たとえば、それは起動時ですか?それとも特定のアクションのあとですか?詳細な情報が私たちの調査に役立ちます。", diff --git a/i18n/jpn/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/jpn/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 2354d28c590..d7ff3a96e4e 100644 --- a/i18n/jpn/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/jpn/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -20,6 +20,8 @@ "processes": "現在実行中のプロセス", "workspaceStats": "私のワークスペースのステータス", "extensions": "私の拡張機能", + "tryDisablingExtensions": "拡張機能が無効になっている場合、問題を再現できません", + "disableExtensions": "すべての拡張機能を無効にしてウィンドウを再読みする", "showRunningExtensions": "すべての実行中の拡張機能を確認する", "githubMarkdown": "GitHub-flavored Markdown に対応しています。GitHub 上で確認するときに問題を編集してスクリーンショットを追加できます。", "issueDescriptionRequired": "説明を入力してください。", diff --git a/i18n/jpn/src/vs/code/electron-main/logUploader.i18n.json b/i18n/jpn/src/vs/code/electron-main/logUploader.i18n.json index d8c3570a912..5df387f9458 100644 --- a/i18n/jpn/src/vs/code/electron-main/logUploader.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/logUploader.i18n.json @@ -14,5 +14,8 @@ "logUploadPromptBody": "次の場所でログ ファイルを確認してください: '{0}'", "logUploadPromptBodyDetails": "ログには完全なパスやファイルの内容などの個人情報を含んでいる可能性があります。", "logUploadPromptKey": "ログを確認しました ('y' を入力してアップロードを確認)", - "postError": "ログを提出中のエラー: {0}" + "postError": "ログを提出中のエラー: {0}", + "responseError": "ログの投稿でエラーが発生しました。{0} を取得しました — {1}", + "parseError": "レスポンスを解析中にエラー", + "zipError": "ログを zip に圧縮中にエラー : {0}" } \ 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 84f90c69a75..1024574c477 100644 --- a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -66,6 +66,10 @@ "snippetSuggestions": "他の修正候補と一緒にスニペットを表示するかどうか、およびその並び替えの方法を制御します。", "emptySelectionClipboard": "選択範囲を指定しないでコピーする場合に現在の行をコピーするかどうかを制御します。", "wordBasedSuggestions": "ドキュメント内の単語に基づいて入力候補を計算するかどうかを制御します。", + "suggestSelection.first": "常に最初の候補を選択します。", + "suggestSelection.recentlyUsed": "追加入力によって選択されたものがなければ、最近の候補を選択します。例: `console.| -> console.log` (`log` は最近入力されたため)。", + "suggestSelection.recentlyUsedByPrefix": "これらの候補を入力した前のプレフィックスに基づいて候補を選択します。例: `co -> console`、`con -> const`。", + "suggestSelection": "候補リストを表示するときに候補を事前に選択する方法を制御します。", "suggestFontSize": "候補のウィジェットのフォント サイズ", "suggestLineHeight": "候補のウィジェットの行の高さ", "selectionHighlight": "エディターで選択範囲に類似する一致箇所を強調表示するかどうかを制御します", diff --git a/i18n/jpn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/jpn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json index 08edcc27452..7c1a348d6fa 100644 --- a/i18n/jpn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -6,5 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "smartSelect.jumpBracket": "ブラケットへ移動" + "overviewRulerBracketMatchForeground": "一致するブラケットを示す概要ルーラーのマーカー色。", + "smartSelect.jumpBracket": "ブラケットへ移動", + "smartSelect.selectToBracket": "ブラケットに選択" } \ No newline at end of file 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 14135cac24b..9424d81fa5a 100644 --- a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json @@ -14,6 +14,7 @@ "reuseWindow": "強制的に最後にアクティブだったウィンドウ内でファイルかフォルダーを開きます。", "wait": "現在のファイルが閉じられるまで待機します。", "locale": "使用する国と地域 (例:en-US や zh-TW など)。", + "userDataDir": "ユーザー データが保持されるディレクトリを指定します。複数の異なる Code のインスタンスを開くために使用できます。", "version": "バージョンを表示します。", "help": "使用法を表示します。", "extensionHomePath": "拡張機能のルート パスを設定します。", diff --git a/i18n/jpn/src/vs/platform/list/browser/listService.i18n.json b/i18n/jpn/src/vs/platform/list/browser/listService.i18n.json index a4b5f4f0f6e..92abbc3a7e9 100644 --- a/i18n/jpn/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/jpn/src/vs/platform/list/browser/listService.i18n.json @@ -9,6 +9,8 @@ "workbenchConfigurationTitle": "ワークベンチ", "multiSelectModifier.ctrlCmd": "Windows および Linux 上の `Control` キーと macOS 上の `Command` キーに割り当てます。", "multiSelectModifier.alt": "Windows および Linux 上の `Alt` キーと macOS 上の `Option` キーに割り当てます。", + "multiSelectModifier": "マウスで複数の選択肢にツリーおよびリストの項目を追加するために使用される修飾子 (たとえば、エクスプローラーでエディターと scm ビューを開くなど)。`ctrlCmd` は、Windows と Linux では `Control` にマップされ、macOS では `Command` にマップされます。'横に並べて開く' マウス ジェスチャー (サポートされている場合) は、複数選択修飾子と競合しないように調整されます。", "openMode.singleClick": "マウスのシングル クリックで項目を開きます。", - "openMode.doubleClick": "マウスのダブル クリックで項目を開きます。" + "openMode.doubleClick": "マウスのダブル クリックで項目を開きます。", + "openModeModifier": "マウスを使用して、ツリーとリストで項目を開く方法を制御します (サポートされている場合)。'SingleClick' に設定すると、項目をマウスのシングル クリックで開き、'doubleClick' に設定すると、ダブル クリックでのみ開きます。ツリーで子を持つ親の場合、この設定で、親をシングル クリックで展開するか、ダブル クリックで展開するかを制御します。該当しない場合、一部のツリーとリストでは、この設定が無視される場合があることに注意してください。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/localizations/common/localizations.i18n.json b/i18n/jpn/src/vs/platform/localizations/common/localizations.i18n.json index c98784e8474..6853608712d 100644 --- a/i18n/jpn/src/vs/platform/localizations/common/localizations.i18n.json +++ b/i18n/jpn/src/vs/platform/localizations/common/localizations.i18n.json @@ -8,6 +8,10 @@ ], "vscode.extension.contributes.localizations": "ローカリゼーションをエディターに提供します", "vscode.extension.contributes.localizations.languageId": "表示文字列が翻訳される言語の id。", + "vscode.extension.contributes.localizations.languageName": "英語での言語の名前。", + "vscode.extension.contributes.localizations.languageNameLocalized": "提供された言語での言語の名前。", "vscode.extension.contributes.localizations.translations": "言語に関連付けられている翻訳の一覧です。", + "vscode.extension.contributes.localizations.translations.id": "この翻訳が提供される VS Code または拡張機能の ID。VS Code は常に `vscode` で、拡張機能の形式は `publisherId.extensionName` になります。", + "vscode.extension.contributes.localizations.translations.id.pattern": "VS Code または拡張機能を変換するための ID はそれぞれ、`vscode` か、`publisherId.extensionName` の形式になります。", "vscode.extension.contributes.localizations.translations.path": "言語の翻訳を含むファイルへの相対パス。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json index 35229bd6699..955a5016ea5 100644 --- a/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json +++ b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "folderStatusMessageAddSingleFolder": "拡張機能 '{0}' は 1 つのフォルダーをワークスペースに追加しました", + "folderStatusMessageAddMultipleFolders": "拡張機能 '{0}' は {1} フォルダーをワークスペースに追加しました", + "folderStatusMessageRemoveSingleFolder": "拡張機能 '{0}' は 1 つのフォルダーをワークスペースから削除しました", + "folderStatusMessageRemoveMultipleFolders": "拡張機能 '{0}' は {1} フォルダーをワークスペースから削除しました", + "folderStatusChangeFolder": "拡張機能 '{0}' はワークスペースのフォルダーを変更しました" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostWorkspace.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostWorkspace.i18n.json index 35229bd6699..63ec18e6954 100644 --- a/i18n/jpn/src/vs/workbench/api/node/extHostWorkspace.i18n.json +++ b/i18n/jpn/src/vs/workbench/api/node/extHostWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "updateerror": "拡張機能 '{0}' はワークスペースのフォルダーを更新できませんでした: {1}" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index ee62f8238dc..93c2b61746d 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,7 +11,9 @@ "sizeMB": "{0}MB", "sizeGB": "{0}GB", "sizeTB": "{0}TB", + "largeImageError": "画像のファイル サイズが非常に大きい (>1MB) ため、エディターに表示されません。 ", "resourceOpenExternalButton": "外部のプログラムを使用して画像を開きますか?", "nativeBinaryError": "このファイルはバイナリか、非常に大きいか、またはサポートされていないテキスト エンコードを使用しているため、エディターに表示されません。", + "zoom.action.fit.label": "画像全体", "imgMeta": "{0}x{1} {2}" } \ No newline at end of file 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 f81b60ffef4..4964b4c61de 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,6 +32,8 @@ "app.launch.json.configurations": "構成の一覧。IntelliSense を使用して、新しい構成を追加したり、既存の構成を編集したります。", "app.launch.json.compounds": "複合の一覧。各複合は、同時に起動される複数の構成を参照します。", "app.launch.json.compound.name": "複合の名前。起動構成のドロップダウン メニューに表示されます。", + "useUniqueNames": "一意の構成名を使用してください。", + "app.launch.json.compound.folder": "複合があるフォルダーの名前。", "app.launch.json.compounds.configurations": "この複合の一部として開始される構成の名前。", "debugNoType": "デバッグ アダプター 'type' は省略不可で、'string' 型でなければなりません。", "selectDebug": "環境の選択", 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 78931990c2a..9601fe4710b 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 @@ -13,6 +13,9 @@ "breakpointAdded": "ブレークポイントを追加しました。行 {0}、ファイル {1}", "breakpointRemoved": "ブレークポイントを削除しました。行 {0}、ファイル {1}", "compoundMustHaveConfigurations": "複合構成を開始するには、複合に \"configurations\" 属性が設定されている必要があります。", + "noConfigurationNameInWorkspace": "ワークスペースに起動構成 '{0}' が見つかりませんでした。", + "multipleConfigurationNamesInWorkspace": "ワークスペースに複数の起動構成 `{0}` があります。フォルダー名を使用して構成を修飾してください。", + "noFolderWithName": "複合 '{2}' の構成 '{1}' で、名前 '{0}' を含むフォルダーが見つかりませんでした。", "configMissing": "構成 '{0}' が 'launch.json' 内にありません。", "launchJsonDoesNotExist": "'launch.json' は存在しません。", "debugRequestNotSupported": "選択しているデバッグ構成で `{0}` 属性はサポートされない値 '{1}' を指定しています。", @@ -23,6 +26,7 @@ "preLaunchTaskError": "preLaunchTask '{0}' の実行中にビルド エラーが検出されました。", "preLaunchTaskExitCode": "preLaunchTask '{0}' が終了コード {1} で終了しました。", "debugAnyway": "このままデバッグを続ける", + "showErrors": "エラーの表示", "cancel": "キャンセル", "noFolderWorkspaceDebugError": "アクティブ ファイルをデバッグできません。ファイルがディスクに保存されており、そのファイル タイプのデバッグ拡張機能がインストールされていることを確認してください。", "DebugTaskNotFound": "preLaunchTask '{0}' が見つかりませんでした。", 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 f7a966e74a7..67dfcce90ce 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 @@ -33,6 +33,10 @@ "view id": "ID", "view name": "名前", "view location": "場所", + "localizations": "ローカライズ ({0})", + "localizations language id": "言語 ID", + "localizations language name": "言語名", + "localizations localized language name": "言語名 (ローカライズ済み)", "colorThemes": "配色テーマ ({0})", "iconThemes": "アイコン テーマ ({0})", "colors": "配色 ({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 4977ba914b8..b1a87868196 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 @@ -52,6 +52,8 @@ "configureWorkspaceRecommendedExtensions": "推奨事項の拡張機能を構成 (ワークスペース)", "configureWorkspaceFolderRecommendedExtensions": "推奨事項の拡張機能を構成 (ワークスペース フォルダー)", "builtin": "ビルトイン", + "malicious tooltip": "この拡張機能は問題ありと報告されました。", + "malicious": "悪意がある", "disableAll": "インストール済みのすべての拡張機能を無効にする", "disableAllWorkspace": "このワークスペースのインストール済みの拡張機能をすべて無効にする", "enableAll": "インストール済みの拡張機能をすべて有効にする", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 4c5a5894ff1..a130a501f85 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "noPro": "拡張機能をプロファイルするには、`--inspect-extensions=<port>` を使って起動してください。", "selectAndStartDebug": "クリックしてプロファイリングを停止します。" } \ 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 8e65e413015..2b0ac4c599f 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 @@ -11,6 +11,7 @@ "workspaceRecommendation": "現在のワークスペースのユーザーによってこの拡張機能が推奨されています。", "fileBasedRecommendation": "最近開いたファイルに基づいてこの拡張機能が推奨されます。", "exeBasedRecommendation": "{0} がインストールされているため、この拡張機能を推奨します。", + "dynamicWorkspaceRecommendation": "現在のワークスペースの他の多くのユーザーがこの拡張機能を使用しているので、お客様も関心を持たれるかもしれません。", "reallyRecommended2": "このファイルの種類には拡張機能 '{0}' が推奨されます。", "reallyRecommendedExtensionPack": "このファイルの種類には拡張機能パック '{0}' が推奨されます。", "showRecommendations": "推奨事項を表示", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 572fc4519ab..fe41df1b333 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -19,5 +19,6 @@ "suggestProxyError": "Marketplace が 'ECONNREFUSED' を返しました。'http.proxy' 設定を確認してください。", "extensions": "拡張機能", "outdatedExtensions": "{0} 古くなった拡張機能", + "malicious warning": "問題があることが報告された '{0}' をアンインストールしました。", "reloadNow": "今すぐ再度読み込む" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index 83cbae31999..c7652dd8f25 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -7,6 +7,7 @@ "Do not edit this file. It is machine generated." ], "installingVSIXExtension": "VSIX から拡張機能をインストールしています...", + "malicious": "この拡張機能には問題があると報告されています。", "installingMarketPlaceExtension": "Marketplace から拡張機能をインストールしています...", "uninstallingExtension": "拡張機能をアンインストールしています...", "enableDependeciesConfirmation": "'{0}' を有効にするとその依存関係も有効になります。続行しますか?", diff --git a/i18n/jpn/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index 3992b5dad3f..6f22ec1f686 100644 --- a/i18n/jpn/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -8,10 +8,12 @@ ], "openLogsFolder": "ログ フォルダーを開く", "showLogs": "ログの表示...", + "rendererProcess": "ウィンドウ ({0})", "emptyWindow": "ウィンドウ", "extensionHost": "拡張機能ホスト", "sharedProcess": "共有", "mainProcess": "メイン", + "selectProcess": "プロセスのログを選択", "openLogFile": "ログ ファイルを開く...", "setLogLevel": "ログ レベルの設定", "trace": "トレース", @@ -22,5 +24,7 @@ "critical": "重大", "off": "オフ", "selectLogLevel": "ログ レベルを選択", - "default": "既定" + "default and current": "既定と現在", + "default": "既定", + "current": "現在" } \ 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 e72b4e70776..1662eba1d89 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 @@ -17,6 +17,7 @@ "addLabel": "キー バインドの追加", "removeLabel": "キー バインドの削除", "resetLabel": "キー バインドのリセット", + "showSameKeybindings": "同じキーバインドを表示", "copyLabel": "コピー", "copyCommandLabel": "コピー コマンド", "error": "キー バインドの編集中にエラー '{0}' が発生しました。'keybindings.json' ファイルを開いてご確認ください。", 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 ed97b33a104..ee6f0473951 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 @@ -9,6 +9,7 @@ "emptyUserSettingsHeader": "既定の設定を上書きするには、このファイル内に設定を挿入します。", "emptyWorkspaceSettingsHeader": "ユーザー設定を上書きするには、このファイル内に設定を挿入します。", "emptyFolderSettingsHeader": "ワークスペースの設定を上書きするには、このファイル内にフォルダーの設定を挿入します。", + "newExtensionLabel": "拡張機能 \"{0}\" を表示", "editTtile": "編集", "replaceDefaultValue": "設定を置換", "copyDefaultValue": "設定にコピー", diff --git a/i18n/jpn/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 349befb101f..64ef0f72b82 100644 --- a/i18n/jpn/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -18,6 +18,7 @@ "RefreshAction.label": "最新の情報に更新", "CollapseDeepestExpandedLevelAction.label": "すべて折りたたむ", "ClearSearchResultsAction.label": "クリア", + "CancelSearchAction.label": "検索のキャンセル", "FocusNextSearchResult.label": "次の検索結果にフォーカス", "FocusPreviousSearchResult.label": "前の検索結果にフォーカス", "RemoveAction.label": "却下", diff --git a/i18n/jpn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index 86ecd5c7750..c485fcfc6a9 100644 --- a/i18n/jpn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -24,5 +24,6 @@ "useIgnoreFiles": "ファイルを検索するときに、.gitignore ファイルを使用するか .ignore ファイルを使用するかを制御します。", "search.quickOpen.includeSymbols": "グローバル シンボル検索の結果を、Quick Open の結果ファイルに含めるように構成します。", "search.followSymlinks": "検索中にシンボリック リンクをたどるかどうかを制御します。", - "search.smartCase": "すべて小文字のパターンの場合、大文字と小文字を区別しないで検索し、そうでない場合は大文字と小文字を区別して検索する" + "search.smartCase": "すべて小文字のパターンの場合、大文字と小文字を区別しないで検索し、そうでない場合は大文字と小文字を区別して検索する", + "search.globalFindClipboard": "macOS で検索ビューレットが共有の検索クリップボードを読み取りまたは変更するかどうかを制御します" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index 269aea92aa2..ee6c777124c 100644 --- a/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "グローバル ユーザー スニペット", "source.snippet": "ユーザー スニペット" } \ 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 9b171966a41..e7430be8b03 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 @@ -21,6 +21,10 @@ "JsonSchema.tasks.terminal": "terminal プロパティは非推奨です。代わりに presentation をご使用ください", "JsonSchema.tasks.group.kind": "タスクの実行グループ。", "JsonSchema.tasks.group.isDefault": "このタスクがグループ内の既定のタスクであるかどうかを定義します。", + "JsonSchema.tasks.group.defaultBuild": "既定のビルド タスクとしてタスクをマークします。", + "JsonSchema.tasks.group.defaultTest": "既定のテスト タスクとしてタスクをマークします。", + "JsonSchema.tasks.group.build": "'ビルド タスクの実行' コマンドからアクセスできるビルド タスクとしてタスクをマークします。", + "JsonSchema.tasks.group.test": "'テスト タスクの実行' コマンドからアクセスできるビルド タスクとしてタスクをマークします。", "JsonSchema.tasks.group.none": "タスクをグループに割り当てない", "JsonSchema.tasks.group": "このタスクが属する実行グループを定義します。ビルド グループに追加する \"build\" とテスト グループに追加する \"test\" をサポートしています。", "JsonSchema.tasks.type": "タスクをプロセスとして実行するか、またはシェル内部でコマンドとして実行するかどうかを定義します。", 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 a14de1f6504..12fb295a5cb 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 @@ -6,6 +6,9 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "terminal.integrated.a11yBlankLine": "空白行", + "terminal.integrated.a11yPromptLabel": "端末入力", + "terminal.integrated.a11yTooMuchOutput": "通知する出力が多すぎます。行に移動して手動で読み取ってください", "terminal.integrated.copySelection.noSelection": "ターミナルにコピー対象の選択範囲がありません", "terminal.integrated.exitedWithCode": "ターミナルの処理が終了しました (終了コード: {0})", "terminal.integrated.waitOnExit": "任意のキーを押して端末を終了します", diff --git a/i18n/kor/extensions/emmet/package.i18n.json b/i18n/kor/extensions/emmet/package.i18n.json index 7c2f62ae857..09a47620624 100644 --- a/i18n/kor/extensions/emmet/package.i18n.json +++ b/i18n/kor/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "콤마로 구분된 리스트의 속성은 코멘트 필터 약어로 존재해야 합니다.", "emmetPreferencesFormatNoIndentTags": "내부 들여쓰기하면 안 되는 태그 이름 배열", "emmetPreferencesFormatForceIndentTags": "항상 내부 들여쓰기를 해야 하는 태그 이름의 배열", - "emmetPreferencesAllowCompactBoolean": "true인 경우 부울 속성의 축소된 표기법이 생성됩니다." + "emmetPreferencesAllowCompactBoolean": "true인 경우 부울 속성의 축소된 표기법이 생성됩니다.", + "emmetPreferencesCssWebkitProperties": "`-`로 시작하는 emmet 약어에서 사용할 때 webkit 공급업체 접두사를 가져오는 쉼표로 구분된 CSS 속성입니다. 항상 webkit 접두사를 사용하지 않으려면 빈 문자열로 설정합니다.", + "emmetPreferencesCssMozProperties": "`-`로 시작하는 emmet 약어에서 사용할 때 moz 공급업체 접두사를 가져오는 쉼표로 구분된 CSS 속성입니다. 항상 moz 접두사를 사용하지 않으려면 빈 문자열로 설정합니다.", + "emmetPreferencesCssOProperties": "`-`로 시작하는 emmet 약어에서 사용할 때 o 공급업체 접두사를 가져오는 쉼표로 구분된 CSS 속성입니다. 항상 o 접두사를 사용하지 않으려면 빈 문자열로 설정합니다.", + "emmetPreferencesCssMsProperties": "`-`로 시작하는 emmet 약어에서 사용할 때 ms 공급업체 접두사를 가져오는 쉼표로 구분된 CSS 속성입니다. 항상 ms 접두사를 사용하지 않으려면 빈 문자열로 설정합니다." } \ 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 bcc589eb682..025b99831b7 100644 --- a/i18n/kor/extensions/git/package.i18n.json +++ b/i18n/kor/extensions/git/package.i18n.json @@ -73,6 +73,8 @@ "config.decorations.enabled": "Git에서 색과 배지를 탐색기와 열려 있는 편집기 뷰에 적용하는지 제어합니다.", "config.promptToSaveFilesBeforeCommit": "Git가 제출(commit)하기 전에 저장되지 않은 파일을 검사할지를 제어합니다. ", "config.showInlineOpenFileAction": "Git 변경점 보기에서 파일 열기 동작 줄을 표시할지의 여부를 제어합니다.", + "config.inputValidation": "입력 유효성 검사에 입력 카운터를 언제 표시할지 제어합니다.", + "config.detectSubmodules": "Git 하위 모듈을 자동으로 검색할지 여부를 제어합니다.", "colors.modified": "수정된 리소스의 색상입니다.", "colors.deleted": "삭제된 리소스의 색상입니다.", "colors.untracked": "추적되지 않은 리소스의 색상입니다.", diff --git a/i18n/kor/extensions/markdown/out/security.i18n.json b/i18n/kor/extensions/markdown/out/security.i18n.json index 8c1b92c0822..b7fd641e493 100644 --- a/i18n/kor/extensions/markdown/out/security.i18n.json +++ b/i18n/kor/extensions/markdown/out/security.i18n.json @@ -15,5 +15,6 @@ "moreInfo.title": "추가 정보", "enableSecurityWarning.title": "이 작업 영역에서 미리 보기 보안 경고 사용", "disableSecurityWarning.title": "이 작업 영역에서 미리보기 보안 경고 사용 안 함", + "toggleSecurityWarning.description": "콘텐츠 보안 수준에 영향을 주지 않습니다.", "preview.showPreviewSecuritySelector.title": "이 작업 영역에 대해 Markdown 미리 보기의 보안 설정 선택" } \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/kor/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index 2f3763ae9fb..324628fdb33 100644 --- a/i18n/kor/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/kor/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -6,6 +6,13 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "previewOnGitHub": "GitHub에서 미리 보기", + "similarIssues": "유사한 문제", "noResults": "결과 없음", - "description": "설명" + "rateLimited": "API 속도 제한 초과됨", + "stepsToReproduce": "재현 단계", + "bugDescription": "이 문제는 어떻게 발생했나요? 문제를 안정적으로 재현하는 데 필요한 단계는 무엇인가요? 정상 동작은 무엇이고 실제로 발생한 동작은 무엇인가요?", + "performanceIssueDesciption": "이 성능 문제는 언제 일어났나요? 예를 들어 시작 시 발생했나요? 아니면 일련의 특정 작업 후 발생했나요? 세부 사항을 제공해 주시면 조사에 도움이 됩니다.", + "description": "설명", + "disabledExtensions": "확장을 사용할 수 없습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/kor/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 35229bd6699..e49ef79ad24 100644 --- a/i18n/kor/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/kor/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -5,5 +5,25 @@ "Licensed under the MIT License. See License.txt in the project root for license information.", "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." - ] + ], + "completeInEnglish": "양식을 영어로 작성해 주세요.", + "issueTypeLabel": "다음을 제출하고자 합니다.", + "bugReporter": "버그 보고서", + "performanceIssue": "성능 문제", + "featureRequest": "기능 요청", + "issueTitleLabel": "제목", + "issueTitleRequired": "제목을 입력하세요.", + "vscodeVersion": "VS Code 버전", + "osVersion": "OS 버전", + "systemInfo": "내 시스템 정보", + "sendData": "내 데이터 보내기", + "processes": "현재 실행 중인 프로세스", + "workspaceStats": "내 작업 영역 통계", + "extensions": "내 확장", + "tryDisablingExtensions": "확장을 사용하지 않도록 설정하는 경우 문제를 재현할 수 있습니다.", + "disableExtensions": "모든 확장을 사용하지 않도록 설정하고 창 다시 로드", + "showRunningExtensions": "실행 중인 확장 모두 보기", + "githubMarkdown": "GitHub의 특성을 가지는 Markdown을 지원합니다. GitHub에서 미리 볼 때 문제를 편집하고 스크린샷을 추가할 수 있습니다.", + "issueDescriptionRequired": "설명을 입력하세요.", + "loadingData": "데이터 로드 중..." } \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-main/logUploader.i18n.json b/i18n/kor/src/vs/code/electron-main/logUploader.i18n.json index 35229bd6699..acb1fec3780 100644 --- a/i18n/kor/src/vs/code/electron-main/logUploader.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/logUploader.i18n.json @@ -5,5 +5,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." - ] + ], + "invalidEndpoint": "잘못된 로그 업로더 끝점", + "beginUploading": "업로드 중...", + "didUploadLogs": "업로드 성공. 로그 파일 ID: {0}", + "userDeniedUpload": "취소된 업로드", + "logUploadPromptHeader": "세션 로그를 보안 끝점으로 업로드하시겠습니까?", + "logUploadPromptBody": "여기에서 로그 파일을 검토하세요. '{0}'", + "logUploadPromptBodyDetails": "로그에는 전체 경로 및 파일 내용과 같은 개인 정보가 포함되어 있을 수 있습니다.", + "logUploadPromptKey": "내 로그 검토함(업로드를 확인하려면 'y' 입력)", + "postError": "로그를 게시하는 동안 오류가 발생했습니다. {0}", + "responseError": "로그를 게시하는 동안 오류가 발생했습니다. {0} — {1} 받음", + "parseError": "응답을 구문 분석하는 동안 오류가 발생했습니다.", + "zipError": "로그를 압축하는 동안 오류가 발생했습니다. {0}" } \ 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 e08964a36de..6c1f097554a 100644 --- a/i18n/kor/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/menus.i18n.json @@ -90,6 +90,7 @@ "miMarker": "문제(&&P)", "miAdditionalViews": "추가 뷰(&&V)", "miCommandPalette": "명령 팔레트(&&C)...", + "miOpenView": "뷰 열기(&&O)...", "miToggleFullScreen": "전체 화면 설정/해제(&&F)", "miToggleZenMode": "Zen 모드 설정/해제", "miToggleMenuBar": "메뉴 모음 설정/해제(&&B)", @@ -184,6 +185,7 @@ "miCheckingForUpdates": "업데이트를 확인하는 중...", "miDownloadUpdate": "사용 가능한 업데이트 다운로드", "miDownloadingUpdate": "업데이트를 다운로드하는 중...", + "miInstallUpdate": "업데이트 설치...", "miInstallingUpdate": "업데이트를 설치하는 중...", "miRestartToUpdate": "다시 시작하여 업데이트...", "aboutDetail": "버전 {0}\n커밋 {1}\n날짜 {2}\n셸 {3}\n렌더러 {4}\n노드 {5}\n아키텍처 {6}", 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 625cbf270c2..85ef5c5304e 100644 --- a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -66,6 +66,10 @@ "snippetSuggestions": "코드 조각이 다른 추천과 함께 표시되는지 여부 및 정렬 방법을 제어합니다.", "emptySelectionClipboard": "선택 영역 없이 현재 줄 복사 여부를 제어합니다.", "wordBasedSuggestions": "문서 내 단어를 기반으로 완성을 계산할지 여부를 제어합니다.", + "suggestSelection.first": "항상 첫 번째 제안을 선택합니다.", + "suggestSelection.recentlyUsed": "추가로 입력되지 않는 경우, 최근 제안을 선택합니다. 예를 들어 'log'가 최근에 완료되었으므로 'console.| -> console.log'로 전개되는 것을 선택합니다.", + "suggestSelection.recentlyUsedByPrefix": "제안을 완료한 이전 접두사를 기준으로 제안을 선택합니다. 예를 들어 'co-> console'로, 'con->const'로 전개됩니다.", + "suggestSelection": "제안 목록을 표시할 때 제한이 미리 선택되는 방식을 제어합니다.", "suggestFontSize": "제안 위젯의 글꼴 크기", "suggestLineHeight": "제안 위젯의 줄 높이", "selectionHighlight": "편집기에서 선택 항목과 유사한 일치 항목을 강조 표시할지 여부를 제어합니다.", 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 9ceec5abd21..b44ee27fd67 100644 --- a/i18n/kor/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/kor/src/vs/platform/environment/node/argv.i18n.json @@ -10,8 +10,11 @@ "diff": "두 파일을 서로 비교합니다.", "add": "마지막 활성 창에 폴더를 추가합니다.", "goto": "지정된 줄과 문자 위치에 있는 경로의 파일을 엽니다.", + "newWindow": "새 창을 강제로 엽니다.", + "reuseWindow": "마지막 활성 창에서 파일 또는 파일을 강제로 엽니다.", "wait": "파일이 닫힐 때 까지 기다린 후 돌아갑니다.", "locale": "사용할 로캘(예: en-US 또는 zh-TW)입니다.", + "userDataDir": "사용자 데이터가 저장되는 디렉터리를 지정합니다. Code의 여러 고유 인스턴스를 여는 데 사용할 수 있습니다.", "version": "버전을 출력합니다.", "help": "사용법을 출력합니다.", "extensionHomePath": "확장의 루트 경로를 설정합니다.", diff --git a/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index 5bde8568f97..042b7c91d0d 100644 --- a/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/kor/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -13,6 +13,7 @@ "cancel": "취소", "errorInstallingDependencies": "의존성 설치 중 오류가 발생했습니다. {0}", "notFoundCompatible": "'{0}'을(를) 설치할 수 없습니다; VS Code '{1}'과 호환되는 버전이 없습니다.", + "malicious extension": "문제가 있다고 보고되었으므로 확장을 설치할 수 없습니다.", "notFoundCompatibleDependency": "VS Code의 현재 버전 '{1}'과(와) 호환되는 종속된 확장 '{0}'을(를) 찾을 수 없으므로 설치할 수 없습니다.", "quitCode": "확장을 설치할 수 없습니다. 다시 설치하기 위해 VS Code를 종료하고 다시 시작하십시오.", "exitCode": "확장을 설치할 수 없습니다. 다시 설치하기 전에 VS 코드를 종료한 후 다시 시작하십시오. ", diff --git a/i18n/kor/src/vs/platform/issue/electron-main/issueService.i18n.json b/i18n/kor/src/vs/platform/issue/electron-main/issueService.i18n.json index 35229bd6699..d927ee6ed7b 100644 --- a/i18n/kor/src/vs/platform/issue/electron-main/issueService.i18n.json +++ b/i18n/kor/src/vs/platform/issue/electron-main/issueService.i18n.json @@ -5,5 +5,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." - ] + ], + "issueReporter": "문제 보고자" } \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/list/browser/listService.i18n.json b/i18n/kor/src/vs/platform/list/browser/listService.i18n.json index 7e6f7bfe858..26cbc3957bc 100644 --- a/i18n/kor/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/kor/src/vs/platform/list/browser/listService.i18n.json @@ -8,5 +8,9 @@ ], "workbenchConfigurationTitle": "워크벤치", "multiSelectModifier.ctrlCmd": "Windows와 Linux의 'Control'을 macOS의 'Command'로 매핑합니다.", - "multiSelectModifier.alt": "Windows와 Linux의 'Alt'를 macOS의 'Option'으로 매핑합니다." + "multiSelectModifier.alt": "Windows와 Linux의 'Alt'를 macOS의 'Option'으로 매핑합니다.", + "multiSelectModifier": "마우스로 트리와 목록의 항목을 다중 선택에 추가할 때 사용할 한정자입니다(예를 들어 탐색기에서 편집기와 SCM 보기를 여는 경우). `ctrlCmd`는 Windows와 Linux에서 `Control`로 매핑되고 macOS에서 `Command`로 매핑됩니다. '옆에서 열기' 마우스 제스처(지원되는 경우)는 다중 선택 한정자와 충돌하지 않도록 조정됩니다.", + "openMode.singleClick": "마우스를 한 번 클릭하여 항목을 엽니다.", + "openMode.doubleClick": "마우스를 두 번 클릭하여 항목을 엽니다.", + "openModeModifier": "트리와 목록에서 마우스를 사용하여 항목을 여는 방법을 제어합니다(지원되는 경우). 마우스을 한 번 클릭하여 항목을 열려면 `singleClick` 으로 설정하고 마우스 두 번 클릭을 통해서만 열려면 `doubleClick`으로 설정합니다. 트리에서 하위 항목이 있는 상위 항목의 경우 이 설정은 상위 항목을 한 번 클릭으로 확장할지 두 번 클릭으로 확장할지를 제어합니다. 일부 트리와 목록에서는 이 설정을 적용할 수 없는 경우 무시하도록 선택할 수 있습니다. " } \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/localizations/common/localizations.i18n.json b/i18n/kor/src/vs/platform/localizations/common/localizations.i18n.json index 35229bd6699..fc09801065f 100644 --- a/i18n/kor/src/vs/platform/localizations/common/localizations.i18n.json +++ b/i18n/kor/src/vs/platform/localizations/common/localizations.i18n.json @@ -5,5 +5,13 @@ "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.localizations": "편집기에 지역화를 적용합니다.", + "vscode.extension.contributes.localizations.languageId": "표시 문자열이 번역되는 언어의 ID입니다.", + "vscode.extension.contributes.localizations.languageName": "영어로 된 언어 이름입니다.", + "vscode.extension.contributes.localizations.languageNameLocalized": "적용된 언어로 된 언어 이름입니다.", + "vscode.extension.contributes.localizations.translations": "해당 언어에 연결된 번역 목록입니다.", + "vscode.extension.contributes.localizations.translations.id": "이 변환이 적용되는 VS Code 또는 확장의 ID입니다. VS Code의 ID는 항상 `vscode`이고 확장의 ID는 `publisherId.extensionName` 형식이어야 합니다.", + "vscode.extension.contributes.localizations.translations.id.pattern": "ID는 VS Code를 변환하거나 확장을 변환하는 경우 각각 `vscode` 또는 `publisherId.extensionName` 형식이어야 합니다.", + "vscode.extension.contributes.localizations.translations.path": "언어에 대한 변환을 포함하는 파일의 상대 경로입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json index 35229bd6699..2d1a9a6ea73 100644 --- a/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json +++ b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "folderStatusMessageAddSingleFolder": "'{0}' 확장이 작업 영역에 1개 폴더를 추가함", + "folderStatusMessageAddMultipleFolders": "'{0}' 확장이 작업 영역에 {1}개 폴더를 추가함", + "folderStatusMessageRemoveSingleFolder": "'{0}' 확장이 작업 영역에서 1개 폴더를 제거함", + "folderStatusMessageRemoveMultipleFolders": "'{0}' 확장이 작업 영역에서 {1}개 폴더를 제거함", + "folderStatusChangeFolder": "'{0}' 확장이 작업 영역의 폴더를 변경함" } \ 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 25833120c28..119f9434ea1 100644 --- a/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "treeView.notRegistered": "ID가 '{0}'인 등록된 트리 뷰가 없습니다." + "treeView.notRegistered": "ID가 '{0}'인 등록된 트리 뷰가 없습니다.", + "treeView.duplicateElement": "ID가 {0}인 요소가 이미 등록되어 있습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostWorkspace.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostWorkspace.i18n.json index 35229bd6699..a003ec20048 100644 --- a/i18n/kor/src/vs/workbench/api/node/extHostWorkspace.i18n.json +++ b/i18n/kor/src/vs/workbench/api/node/extHostWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "updateerror": "'{0}' 확장이 작업 영역 폴더를 업데이트하지 못했습니다. {1}" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json b/i18n/kor/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json index 9af8931d3e4..6a131e7319a 100644 --- a/i18n/kor/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "toggleSidebarPosition": "사이드바 위치 설정/해제", "view": "보기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/actions/workspaceCommands.i18n.json b/i18n/kor/src/vs/workbench/browser/actions/workspaceCommands.i18n.json index a409b619ad3..ab09f3bfef7 100644 --- a/i18n/kor/src/vs/workbench/browser/actions/workspaceCommands.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/actions/workspaceCommands.i18n.json @@ -8,5 +8,6 @@ ], "addFolderToWorkspace": "작업 영역에 폴더 추가...", "add": "추가(&&A)", - "addFolderToWorkspaceTitle": "작업 영역에 폴더 추가" + "addFolderToWorkspaceTitle": "작업 영역에 폴더 추가", + "workspaceFolderPickerPlaceholder": "작업 영역 폴더 선택" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json index 1360a457b37..64b2a99d8f5 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json @@ -22,6 +22,7 @@ "closeAllUnmodified": "미수정 항목 닫기", "closeAll": "모두 닫기", "keepOpen": "열린 상태 유지", + "toggleInlineView": "인라인 뷰 설정/해제", "showOpenedEditors": "열려 있는 편집기 표시", "keepEditor": "편집기 유지", "closeEditorsInGroup": "그룹의 모든 편집기 닫기", 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 1fccc78c158..52020df2eb3 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 @@ -50,5 +50,8 @@ "moveEditorLeft": "왼쪽으로 편집기 이동", "moveEditorRight": "오른쪽으로 편집기 이동", "moveEditorToPreviousGroup": "편집기를 이전 그룹으로 이동", - "moveEditorToNextGroup": "편집기를 다음 그룹으로 이동" + "moveEditorToNextGroup": "편집기를 다음 그룹으로 이동", + "moveEditorToFirstGroup": "편집기를 첫 번째 그룹으로 이동", + "moveEditorToSecondGroup": "편집기를 두 번째 그룹으로 이동", + "moveEditorToThirdGroup": "편집기를 세 번째 그룹으로 이동" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index 56e89b535ba..2eb6210e93a 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,7 +11,9 @@ "sizeMB": "{0}MB", "sizeGB": "{0}GB", "sizeTB": "{0}TB", + "largeImageError": "이미지의 파일 크기가 너무 커서(>1MB) 편집기에서 표시할 수 없습니다. ", "resourceOpenExternalButton": " 외부 프로그램으로 이미지를 열까요?", "nativeBinaryError": "파일이 이진이거나 매우 크거나 지원되지 않는 텍스트 인코딩을 사용하기 때문에 편집기에서 표시되지 않습니다.", + "zoom.action.fit.label": "전체 이미지", "imgMeta": "{0}x{1} {2}" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/views/viewsViewlet.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/views/viewsViewlet.i18n.json index 35229bd6699..b95f795040b 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/views/viewsViewlet.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/views/viewsViewlet.i18n.json @@ -5,5 +5,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." - ] + ], + "hideView": "숨기기" } \ 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 1e4438f0ffc..1dce13bbcdb 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 @@ -35,9 +35,11 @@ "panelDefaultLocation": "패널의 기본 위치를 제어합니다. 워크벤치의 아래 또는 오른쪽에 표시될 수 있습니다.", "statusBarVisibility": "워크벤치 아래쪽에서 상태 표시줄의 표시 유형을 제어합니다.", "activityBarVisibility": "워크벤치에서 작업 막대의 표시 유형을 제어합니다.", + "fontAliasing": "워크벤치에서 글꼴 앨리어싱 방식을 제어합니다.\n- 기본: 서브 픽셀 글꼴 다듬기. 대부분의 일반 디스플레이에서 가장 선명한 글꼴 제공\n- 안티앨리어싱: 서브 픽셀이 아닌 픽셀 단위에서 글꼴 다듬기. 전반적으로 더 밝은 느낌을 줄 수 있음\n- 없음: 글꼴 다듬기 사용 안 함. 텍스트 모서리가 각지게 표시됨\n- 자동: 디스플레이의 DPI에 따라 `기본` 또는 `안티앨리어싱`을 자동으로 적용합니다.", "workbench.fontAliasing.default": "서브 픽셀 글꼴 다듬기. 대부분의 일반 디스플레이에서 가장 선명한 텍스트를 제공합니다. ", "workbench.fontAliasing.antialiased": "서브 픽셀이 아닌 픽셀 수준에서 글꼴을 다듬습니다. 전반적으로 글꼴이 더 밝게 표시됩니다.", "workbench.fontAliasing.none": "글꼴 다듬기를 사용하지 않습니다. 텍스트 가장자리가 각지게 표시됩니다.", + "workbench.fontAliasing.auto": "디스플레이의 DPI에 따라 `기본` 또는 `안티앨리어싱`을 자동으로 적용합니다.", "enableNaturalLanguageSettingsSearch": "설정에 대한 자연어 검색 모드를 사용할지 여부를 제어합니다.", "windowConfigurationTitle": "창", "window.openFilesInNewWindow.on": "파일이 새 창에서 열립니다.", diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index 8973c256e51..31d9ef02895 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -21,6 +21,8 @@ "vscode.extension.contributes.debuggers.configurationAttributes": "'launch.json'의 유효성 검사를 위한 JSON 스키마 구성입니다.", "vscode.extension.contributes.debuggers.windows": "Windows 특정 설정", "vscode.extension.contributes.debuggers.windows.runtime": "Windows에 사용되는 런타임입니다.", + "vscode.extension.contributes.debuggers.osx": "macOS 관련 설정입니다.", + "vscode.extension.contributes.debuggers.osx.runtime": "macOS에 사용되는 런타임입니다.", "vscode.extension.contributes.debuggers.linux": "Linux 특정 설정", "vscode.extension.contributes.debuggers.linux.runtime": "Linux에 사용되는 런타임입니다.", "vscode.extension.contributes.breakpoints": "중단점을 적용합니다.", @@ -30,8 +32,12 @@ "app.launch.json.configurations": "구성 목록입니다. IntelliSense를 사용하여 새 구성을 추가하거나 기존 구성을 편집합니다.", "app.launch.json.compounds": "복합의 목록입니다. 각 복합은 함께 시작되는 여러 구성을 참조합니다.", "app.launch.json.compound.name": "복합의 이름입니다. 구성 시작 드롭 다운 메뉴에 표시됩니다.", + "useUniqueNames": "고유한 구성 이름을 사용하세요.", + "app.launch.json.compound.folder": "복합형 항목이 있는 폴더의 이름입니다.", "app.launch.json.compounds.configurations": "이 복합의 일부로 시작되는 구성의 이름입니다.", "debugNoType": "디버그 어댑터 '형식'은 생략할 수 없으며 '문자열' 형식이어야 합니다.", "selectDebug": "환경 선택", - "DebugConfig.failed": "'.vscode' 폴더({0}) 내에 'launch.json' 파일을 만들 수 없습니다." + "DebugConfig.failed": "'.vscode' 폴더({0}) 내에 'launch.json' 파일을 만들 수 없습니다.", + "workspace": "작업 영역", + "user settings": "사용자 설정" } \ 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 0eeadebbdc4..6527d3702d8 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 @@ -13,6 +13,9 @@ "breakpointAdded": "파일 {1}, 줄 {0}에 중단점이 추가되었습니다.", "breakpointRemoved": "파일 {1}, 줄 {0}에서 중단점이 제거되었습니다.", "compoundMustHaveConfigurations": "여러 구성을 시작하려면 복합에 \"configurations\" 특성 집합이 있어야 합니다.", + "noConfigurationNameInWorkspace": "작업 영역에서 시작 구성 '{0}'을(를) 찾을 수 없습니다.", + "multipleConfigurationNamesInWorkspace": "작업 영역에 여러 시작 구성 `{0}`이(가) 있습니다. 폴더 이름을 사용하여 구성을 한정하세요.", + "noFolderWithName": "복합형 '{2}'의 구성 '{1}'에 대해 이름이 '{0}'인 폴더를 찾을 수 없습니다.", "configMissing": "'{0}' 구성이 'launch.json'에 없습니다.", "launchJsonDoesNotExist": "'launch.json'이 없습니다.", "debugRequestNotSupported": "선택한 디버그 구성에서 특성 '{0}'에 지원되지 않는 값 '{1}'이(가) 있습니다.", @@ -23,6 +26,7 @@ "preLaunchTaskError": "preLaunchTask '{0}' 진행 중에 빌드 오류가 감지되었습니다.", "preLaunchTaskExitCode": "preLaunchTask '{0}'이(가) {1} 종료 코드와 함께 종료되었습니다.", "debugAnyway": "디버그", + "showErrors": "오류 표시", "cancel": "취소", "noFolderWorkspaceDebugError": "활성 파일은 디버그할 수 없습니다. 이 파일이 디스크에 저장되어 있고 해당 파일 형식에 대한 디버그 확장이 설치되어 있는지 확인하세요.", "DebugTaskNotFound": "preLaunchTask '{0}'을(를) 찾을 수 없습니다.", 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 e965576ac3b..54e1dfab1d5 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 @@ -33,6 +33,10 @@ "view id": "ID", "view name": "이름", "view location": "위치", + "localizations": "지역화({0})", + "localizations language id": "언어 ID", + "localizations language name": "언어 이름", + "localizations localized language name": "언어 이름(지역화됨)", "colorThemes": "색 테마({0})", "iconThemes": "아이콘 테마({0})", "colors": "색({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 65a5fc093be..294633755d9 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 @@ -52,6 +52,8 @@ "configureWorkspaceRecommendedExtensions": "권장 확장 구성(작업 영역)", "configureWorkspaceFolderRecommendedExtensions": "권장 확장 구성(작업 영역 폴더)", "builtin": "기본 제공", + "malicious tooltip": "이 확장은 문제가 있다고 보고되었습니다.", + "malicious": "악성", "disableAll": "설치된 모든 확장 사용 안 함", "disableAllWorkspace": "이 작업 영역에 대해 설치된 모든 확장 사용 안 함", "enableAll": "설치된 모든 확장 사용", diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 9f0a02f28b7..e96ed3f41e1 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "noPro": "확장을 프로파일링하려면 `--inspect-extensions=<port>`(으)로 시작합니다.", "selectAndStartDebug": "프로파일링을 중지하려면 클릭하세요." } \ 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 4083a40bfe8..9b8a35ad0e4 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 @@ -11,10 +11,13 @@ "workspaceRecommendation": "이 확장은 현재 작업 영역 사용자가 권장합니다.", "fileBasedRecommendation": "최근에 연 파일을 기반으로 확장이 권장됩니다.", "exeBasedRecommendation": "{0}이(가) 설치되어 있으므로 이 확장을 권장합니다.", + "dynamicWorkspaceRecommendation": "이 확장은 현재 작업 영역의 다른 많은 사용자가 사용하고 있으므로 관심을 가질 만합니다.", "reallyRecommended2": "이 파일 형식에 대해 '{0}' 확장이 권장됩니다.", "reallyRecommendedExtensionPack": "이 파일 형식에 대해 '{0}' 확장 팩이 권장됩니다.", "showRecommendations": "권장 사항 표시", "install": "설치", + "showLanguageExtensions": "Marketplace에 '.{0}' 파일이 지원되는 확장이 있습니다.", + "searchMarketplace": "Marketplace 검색", "workspaceRecommended": "이 작업 영역에 확장 권장 사항이 있습니다.", "installAll": "모두 설치", "ignoreExtensionRecommendations": "확장 권장 사항을 모두 무시하시겠습니까?", 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 716717bd06d..d88f38093be 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 @@ -19,5 +19,6 @@ "suggestProxyError": "마켓플레이스에서 'ECONNREFUSED'를 반환했습니다. 'http.proxy' 설정을 확인하세요.", "extensions": "확장", "outdatedExtensions": "{0}개의 만료된 확장", + "malicious warning": "문제가 있다고 보고된 '{0}'을(를) 제거했습니다.", "reloadNow": "지금 다시 로드" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index 11d64317ca4..893db96ed71 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -6,6 +6,10 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "installingVSIXExtension": "VSIX에서 확장을 설치하는 중...", + "malicious": "이 확장은 문제가 있다고 보고되었습니다.", + "installingMarketPlaceExtension": "Marketplace에서 확장을 설치하는 중...", + "uninstallingExtension": "확장을 제거하는 중....", "enableDependeciesConfirmation": "'{0}'을(를) 사용하도록 설정하면 종속성도 사용하도록 설정됩니다. 계속하시겠습니까?", "enable": "예", "doNotEnable": "아니요", diff --git a/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json index d5157878b87..a10f2911959 100644 --- a/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "workbenchConfigurationTitle": "워크벤치" + "workbenchConfigurationTitle": "워크벤치", + "feedbackVisibility": "워크벤치의 아래쪽에 있는 상태 표시줄에 Twitter 피드백(스마일 기호)의 표시 여부를 제어합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json b/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json index 815f55e2737..4dd3a301fb7 100644 --- a/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json @@ -18,6 +18,7 @@ "request a missing feature": "누락된 기능 요청", "tell us why?": "이유를 알려 주세요.", "commentsHeader": "설명", + "showFeedback": "상태 표시줄에 피드백 스마일 기호 표시", "tweet": "Tweet", "character left": "남은 문자", "characters left": "남은 문자", diff --git a/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json b/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json index 35229bd6699..2831ffe9f70 100644 --- a/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json @@ -5,5 +5,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." - ] + ], + "hide": "숨기기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json index d247ab2ff18..97f92cef78b 100644 --- a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -24,7 +24,9 @@ "copyPath": "경로 복사", "saveAll": "모두 저장", "compareWithSaved": "저장된 항목과 비교", + "compareWithSelected": "선택한 항목과 비교", "compareSource": "비교를 위해 선택", + "compareSelected": "선택 항목 비교", "close": "닫기", "closeOthers": "기타 항목 닫기", "closeUnmodified": "미수정 항목 닫기", diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json index be5c57ed4ab..1063c333fab 100644 --- a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -20,15 +20,18 @@ "deleteButtonLabelRecycleBin": "휴지통으로 이동(&&M)", "deleteButtonLabelTrash": "휴지통으로 이동(&&M)", "deleteButtonLabel": "삭제(&&D)", + "dirtyMessageFilesDelete": "저장되지 않은 변경 내용이 있는 파일을 삭제하려고 합니다. 계속하시겠습니까?", "dirtyMessageFolderOneDelete": "1개 파일에 저장되지 않은 변경 내용이 있는 폴더를 삭제하려고 합니다. 계속하시겠습니까?", "dirtyMessageFolderDelete": "{0}개 파일에 저장되지 않은 변경 내용이 있는 폴더를 삭제하려고 합니다. 계속하시겠습니까?", "dirtyMessageFileDelete": "저장되지 않은 변경 내용이 있는 파일을 삭제하려고 합니다. 계속하시겠습니까?", "dirtyWarning": "변경 내용을 저장하지 않은 경우 변경 내용이 손실됩니다.", + "confirmMoveTrashMessageMultiple": "다음 {0}개 파일을 삭제하시겠습니까?", "confirmMoveTrashMessageFolder": "'{0}'과(와) 해당 내용을 삭제할까요?", "confirmMoveTrashMessageFile": "'{0}'을(를) 삭제할까요?", "undoBin": "휴지통에서 복원할 수 있습니다.", "undoTrash": "휴지통에서 복원할 수 있습니다.", "doNotAskAgain": "이 메시지를 다시 표시 안 함", + "confirmDeleteMessageMultiple": "다음 {0}개 파일을 영구히 삭제하시겠습니까?", "confirmDeleteMessageFolder": "'{0}'과(와) 해당 내용을 영구히 삭제할까요?", "confirmDeleteMessageFile": "'{0}'을(를) 영구히 삭제할까요?", "irreversible": "이 작업은 취소할 수 없습니다.", @@ -36,6 +39,8 @@ "importFiles": "파일 가져오기", "confirmOverwrite": "이름이 같은 파일 또는 폴더가 대상 폴더에 이미 있습니다. 덮어쓸까요?", "replaceButtonLabel": "바꾸기(&&R)", + "fileDeleted": "그동안 파일이 삭제되거나 이동됨", + "fileIsAncestor": "복사할 파일이 대상 폴더의 상위 항목입니다.", "duplicateFile": "중복", "globalCompareFile": "활성 파일을 다음과 비교...", "openFileToCompare": "첫 번째 파일을 열어서 다른 파일과 비교합니다.", diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json index 3a954eb5b18..8c22f8027cd 100644 --- a/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -13,6 +13,7 @@ "save": "저장", "saveAll": "모두 저장", "removeFolderFromWorkspace": "작업 영역에서 폴더 삭제", + "genericRevertError": "'{0}' 되돌리기 실패: {1}", "modifiedLabel": "{0}(디스크) ↔ {1}", "openFileToReveal": "첫 번째 파일을 열어서 나타냅니다.", "openFileToCopy": "첫 번째 파일을 열어서 경로를 복사합니다." diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json index c976f4c0edb..60fac1e96fa 100644 --- a/i18n/kor/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -38,6 +38,7 @@ "editorConfigurationTitle": "편집기", "formatOnSave": "파일 저장 시 서식을 지정합니다. 포맷터를 사용할 수 있어야 하며, 파일이 자동으로 저장되지 않아야 하고, 편집기가 종료되지 않아야 합니다.", "explorerConfigurationTitle": "파일 탐색기", + "openEditorsVisible": "열려 있는 편집기 창에 표시되는 편집기 수입니다.", "autoReveal": "탐색기에서 파일을 열 때 자동으로 표시하고 선택할지를 제어합니다.", "enableDragAndDrop": "탐색기에서 끌어서 놓기를 통한 파일 및 폴더 이동을 허용하는지를 제어합니다.", "confirmDragAndDrop": "끌어서 놓기를 사용하여 파일 및 폴더를 이동하기 위해 탐색기에서 확인을 요청해야 하는지 제어합니다.", diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json index 2d8e3744f9d..b0eb1a38223 100644 --- a/i18n/kor/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -7,9 +7,13 @@ "Do not edit this file. It is machine generated." ], "userGuide": "오른쪽 편집기 도구 모음의 작업을 사용하여 변경 내용을 **실행 취소**하거나 디스크의 콘텐츠를 변경 내용으로 **덮어쓰기**", + "overwriteElevated": "관리자로 덮어쓰기...", + "saveElevated": "관리자로 다시 시도...", "overwrite": "덮어쓰기", "retry": "다시 시도", "discard": "삭제", + "readonlySaveErrorAdmin": "'{0}' 저장 실패: 파일이 쓰기 보호되어 있습니다. 관리자로 다시 시도하려면 '관리자로 덮어쓰기'를 선택하세요.", + "readonlySaveError": "'{0}' 저장 실패: 파일이 쓰기 보호되어 있습니다. 보호를 제거하려면 '덮어쓰기'를 선택하세요.", "permissionDeniedSaveError": "저장 실패 '{0}': 권한 부족. 관리자로 다시 시도하려면 '관리자로 다시 시도'를 선택하세요.", "genericSaveError": "'{0}'을(를) 저장하지 못했습니다. {1}", "staleSaveError": "'{0}'을(를) 저장하지 못했습니다. 디스크의 내용이 최신 버전입니다. 버전을 디스크에 있는 버전과 비교하려면 **비교**를 클릭하세요.", diff --git a/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json index 15332ccc747..b68cddecdb8 100644 --- a/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -12,6 +12,7 @@ "dropFolder": "작업 영역에 폴더를 추가하시겠습니까?", "addFolders": "폴더 추가(&&A)", "addFolder": "폴더 추가(&&A)", + "confirmMultiMove": "다음 {0}개 파일을 이동하시겠습니까?", "confirmMove": "'{0}'을(를) 이동하시겠습니까?", "doNotAskAgain": "이 메시지를 다시 표시 안 함", "moveButtonLabel": "이동(&&M)", diff --git a/i18n/kor/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/kor/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index c3c5cdfd9f3..43aca10fffe 100644 --- a/i18n/kor/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -8,10 +8,12 @@ ], "openLogsFolder": "로그 폴더 열기", "showLogs": "로그 표시...", + "rendererProcess": "창({0})", "emptyWindow": "창", "extensionHost": "확장 호스트", "sharedProcess": "공유", "mainProcess": "기본", + "selectProcess": "프로세스에 대한 로그 선택", "openLogFile": "로그 파일 열기...", "setLogLevel": "로그 수준 설정", "trace": "Trace", @@ -22,5 +24,7 @@ "critical": "Critical", "off": "Off", "selectLogLevel": "로그 수준 선택", - "default": "기본값" + "default and current": "기본값 및 현재", + "default": "기본값", + "current": "현재" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json index d8f6adfcf09..96ac7a8193d 100644 --- a/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -7,6 +7,8 @@ "Do not edit this file. It is machine generated." ], "viewCategory": "보기", + "problems.view.toggle.label": "문제 토글(오류, 경고, 정보)", + "problems.view.focus.label": "포커스 문제(오류, 경고, 정보)", "problems.panel.configuration.title": "문제 보기", "problems.panel.configuration.autoreveal": "문제 보기를 열 때 문제 보기에 자동으로 파일이 표시되어야 하는지를 제어합니다.", "markers.panel.title.problems": "문제", 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 797d5a4e7da..2d56a5c5e8a 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 @@ -17,7 +17,9 @@ "addLabel": "키 바인딩 추가", "removeLabel": "키 바인딩 제거", "resetLabel": "키 바인딩 다시 설정", + "showSameKeybindings": "동일한 키 바인딩 표시", "copyLabel": "복사", + "copyCommandLabel": "복사 명령", "error": "키 바인딩을 편집하는 동안 오류 '{0}'이(가) 발생했습니다. 'keybindings.json' 파일을 열고 확인하세요.", "command": "명령", "keybinding": "키 바인딩", diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 395d4bef25e..845d9b2416b 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -10,7 +10,11 @@ "SearchSettingsWidget.AriaLabel": "설정 검색", "SearchSettingsWidget.Placeholder": "설정 검색", "noSettingsFound": "결과 없음", + "oneSettingFound": "1개 설정 찾음", + "settingsFound": "{0}개 설정 찾음", "totalSettingsMessage": "총 {0}개 설정", + "nlpResult": "자연어 결과", + "filterResult": "필터링된 결과", "defaultSettings": "기본 설정", "defaultFolderSettings": "기본 폴더 설정", "defaultEditorReadonly": "기본값을 재정의하려면 오른쪽 편집기를 편집하세요.", 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 321288cf32d..5ddd6010e61 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 @@ -9,6 +9,7 @@ "emptyUserSettingsHeader": "설정을 여기에 넣어서 기본 설정을 덮어씁니다.", "emptyWorkspaceSettingsHeader": "설정을 여기에 넣어서 사용자 설정을 덮어씁니다.", "emptyFolderSettingsHeader": "폴더 설정을 여기에 넣어서 작업 영역 설정을 덮어씁니다.", + "newExtensionLabel": "\"{0}\" 확장 표시", "editTtile": "편집", "replaceDefaultValue": "설정에서 바꾸기", "copyDefaultValue": "설정에 복사", diff --git a/i18n/kor/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/kor/src/vs/workbench/parts/search/browser/searchActions.i18n.json index f868c2471aa..ada854f50d6 100644 --- a/i18n/kor/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -18,6 +18,7 @@ "RefreshAction.label": "새로 고침", "CollapseDeepestExpandedLevelAction.label": "모두 축소", "ClearSearchResultsAction.label": "지우기", + "CancelSearchAction.label": "검색 취소", "FocusNextSearchResult.label": "다음 검색 결과에 포커스", "FocusPreviousSearchResult.label": "이전 검색 결과에 포커스", "RemoveAction.label": "해제", diff --git a/i18n/kor/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index 4400f85024a..5e4449bea89 100644 --- a/i18n/kor/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -6,6 +6,8 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "findInFolder": "폴더에서 찾기...", + "findInWorkspace": "작업 영역에서 찾기...", "showTriggerActions": "작업 영역에서 기호로 이동...", "name": "검색", "search": "검색", @@ -21,5 +23,7 @@ "useRipgrep": "텍스트 및 파일 검색에서 ripgrep 사용 여부를 제어합니다.", "useIgnoreFiles": "파일을 검색할 때 .gitignore 파일 및 .ignore 파일을 사용할지 여부를 제어합니다.", "search.quickOpen.includeSymbols": "Quick Open에 대한 파일 결과에 전역 기호 검색 결과를 포함하도록 구성합니다.", - "search.followSymlinks": "검색하는 동안 symlink를 누를지 여부를 제어합니다." + "search.followSymlinks": "검색하는 동안 symlink를 누를지 여부를 제어합니다.", + "search.smartCase": "패턴이 모두 소문자인 경우 대/소문자를 구분하지 않고 검색하고, 그렇지 않으면 대/소문자를 구분하여 검색합니다.", + "search.globalFindClipboard": "macOS에서 Search Viewlet이 공유 클립보드 찾기를 읽거나 수정해야 할지를 제어합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json index b11c2573fb8..aa0416d884e 100644 --- a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json @@ -6,7 +6,12 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "global.scope": "(전역)", "global.1": "({0})", + "new.global": "새 전역 코드 조각 파일...", + "group.global": "기존 코드 조각", "new.global.sep": "새 코드 조각", + "openSnippet.pickLanguage": "코드 조각 파일 선택 또는 코드 조각 만들기", + "openSnippet.label": "사용자 코드 조각 구성", "preferences": "기본 설정" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index c906d3c152c..aab78fb22a4 100644 --- a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "전역 사용자 코드 조각", "source.snippet": "사용자 코드 조각" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json index 277890040f4..4bb4deec5c3 100644 --- a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json @@ -7,6 +7,7 @@ "Do not edit this file. It is machine generated." ], "invalid.path.0": "`contributes.{0}.path`에 문자열이 필요합니다. 제공된 값: {1}", + "invalid.language.0": "언어를 생략하는 경우 `contributes.{0}.path` 값은 `.code-snippets`-file이어야 합니다. 제공된 값: {1}", "invalid.language": "`contributes.{0}.language`에 알 수 없는 언어가 있습니다. 제공된 값: {1}", "invalid.path.1": "확장 폴더({2})에 포함할 `contributes.{0}.path`({1})가 필요합니다. 확장이 이식 불가능해질 수 있습니다.", "vscode.extension.contributes.snippets": "코드 조각을 적용합니다.", 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 00ebf63a54e..58e2a3a2594 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 @@ -21,6 +21,10 @@ "JsonSchema.tasks.terminal": "이 터미널 속성은 사용되지 않습니다. 프레젠테이션을 대신 사용하세요.", "JsonSchema.tasks.group.kind": "작업 실행 그룹입니다.", "JsonSchema.tasks.group.isDefault": "작업이 그룹 내 기본 작업에 있는지 정의합니다.", + "JsonSchema.tasks.group.defaultBuild": "이 작업을 기본 빌드 작업으로 표시합니다.", + "JsonSchema.tasks.group.defaultTest": "이 작업을 기본 테스트 작업으로 표시합니다.", + "JsonSchema.tasks.group.build": "이 작업을 '빌드 작업 실행' 명령을 통해 액세스 가능한 빌드 작업으로 표시합니다.", + "JsonSchema.tasks.group.test": "이 작업을 '테스트 작업 실행' 명령을 통해 액세스할 수 있는 테스트 작업으로 표시합니다.", "JsonSchema.tasks.group.none": "작업을 그룹에 할당 안 함", "JsonSchema.tasks.group": "이 작업을 할당할 실행 그룹을 정의합니다. 빌드 그룹에 추가를 위한 \"build'와 테스트 그룹에 추가를 위한 \"test\"를 지원합니다.", "JsonSchema.tasks.type": "작업이 프로세스로 실행되는지 또는 셸 내의 명령으로 실행되는지를 제어합니다.", 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 3e8e0df6db9..6b09571e558 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 @@ -15,21 +15,26 @@ "terminal.integrated.shellArgs.osx": "OS X 터미널에 있을 때 사용할 명령줄 인수입니다.", "terminal.integrated.shell.windows": "터미널이 Windows에서 사용하는 셸의 경로입니다. Windows와 함께 제공되는 셸을 사용하는 경우(cmd, PowerShell 또는 Ubuntu의 Bash)", "terminal.integrated.shellArgs.windows": "Windows 터미널에 있을 때 사용할 명령줄 인수입니다.", + "terminal.integrated.macOptionIsMeta": "macOS의 터미널에서 옵션 키를 메타 키로 처리합니다.", "terminal.integrated.rightClickCopyPaste": "설정하는 경우 터미널 내에서 마우스 오른쪽 단추를 클릭할 때 상황에 맞는 메뉴가 표시되지 않고 대신 선택 항목이 있으면 복사하고 선택 항목이 없으면 붙여넣습니다.", "terminal.integrated.copyOnSelection": "설정된 경우, 터미널에서 선택된 텍스트가 클립보드로 복사됩니다.", "terminal.integrated.fontFamily": "터미널의 글꼴 패밀리를 제어하며, 기본값은 editor.fontFamily의 값입니다.", "terminal.integrated.fontSize": "터미널의 글꼴 크기(픽셀)를 제어합니다.", "terminal.integrated.lineHeight": "터미널의 줄 높이를 제어합니다. 이 숫자에 터미널 글꼴 크기를 곱해 실제 줄 높이(픽셀)를 얻습니다.", + "terminal.integrated.fontWeight": "터미널 내에서 굵은 글꼴이 아닌 텍스트에 사용할 글꼴 두께입니다.", + "terminal.integrated.fontWeightBold": "터미널 내에서 굵은 글꼴 텍스트에 사용할 글꼴 두께입니다.", "terminal.integrated.cursorBlinking": "터미널 커서 깜박임 여부를 제어합니다.", "terminal.integrated.cursorStyle": "터미널 커서의 스타일을 제어합니다.", "terminal.integrated.scrollback": "터미널에서 버퍼에 유지하는 최대 줄 수를 제어합니다.", "terminal.integrated.setLocaleVariables": "로캘 변수가 터미널 시작 시 설정되는지 여부를 제어하며, 기본값은 OS X에서 true이고 기타 플랫폼에서 false입니다.", "terminal.integrated.cwd": "터미널이 시작될 명시적 시작 경로입니다. 셸 프로세스의 현재 작업 디렉터리(cwd)로 사용됩니다. 루트 디렉터리가 편리한 cwd가 아닌 경우 작업 영역 설정에서 특히 유용하게 사용할 수 있습니다.", "terminal.integrated.confirmOnExit": "끝낼 때 활성 터미널 세션이 있는지 확인할지 여부입니다.", + "terminal.integrated.enableBell": "터미널 벨의 사용 여부입니다.", "terminal.integrated.commandsToSkipShell": "키 바인딩이 셸에 전송되지 않고 항상 Code에서 처리되는 명령 ID 집합입니다. 따라서 셸에서 정상적으로 사용되어 터미널에 포커스가 없을 때와 동일하게 작동하는 키 바인딩을 사용할 수 있습니다(예: <Ctrl+P>를 사용하여 Quick Open 시작).", "terminal.integrated.env.osx": "OS X의 터미널이 사용하는 VS Code 프로세스에 추가될 환경 변수를 포함한 개체", "terminal.integrated.env.linux": "Linux의 터미널에서 사용할 VS Code 프로세스에 추가되는 환경 변수를 포함한 개체", "terminal.integrated.env.windows": "Windows의 터미널에서 사용할 VS Code 프로세스에 추가되는 환경 변수를 포함한 개체", + "terminal.integrated.showExitAlert": "종료 코드가 0이 아닌 경우 `터미널 프로세스가 종료 코드로 종료되었습니다` 경고를 표시합니다.", "terminalCategory": "터미널", "viewCategory": "보기" } \ 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 6963a938df5..dff61c0df6c 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 @@ -6,6 +6,9 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "terminal.integrated.a11yBlankLine": "빈 줄", + "terminal.integrated.a11yPromptLabel": "터미널 입력", + "terminal.integrated.a11yTooMuchOutput": "발표할 출력이 너무 많음, 읽을 행으로 수동 이동", "terminal.integrated.copySelection.noSelection": "터미널에 복사할 선택 항목이 없음", "terminal.integrated.exitedWithCode": "터미널 프로세스가 종료 코드 {0}(으)로 종료되었습니다.", "terminal.integrated.waitOnExit": "터미널을 닫으려면 아무 키나 누르세요.", diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json index 64da8fd9e1d..ec2ab7c2769 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -9,6 +9,7 @@ "terminal.integrated.chooseWindowsShellInfo": "사용자 지정 단추를 선택하여 기본 터미널 셸을 변경할 수 있습니다.", "customize": "사용자 지정", "cancel": "취소", + "never again": "다시 표시 안 함", "terminal.integrated.chooseWindowsShell": "기본으로 설정할 터미널 셸을 선택하세요. 나중에 설정에서 이 셸을 변경할 수 있습니다.", "terminalService.terminalCloseConfirmationSingular": "활성 터미널 세션이 있습니다. 종료할까요?", "terminalService.terminalCloseConfirmationPlural": "{0}개의 활성 터미널 세션이 있습니다. 종료할까요?" 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 e579df60c64..ae3e960954a 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 @@ -20,6 +20,9 @@ "noUpdatesAvailable": "현재 사용 가능한 업데이트가 없습니다.", "download now": "지금 다운로드", "thereIsUpdateAvailable": "사용 가능한 업데이트가 있습니다.", + "installUpdate": "업데이트 설치", + "updateAvailable": "사용 가능한 업데이트가 있습니다. {0} {1}", + "updateInstalling": "{0} {1}이(가) 백그라운드로 설치되고 있습니다. 완료되면 알려드리겠습니다.", "updateNow": "지금 업데이트", "updateAvailableAfterRestart": "다시 시작하면 {0}이(가) 업데이트됩니다.", "commandPalette": "명령 팔레트...", @@ -31,6 +34,7 @@ "checkForUpdates": "업데이트 확인...", "checkingForUpdates": "업데이트를 확인하는 중...", "DownloadingUpdate": "업데이트를 다운로드하는 중...", + "installUpdate...": "업데이트 설치...", "installingUpdate": "업데이트를 설치하는 중...", "restartToUpdate": "업데이트하기 위해 다시 시작..." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/kor/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 9d89b430675..7a7934c552f 100644 --- a/i18n/kor/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/kor/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -21,6 +21,7 @@ "workspaceConfig.name.description": "폴더에 대한 선택적 이름입니다.", "workspaceConfig.uri.description": "폴더 URI", "workspaceConfig.settings.description": "작업 영역 설정", + "workspaceConfig.launch.description": "작업 영역 시작 구성", "workspaceConfig.extensions.description": "작업 영역 확장", "unknownWorkspaceProperty": "알 수 없는 작업 영역 구성 속성" } \ 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 48dcb06e50f..4f7f21f665e 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 @@ -24,5 +24,6 @@ "keybindings.json.when": "키가 활성화되는 조건입니다.", "keybindings.json.args": "실행할 명령에 전달할 인수입니다.", "keyboardConfigurationTitle": "키보드", - "dispatch": "`code`(권장) 또는 `keyCode`를 사용하는 키 누름에 대한 디스패치 논리를 제어합니다." + "dispatch": "`code`(권장) 또는 `keyCode`를 사용하는 키 누름에 대한 디스패치 논리를 제어합니다.", + "touchbar.enabled": "사용 가능한 경우 키보드의 macOS Touch Bar 단추를 사용하도록 설정합니다." } \ No newline at end of file diff --git a/i18n/ptb/extensions/emmet/package.i18n.json b/i18n/ptb/extensions/emmet/package.i18n.json index 5db7a38967a..5e16d0b3e0a 100644 --- a/i18n/ptb/extensions/emmet/package.i18n.json +++ b/i18n/ptb/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "Uma lista separada por vírgulas de nomes de atributo que deve existir em abreviações para o filtro de comentário a ser aplicado", "emmetPreferencesFormatNoIndentTags": "Uma matriz de nomes de abas que não devem ter recuo interno", "emmetPreferencesFormatForceIndentTags": "Uma matriz de nomes de abas que deve sempre devem ter recuo interno", - "emmetPreferencesAllowCompactBoolean": "Se verdadeiro, a notação compacta de atributos booleanos são produzidos" + "emmetPreferencesAllowCompactBoolean": "Se verdadeiro, a notação compacta de atributos booleanos são produzidos", + "emmetPreferencesCssWebkitProperties": "Propriedades css separadas por vírgula que obtém o prefixo do fornecedor webkit quando usadas em abreviações emmet que começam com `-`. Deixe vazio para prevenir o prefixo webkit sempre.", + "emmetPreferencesCssMozProperties": "Propriedades css separadas por vírgula que obtém o prefixo do fornecedor moz quando usadas em abreviações emmet que começam com `-`. Deixe vazio para prevenir o prefixo moz sempre.", + "emmetPreferencesCssOProperties": "Propriedades css separadas por vírgula que obtém o prefixo do fornecedor 'o' quando usadas em abreviações emmet que começam com `-`. Deixe vazio para prevenir o prefixo 'o' sempre.", + "emmetPreferencesCssMsProperties": "Propriedades css separadas por vírgula que obtém o prefixo do fornecedor ms quando usadas em abreviações emmet que começam com `-`. Deixe vazio para prevenir o prefixo ms sempre." } \ 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 0e3ae33fa0e..c27be95a183 100644 --- a/i18n/ptb/extensions/git/out/commands.i18n.json +++ b/i18n/ptb/extensions/git/out/commands.i18n.json @@ -12,12 +12,14 @@ "repourl": "URL do repositório", "parent": "Diretório pai", "cancel": "$(sync~spin) Clonando o repositório... Clique para cancelar", + "cancel tooltip": "Cancelar o clone", "cloning": "Clonando repositório do Git...", "openrepo": "Abrir Repositório", "proposeopen": "Gostaria de abrir o repositório clonado?", "init": "Escolher a pasta de trabalho para inicializar o git repo", "init repo": "Inicializar Repositório", "create repo": "Inicializar Repositório", + "are you sure": "Isto irá criar um repositório Git em '{0}'. Tem certeza que deseja continuar?", "HEAD not available": "Versão HEAD de '{0}' não está disponível.", "confirm stage files with merge conflicts": "Tem certeza que deseja processar {0} arquivos com conflitos de mesclagem?", "confirm stage file with merge conflicts": "Tem certeza que deseja processar {0} com conflitos de mesclagem?", @@ -26,6 +28,7 @@ "revert": "Reverter as alterações", "discard": "Descartar alterações", "confirm delete": "Tem certeza que deseja EXCLUIR {0}?", + "delete file": "Excluir arquivo", "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?", "warn untracked": "Isso irá excluir {0} registros não rastreados!", @@ -33,6 +36,8 @@ "confirm discard all": "Tem certeza que deseja descartar todas as alterações em {0} arquivos?\nIsso é IRREVERSíVEL!\nO conjunto de trabalhando atual será PERDIDO PARA SEMPRE.", "discardAll multiple": "Descartar 1 Arquivo", "discardAll": "Descartar Todos os {0} Arquivos", + "confirm delete multiple": "Tem certeza que deseja EXCLUIR {0} arquivos?", + "delete files": "Excluir arquivos", "there are untracked files single": "O seguinte arquivo não controlado será excluído do disco se descartado: {0}.", "there are untracked files": "Existem {0} arquivos não controlados que serão excluídos do disco se descartados.", "confirm discard all 2": "{0}\n\n é IRREVERSÍVEL, o conjunto de trabalho atual será PERDIDO PARA SEMPRE.", @@ -54,10 +59,12 @@ "confirm force delete branch": "A ramificação '{0}' não foi totalmente mesclada. Excluir mesmo assim?", "delete branch": "Excluir ramificação", "invalid branch name": "Nome da ramificação inválido.", + "branch already exists": "Um ramo chamado '{0}' já existe", "select a branch to merge from": "Selecione uma ramificação para mesclar", "merge conflicts": "Existem conflitos de mesclagem. Resolva-os antes de confirmar.", "tag name": "Nome do rótulo", "provide tag name": "Por favor, forneça um nome de Tag", + "tag message": "Mensagem", "provide tag message": "Por favor, forneça uma mensagem para comentar o rótulo", "no remotes to fetch": "Este repositório não possui remotos configurados para buscar algo", "no remotes to pull": "O seu repositório não possui remotos configurados para efetuar pull.", @@ -71,6 +78,7 @@ "sync is unpredictable": "Esta ação vai fazer push e pull nos commits de e para '{0}'.", "never again": "OK, Não Mostrar Novamente", "no remotes to publish": "Seu repositório não possui remotos configurados para publicação.", + "no changes stash": "Não há nenhuma mudança para esconder.", "provide stash message": "Opcionalmente forneça uma mensagem para esconder.", "stash message": "Mensagem oculta", "no stashes": "Não há esconderijos para restaurar.", diff --git a/i18n/ptb/extensions/git/out/main.i18n.json b/i18n/ptb/extensions/git/out/main.i18n.json index 6236df1b2fc..4d1a91d6f32 100644 --- a/i18n/ptb/extensions/git/out/main.i18n.json +++ b/i18n/ptb/extensions/git/out/main.i18n.json @@ -6,6 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "looking": "Procurando pelo git em: {0}", "using git": "Usando git {0} de {1}", "downloadgit": "Baixar o Git", "neverShowAgain": "Não mostrar novamente", diff --git a/i18n/ptb/extensions/git/out/model.i18n.json b/i18n/ptb/extensions/git/out/model.i18n.json index f6eebe27271..d15bf0fdcf0 100644 --- a/i18n/ptb/extensions/git/out/model.i18n.json +++ b/i18n/ptb/extensions/git/out/model.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "no repositories": "Não existem repositórios disponíveis" + "no repositories": "Não existem repositórios disponíveis", + "pick repo": "Escolha um repositório" } \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/repository.i18n.json b/i18n/ptb/extensions/git/out/repository.i18n.json index 983c5d1d8cc..de9d848c8ae 100644 --- a/i18n/ptb/extensions/git/out/repository.i18n.json +++ b/i18n/ptb/extensions/git/out/repository.i18n.json @@ -7,12 +7,22 @@ "Do not edit this file. It is machine generated." ], "open": "Abrir", + "index modified": "Índice Modificado", "modified": "Modificado", + "index added": "Índice Adicionado", + "index deleted": "Índice Excluído", "deleted": "Excluído", + "index renamed": "Índice Renomeado", + "index copied": "Índice Copiado", "untracked": "Não acompanhado", "ignored": "Ignorado", "both deleted": "Ambos Excluídos", + "added by us": "Adicionado Por Nós", + "deleted by them": "Excluído Por Eles", + "added by them": "Adicionado Por Eles", + "deleted by us": "Excluído Por Nós", "both added": "Ambos adicionados", + "both modified": "Ambos Modificados", "commitMessage": "Mensagem (tecle {0} para confirmar)", "commit": "Confirmar", "merge changes": "Mesclar Alterações", diff --git a/i18n/ptb/extensions/git/package.i18n.json b/i18n/ptb/extensions/git/package.i18n.json index 9a2e18d19d1..c227444506d 100644 --- a/i18n/ptb/extensions/git/package.i18n.json +++ b/i18n/ptb/extensions/git/package.i18n.json @@ -73,6 +73,8 @@ "config.decorations.enabled": "Controla se o Git contribui cores e emblemas para o explorer e visualizador de editores abertos.", "config.promptToSaveFilesBeforeCommit": "Controla se o Git deve verificar arquivos não salvos antes do Commit.", "config.showInlineOpenFileAction": "Controla se deve mostrar uma ação Abrir Arquivo em linha na visualização de alterações do Git.", + "config.inputValidation": "Controla quando mostrar a validação de entrada no contador de entrada.", + "config.detectSubmodules": "Controla se deve detectar automaticamente os sub-módulos do git.", "colors.modified": "Cor para recursos modificados.", "colors.deleted": "Cor para recursos excluídos.", "colors.untracked": "Cor para recursos não controlados.", diff --git a/i18n/ptb/extensions/jake/out/main.i18n.json b/i18n/ptb/extensions/jake/out/main.i18n.json index 35229bd6699..3311ea5fa59 100644 --- a/i18n/ptb/extensions/jake/out/main.i18n.json +++ b/i18n/ptb/extensions/jake/out/main.i18n.json @@ -5,5 +5,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." - ] + ], + "execFailed": "Auto detecção de Jake para pasta {0} falhou com o erro: {1}" } \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/commands.i18n.json b/i18n/ptb/extensions/markdown/out/commands.i18n.json index b72e8b907d6..7016ff845a8 100644 --- a/i18n/ptb/extensions/markdown/out/commands.i18n.json +++ b/i18n/ptb/extensions/markdown/out/commands.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "previewTitle": "Visualização {0}", "onPreviewStyleLoadError": "Não foi possível carregar o 'markdown.styles': {0}" } \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/features/previewContentProvider.i18n.json b/i18n/ptb/extensions/markdown/out/features/previewContentProvider.i18n.json index 9af87ac0da6..604c6ffae93 100644 --- a/i18n/ptb/extensions/markdown/out/features/previewContentProvider.i18n.json +++ b/i18n/ptb/extensions/markdown/out/features/previewContentProvider.i18n.json @@ -6,5 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "preview.securityMessage.title": "Conteúdo potencialmente inseguro foi desativado na visualização de remarcação. Altere a configuração de segurança de visualização do Markdown para permitir conteúdo inseguro ou habilitar scripts" + "preview.securityMessage.text": "Algum conteúdo foi desativado neste documento", + "preview.securityMessage.title": "Conteúdo potencialmente inseguro foi desativado na visualização de remarcação. Altere a configuração de segurança de visualização do Markdown para permitir conteúdo inseguro ou habilitar scripts", + "preview.securityMessage.label": "Conteúdo do Aviso de Segurança Desativado" } \ 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 index e8aa71537e2..ed697341a9e 100644 --- a/i18n/ptb/extensions/markdown/out/security.i18n.json +++ b/i18n/ptb/extensions/markdown/out/security.i18n.json @@ -6,11 +6,15 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "strict.title": "Estrita", "strict.description": "Somente carregar conteúdo seguro", "insecureContent.title": "Permitir conteúdo inseguro", + "insecureContent.description": "Habilitar o carregamento de conteúdo sobre http", "disable.title": "Desabilitar", "disable.description": "Permitir a execução de conteúdo e scripts. Não recomendado", "moreInfo.title": "Mais informações", "enableSecurityWarning.title": "Habilitar a visualização de avisos de segurança neste espaço de trabalho", - "disableSecurityWarning.title": "Desabilitar a visualização de avisos de segurança neste espaço de trabalho" + "disableSecurityWarning.title": "Desabilitar a visualização de avisos de segurança neste espaço de trabalho", + "toggleSecurityWarning.description": "Não afeta o nível de segurança de conteúdo", + "preview.showPreviewSecuritySelector.title": "Selecione as configurações de segurança para visualizações de Markdown neste espaço de trabalho" } \ No newline at end of file diff --git a/i18n/ptb/extensions/npm/out/main.i18n.json b/i18n/ptb/extensions/npm/out/main.i18n.json index 35229bd6699..187a3c1e190 100644 --- a/i18n/ptb/extensions/npm/out/main.i18n.json +++ b/i18n/ptb/extensions/npm/out/main.i18n.json @@ -5,5 +5,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." - ] + ], + "npm.parseError": "Deteção de tarefa NPM: falha ao analisar o arquivo {0}" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/ptb/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index 6c1e3e438e5..ac8dfbea044 100644 --- a/i18n/ptb/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/ptb/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -6,6 +6,13 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "previewOnGitHub": "Pré-visualizar no GitHub", + "similarIssues": "Problemas semelhantes", "noResults": "Nenhum resultado encontrado", - "description": "Descrição" + "rateLimited": "Taxa de limite da API excedida", + "stepsToReproduce": "Etapas para Reproduzir", + "bugDescription": "Como você encontrou este problema? Quais são as etapas que você precisa realizar para reproduzir de forma confiável o problema? O que você espera que acontece e o que acontece no momento?", + "performanceIssueDesciption": "Quando este problema de performance aconteceu? Por exemplo, isto ocorre na inicialização ou após uma certa série de ações? Qualquer detalhe que você puder nos dar ajuda na nossa investigação.", + "description": "Descrição", + "disabledExtensions": "Extensões estão desabilitadas" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/ptb/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 35229bd6699..ba6304224cc 100644 --- a/i18n/ptb/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/ptb/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -5,5 +5,25 @@ "Licensed under the MIT License. See License.txt in the project root for license information.", "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." - ] + ], + "completeInEnglish": "Por favor, preencha o formulário em inglês.", + "issueTypeLabel": "Eu quero enviar um", + "bugReporter": "Relatório de Bug", + "performanceIssue": "Problema de Performance", + "featureRequest": "Solicitação de recurso", + "issueTitleLabel": "Título", + "issueTitleRequired": "Por favor, digite um título.", + "vscodeVersion": "Versão do VS Code", + "osVersion": "Versão do sistema operacional", + "systemInfo": "Minhas Informações do Sistema", + "sendData": "Enviar meus dados", + "processes": "Processos Atualmente em Execução", + "workspaceStats": "Minhas Estatísticas do Espaço de Trabalho", + "extensions": "Minhas extensões", + "tryDisablingExtensions": "O problema é reprodutível quando as extensões são desativados", + "disableExtensions": "desabilitando todas as extensões e recarregando a janela", + "showRunningExtensions": "ver todas as extensões em execução", + "githubMarkdown": "Nós suportamos Markdown no padrão GitHub. Você poderá editar o seu problema e adicionar capturas de tela quando nós o pré-visualizarmos no GitHub.", + "issueDescriptionRequired": "Por favor, digite uma descrição.", + "loadingData": "Carregando dados..." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/logUploader.i18n.json b/i18n/ptb/src/vs/code/electron-main/logUploader.i18n.json index 35229bd6699..7d2a0454290 100644 --- a/i18n/ptb/src/vs/code/electron-main/logUploader.i18n.json +++ b/i18n/ptb/src/vs/code/electron-main/logUploader.i18n.json @@ -5,5 +5,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." - ] + ], + "invalidEndpoint": "Destino para envio do log é inválido.", + "beginUploading": "Enviando...", + "didUploadLogs": "Envio bem-sucedido! ID do arquivo de Log: {0}", + "userDeniedUpload": "Envio cancelado", + "logUploadPromptHeader": "Enviar logs de sessão para um destino seguro?", + "logUploadPromptBody": "Por favor revise seus arquivos de log aqui: '{0}'", + "logUploadPromptBodyDetails": "Os logs podem conter informações pessoais, como caminhos completos e o conteúdo do arquivo.", + "logUploadPromptKey": "Eu revi meus logs (digite 'y' para confirmar o envio)", + "postError": "Erro ao postar logs: {0}", + "responseError": "Erro ao postar logs. Recebido {0} — {1}", + "parseError": "Erro ao analisar a resposta", + "zipError": "Erro ao zipar logs: {0}" } \ 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 154a6fdf47c..48234ffe3c8 100644 --- a/i18n/ptb/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json @@ -90,6 +90,7 @@ "miMarker": "&&Problemas", "miAdditionalViews": "&&Visualizações Adicionais", "miCommandPalette": "&&Paleta de comando", + "miOpenView": "&&Abrir Visualização...", "miToggleFullScreen": "Alternar &&Tela Inteira", "miToggleZenMode": "Alternar modo Zen", "miToggleMenuBar": "Alternar &&Barra de Menus", @@ -184,6 +185,7 @@ "miCheckingForUpdates": "Verificando Atualizações...", "miDownloadUpdate": "Baixar Atualização Disponível", "miDownloadingUpdate": "Baixando Atualização...", + "miInstallUpdate": "Instalar Atualização...", "miInstallingUpdate": "Instalando Atualização...", "miRestartToUpdate": "Reinicie para Atualizar...", "aboutDetail": "Versão {0}\nConfirmação {1}\nData {2}\nShell {3}\nRenderizador {4}\nNó {5}\nArquitetura {6}", 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 99e86baf79a..d31266adb34 100644 --- a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -68,6 +68,8 @@ "wordBasedSuggestions": "Controla se o auto-completar deve ser calculado baseado nas palavras no documento.", "suggestSelection.first": "Escolha sempre a primeira sugestão.", "suggestSelection.recentlyUsed": "Selecionar sugestões recentes, a menos que digitações adicionais selecionem um, por exemplo, 'console.| -> console. log ' porque 'log' foi concluída recentemente.", + "suggestSelection.recentlyUsedByPrefix": "Selecionar sugestões baseadas em prefixos anteriores que completaram essas sugestões, por exemplo, 'co-> console' e 'con-> const'.", + "suggestSelection": "Controla como as sugestões são pré-selecionados quando estiver mostrando a lista de sugestões.", "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", diff --git a/i18n/ptb/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/ptb/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json index 9258e9e64b5..0dc34aa3b7c 100644 --- a/i18n/ptb/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json +++ b/i18n/ptb/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -8,5 +8,6 @@ ], "quickFixWithKb": "Mostrar correções ({0})", "quickFix": "Mostrar correções", - "quickfix.trigger.label": "Correção Rápida" + "quickfix.trigger.label": "Correção Rápida", + "refactor.label": "Refatorar" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/list/browser/listService.i18n.json b/i18n/ptb/src/vs/platform/list/browser/listService.i18n.json index 5c542087a0c..0d4902c10e2 100644 --- a/i18n/ptb/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/ptb/src/vs/platform/list/browser/listService.i18n.json @@ -8,5 +8,9 @@ ], "workbenchConfigurationTitle": "Área de Trabalho", "multiSelectModifier.ctrlCmd": "Mapeia para 'Control' no Windows e Linux e para 'Command' no macOS.", - "multiSelectModifier.alt": "Mapeia para 'Alt' no Windows e Linux e 'Option' no macOS." + "multiSelectModifier.alt": "Mapeia para 'Alt' no Windows e Linux e 'Option' no macOS.", + "multiSelectModifier": "O modificador deve ser usado para adicionar um item nas listas e árvores para uma multi-seleção com o mouse (por exemplo, no explorador, editores abertos e exibição scm). 'ctrlCmd' mapeia para 'Control' no Windows e Linux e 'Command' no macOS. Os gestos do mouse 'Aberto ao lado' - se suportado - irá adaptar-se de tal forma que eles não entrem em conflito com o modificador de várias seleções.", + "openMode.singleClick": "Abre os itens em um único clique do mouse.", + "openMode.doubleClick": "Abre os itens com duplo clique do mouse. ", + "openModeModifier": "Controla como abrir itens em árvores e listas usando o mouse (se suportado). Definido como 'singleClick' para abrir itens com um único clique do mouse e 'doubleClick' para abrir somente através do duplo clique do mouse. Para os pais com filhos em árvores, essa configuração controla se um único clique expande o pai ou um clique duplo. Note que algumas árvores e listas podem optar por ignorar essa configuração, se não for aplicável. " } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json index 35229bd6699..c4a05f29269 100644 --- a/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json +++ b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "folderStatusMessageAddSingleFolder": "Extensão '{0}' adicionou 1 pasta no espaço de trabalho", + "folderStatusMessageAddMultipleFolders": "Extensão '{0}' adicionou {1} pastas no espaço de trabalho", + "folderStatusMessageRemoveSingleFolder": "Extensão '{0}' removeu 1 pasta do espaço de trabalho.", + "folderStatusMessageRemoveMultipleFolders": "Extensão '{0}' removeu {1} pasta do espaço de trabalho.", + "folderStatusChangeFolder": "Extensão '{0}' mudou pastas do espaço de trabalho" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/node/extHostWorkspace.i18n.json b/i18n/ptb/src/vs/workbench/api/node/extHostWorkspace.i18n.json index 35229bd6699..8275b3b7079 100644 --- a/i18n/ptb/src/vs/workbench/api/node/extHostWorkspace.i18n.json +++ b/i18n/ptb/src/vs/workbench/api/node/extHostWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "updateerror": "Extensão '{0}' falhou ao atualizar pastas do espaço de trabalho: {1}" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index 0e2720fc721..bfe39400384 100644 --- a/i18n/ptb/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,7 +11,9 @@ "sizeMB": "{0}MB", "sizeGB": "{0}GB", "sizeTB": "{0}TB", + "largeImageError": "O tamanho do arquivo da imagem é muito grande (>1MB) para exibir 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.", + "zoom.action.fit.label": "Toda a imagem", "imgMeta": "{0}x{1} {2}" } \ 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 11981b2a3b0..8e0fd4bd710 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 @@ -35,9 +35,11 @@ "panelDefaultLocation": "Controla o local padrão do painel. Pode ser visualizado na parte inferior ou no lado direito 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.", + "fontAliasing": "Controla o método de aliasing da fonte na área de trabalho.\n- default: Suavização de fonte por Sub-pixel. Na maioria das telas não-retina, este fornecerá o texto mais nítido\n- antialiased: Suavização da fontes no nível do pixel, oposto ao subpixel. Pode fazer a fonte parecer mais fina/clara no geral.\n- none: Desabilita a suavização de fonte. O texto será mostrado com bordas pixeladas.\n- auto: Aplica `default` ou `antialiased` automaticamente baseado no DPI das telas.", "workbench.fontAliasing.default": "Suavização de fonte subpixel. Na maioria dos monitores não-retina isto mostrará o texto mais nítido.", "workbench.fontAliasing.antialiased": "Suavizar a fonte no nível do pixel, em oposição a subpixel. Pode fazer com que a fonte apareça mais clara de uma forma geral.", "workbench.fontAliasing.none": "Desabilita a suavização de fonte. Texto será mostrado com bordas irregulares.", + "workbench.fontAliasing.auto": "Aplica `default` ou `antialiased` automaticamente, baseado no DPI das telas.", "enableNaturalLanguageSettingsSearch": "Controla se deve habilitar o modo de busca de linguagem natural para as configurações.", "windowConfigurationTitle": "Janela", "window.openFilesInNewWindow.on": "Arquivos serão abertos em uma nova janela", 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 index 2295e891db0..6d03421bc47 100644 --- 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 @@ -32,8 +32,12 @@ "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.", + "useUniqueNames": "Por favor, use nomes únicos de configuração.", + "app.launch.json.compound.folder": "Nome da pasta em que o composto se encontra.", "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'.", "selectDebug": "Selecione o ambiente", - "DebugConfig.failed": "Não é possível criar o arquivo 'launch.json' dentro da pasta '.vscode' ({0})." + "DebugConfig.failed": "Não é possível criar o arquivo 'launch.json' dentro da pasta '.vscode' ({0}).", + "workspace": "espaço de trabalho", + "user settings": "configurações de usuário" } \ 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 7ae697429f6..4b9589da38d 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 @@ -13,6 +13,9 @@ "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.", + "noConfigurationNameInWorkspace": "Não foi possível encontrar a configuração de inicialização '{0}' na área de trabalho.", + "multipleConfigurationNamesInWorkspace": "Existem várias configurações de inicialização `{0}` na área de trabalho. Use o nome da pasta para qualificar a configuração.", + "noFolderWithName": "Não é possível encontrar a pasta com nome '{0}' para configuração '{1}' no composto '{2}'.", "configMissing": "Configuração '{0}' não tem 'launch.json'.", "launchJsonDoesNotExist": "'launch.json' não existe.", "debugRequestNotSupported": "Atributo '{0}' tem um valor sem suporte '{1}' na configuração de depuração escolhida.", @@ -23,6 +26,7 @@ "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", + "showErrors": "Mostrar erros", "cancel": "Cancelar", "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.", "DebugTaskNotFound": "Não foi possível encontrar o preLaunchTask '{0}'.", 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 93bffeeb478..a52b1047cff 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 @@ -33,6 +33,10 @@ "view id": "ID", "view name": "Nome", "view location": "Onde", + "localizations": "Localizações ({0})", + "localizations language id": "Id do Idioma", + "localizations language name": "Nome do Idioma", + "localizations localized language name": "Nome do Idioma (Localizado)", "colorThemes": "Temas de cores ({0})", "iconThemes": "Temas de ícones ({0})", "colors": "Cores ({0})", 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 b1834cc7440..8b2c7c944f0 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 @@ -52,6 +52,8 @@ "configureWorkspaceRecommendedExtensions": "Configurar Extensões Recomendadas (Espaço de Trabalho)", "configureWorkspaceFolderRecommendedExtensions": "Configurar as Extensões Recomendadas (Pasta do Espaço de Trabalho)", "builtin": "Intrínseco", + "malicious tooltip": "Esta extensão foi relatada como problemática.", + "malicious": "Malicioso", "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", diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 2094165fc60..be23328ded4 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "noPro": "Para extensões de perfil, inicie com `--inspect-extensions=<port>`.", "selectAndStartDebug": "Clique para parar a perfilação." } \ 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 index f408e23113a..5e7b74b3f19 100644 --- 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 @@ -11,6 +11,7 @@ "workspaceRecommendation": "Esta extensão é recomendada pelos usuários da área de trabalho atual.", "fileBasedRecommendation": "Esta extensão é recomendada baseada nos arquivos que você abriu recentemente.", "exeBasedRecommendation": "Esta extensão é recomendada porque você tem {0} instalado.", + "dynamicWorkspaceRecommendation": "Esta extensão pode lhe interessar porque muitos outros usuários da área de trabalho atual o usam.", "reallyRecommended2": "A extensão {0} é recomendada para este tipo de arquivo.", "reallyRecommendedExtensionPack": "O pacote de extensão '{0}' é recomendado para este tipo de arquivo.", "showRecommendations": "Mostrar Recomendações", 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 index 8bca69e9d6f..963936e2ac1 100644 --- 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 @@ -19,5 +19,6 @@ "suggestProxyError": "A Loja retornou 'ECONNREFUSED'. Por favor, verifique a configuração de 'http.proxy'.", "extensions": "Extensões", "outdatedExtensions": "{0} Extensões Desatualizadas", + "malicious warning": "Nós desinstalamos '{0}' qual foi reportado ser problemático.", "reloadNow": "Recarregar Agora" } \ 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 index af4d27f2511..8a0b641b61a 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -7,6 +7,8 @@ "Do not edit this file. It is machine generated." ], "installingVSIXExtension": "Instalando extensão do VSIX...", + "malicious": "Esta extensão é relatada como problemática.", + "installingMarketPlaceExtension": "Instalando extensão da Loja...", "uninstallingExtension": "Desinstalando extensão...", "enableDependeciesConfirmation": "Habilitando '{0}' também habilita suas dependências. Gostaria de continuar?", "enable": "Sim", diff --git a/i18n/ptb/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index 55df51eb748..0d7d41515ed 100644 --- a/i18n/ptb/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -8,10 +8,12 @@ ], "openLogsFolder": "Abrir Pasta de Logs", "showLogs": "Exibir Logs...", + "rendererProcess": "Janela ({0})", "emptyWindow": "Janela", "extensionHost": "Host de Extensão", "sharedProcess": "Compartilhado", "mainProcess": "Principal", + "selectProcess": "Selecione o Log para o processo", "openLogFile": "Abrir Arquivo de Log...", "setLogLevel": "Definir Nível de Log", "trace": "Rastreamento", @@ -22,5 +24,7 @@ "critical": "Crítico", "off": "Desligado", "selectLogLevel": "Selecione o nível de log", - "default": "Valor padrão" + "default and current": "Padrão & Atual", + "default": "Valor padrão", + "current": "Atual" } \ 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 index 0823852bb72..4d49c59b072 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -17,6 +17,7 @@ "addLabel": "Adicionar Keybinding", "removeLabel": "Remover Keybinding", "resetLabel": "Redefinir Keybinding", + "showSameKeybindings": "Mostras as Mesmas Keybindings", "copyLabel": "Copiar", "copyCommandLabel": "Copiar Comando", "error": "Erro '{0}' enquanto edita keybinding. Por favor, abra o arquivo 'keybindings.json' e verifique.", 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 index 292914da17b..1c1c058a5fd 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -10,6 +10,8 @@ "SearchSettingsWidget.AriaLabel": "Configurações de Pesquisa", "SearchSettingsWidget.Placeholder": "Configurações de Pesquisa", "noSettingsFound": "Nenhum resultado", + "oneSettingFound": "1 Configuração Encontrada", + "settingsFound": "{0} Configurações Encontradas", "totalSettingsMessage": "Total {0} Configurações", "nlpResult": "Resultados da Linguagem Natural", "filterResult": "Resultados Filtrados", 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 index e7fbef22668..bc9c2cc2216 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -9,6 +9,7 @@ "emptyUserSettingsHeader": "Coloque as suas configurações aqui para substituir as configurações padrão.", "emptyWorkspaceSettingsHeader": "Coloque as suas configurações aqui para substituir as configurações de usuário.", "emptyFolderSettingsHeader": "Coloque as suas configurações de pasta aqui para substituir aqueles das configurações do espaço de trabalho.", + "newExtensionLabel": "Mostrar Extensão \"{0}\"", "editTtile": "Editar", "replaceDefaultValue": "Substituir nas Configurações", "copyDefaultValue": "Copiar para Configurações", 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 index a893064e612..31c522acb51 100644 --- a/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -18,6 +18,7 @@ "RefreshAction.label": "Atualizar", "CollapseDeepestExpandedLevelAction.label": "Recolher tudo", "ClearSearchResultsAction.label": "Limpar", + "CancelSearchAction.label": "Cancelar Pesquisa", "FocusNextSearchResult.label": "Focalizar o Próximo Resultado da Pesquisa", "FocusPreviousSearchResult.label": "Focalizar o Resultado da Pesquisa Anterior", "RemoveAction.label": "Ignorar", diff --git a/i18n/ptb/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index c195bbf66f5..1393b247186 100644 --- a/i18n/ptb/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -24,5 +24,6 @@ "useIgnoreFiles": "Controla se utiliza arquivos .gitignore e .ignore por padrão ao fazer pesquisas de arquivos.", "search.quickOpen.includeSymbols": "Configurar para incluir resultados de uma pesquisa símbolo global nos resultados do arquivo para Abertura Rápida.", "search.followSymlinks": "Controla quando seguir symlinks ao realizar uma busca.", - "search.smartCase": "Faz pesquisas do tipo case-insensitive se o termo for totalmente minúsculo, caso contrário, faz pesquisas do tipo case-sensitive." + "search.smartCase": "Faz pesquisas do tipo case-insensitive se o termo for totalmente minúsculo, caso contrário, faz pesquisas do tipo case-sensitive.", + "search.globalFindClipboard": "Controla se a ferramenta Pesquisa deve ler ou modificar a área de transferência de localização compartilhada no macOS" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index dd87289f12f..338e6baa050 100644 --- a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "Trecho de Código Global do Usuário", "source.snippet": "Trecho de código do usuário" } \ 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 46dfeebc8bc..36d63910548 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 @@ -21,6 +21,10 @@ "JsonSchema.tasks.terminal": "A propriedade terminal é obsoleta. Use presentation em seu lugar.", "JsonSchema.tasks.group.kind": "Grupo de execução da tarefa.", "JsonSchema.tasks.group.isDefault": "Define-se essa tarefa é a tarefa do padrão do grupo.", + "JsonSchema.tasks.group.defaultBuild": "Marca a tarefa como a tarefa de compilação padrão.", + "JsonSchema.tasks.group.defaultTest": "Marca a tarefa como a tarefa de teste padrão.", + "JsonSchema.tasks.group.build": "Marca a tarefa como uma tarefa de compilação acessível através do comando 'Executar Tarefa de Compilação'.", + "JsonSchema.tasks.group.test": "Marca a tarefa como uma tarefa de teste acessível através do comando 'Executar Tarefa de Teste'.", "JsonSchema.tasks.group.none": "Atribui a tarefa para nenhum grupo", "JsonSchema.tasks.group": "Define a que grupo de execução desta tarefa pertence. Suporta \"build\" para adicioná-lo ao grupo de compilação e \"test\" para adicioná-lo ao grupo de teste.", "JsonSchema.tasks.type": "Define quando a tarefa é executada como um processo ou como um comando dentro do shell.", 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 index 488a2ef16e8..5b52e9f9a12 100644 --- 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 @@ -21,12 +21,15 @@ "terminal.integrated.fontFamily": "Controla a família de fontes do terminal, este padrão é o valor do editor.fontFamily.", "terminal.integrated.fontSize": "Controla o tamanho da fonte em pixels do terminal.", "terminal.integrated.lineHeight": "Controla a altura da linha do terminal, este número é multiplicado pelo tamanho da fonte do terminal para obter a altura real da linha em pixels.", + "terminal.integrated.fontWeight": "A espessura da fonte a usar no terminal para textos não-negritos.", + "terminal.integrated.fontWeightBold": "A espessura da fonte a ser usada no terminal para texto em negrito.", "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.enableBell": "Se o sino do terminal está habilitado ou não.", "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.integrated.env.osx": "Objeto com variáveis de ambiente que serão adicionadas ao VS Code e utilizadas pelo terminal no Mac OS X", "terminal.integrated.env.linux": "Objeto com variáveis de ambiente que serão adicionadas ao VS Code e utilizadas pelo terminal no Linux", 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 fac36990a6e..c10ece55c3c 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 @@ -6,6 +6,9 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "terminal.integrated.a11yBlankLine": "Linha em branco", + "terminal.integrated.a11yPromptLabel": "Entrada do terminal", + "terminal.integrated.a11yTooMuchOutput": "Muita saída para anunciar, navegue até as linhas manualmente para ler", "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", 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 index 4be73852e28..a07ea36500c 100644 --- 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 @@ -8,5 +8,6 @@ ], "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." + "updateChannel": "Configurar se você recebe atualizações automáticas de um canal de atualização. Requer uma reinicialização depois da mudança.", + "enableWindowsBackgroundUpdates": "Ativa as atualizações no plano de fundo no Windows." } \ 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 index 0079d5ea17d..e9f37d81d12 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 @@ -20,6 +20,9 @@ "noUpdatesAvailable": "Não há nenhuma atualização disponível.", "download now": "Baixar agora", "thereIsUpdateAvailable": "Há uma atualização disponível.", + "installUpdate": "Instalar Atualização", + "updateAvailable": "Há uma atualização disponível: {0} {1}", + "updateInstalling": "{0} {1} está sendo instalado no plano de fundo, nós te avisaremos quando estiver pronto.", "updateNow": "Atualizar Agora", "updateAvailableAfterRestart": "{0} será atualizado após reiniciar.", "commandPalette": "Paleta de comandos...", @@ -31,6 +34,7 @@ "checkForUpdates": "Verificar atualizações...", "checkingForUpdates": "Verificando Atualizações...", "DownloadingUpdate": "Baixando Atualização...", + "installUpdate...": "Instalar Atualização...", "installingUpdate": "Instalando Atualização...", "restartToUpdate": "Reinicie para Atualizar..." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/ptb/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 322b60d8d1d..6f4f8c59178 100644 --- a/i18n/ptb/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/ptb/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -21,6 +21,7 @@ "workspaceConfig.name.description": "Um nome opcional para a pasta. ", "workspaceConfig.uri.description": "URI da pasta", "workspaceConfig.settings.description": "Configurações de espaço de trabalho", + "workspaceConfig.launch.description": "Configurações de inicialização do espaço de trabalho", "workspaceConfig.extensions.description": "Extensões para o espaço de trabalho", "unknownWorkspaceProperty": "Propriedade de configuração do espaço de trabalho desconhecida" } \ No newline at end of file diff --git a/i18n/rus/extensions/emmet/package.i18n.json b/i18n/rus/extensions/emmet/package.i18n.json index 271852db3ea..1371e1159a9 100644 --- a/i18n/rus/extensions/emmet/package.i18n.json +++ b/i18n/rus/extensions/emmet/package.i18n.json @@ -54,5 +54,9 @@ "emmetPreferencesFilterCommentTrigger": "Разделителями запятыми список имен атрибутов, которые должны присутствовать в сокращении для применения фильтра комментария", "emmetPreferencesFormatNoIndentTags": "Массив имен тегов, для которых не следует использовать внутренние отступы", "emmetPreferencesFormatForceIndentTags": "Массив имен тегов, для которых всегда следует использовать внутренние отступы", - "emmetPreferencesAllowCompactBoolean": "Если этот параметр имеет значение true, формируется компактная запись логических атрибутов" + "emmetPreferencesAllowCompactBoolean": "Если этот параметр имеет значение true, формируется компактная запись логических атрибутов", + "emmetPreferencesCssWebkitProperties": "Разделенный запятыми список свойств CSS, которые получают префикс разработчика веб-пакета при использовании в сокращениях Emmet, которые начинаются с \"-\". Чтобы префикс веб-пакета никогда не подставлялся, установите в качестве этого параметра пустое значение.", + "emmetPreferencesCssMozProperties": "Разделенный запятыми список свойств CSS, которые получают префикс разработчика moz при использовании в сокращениях Emmet, которые начинаются с \"-\". Чтобы префикс moz никогда не подставлялся, установите в качестве этого параметра пустое значение. ", + "emmetPreferencesCssOProperties": "Разделенный запятыми список свойств CSS, которые получают префикс разработчика o при использовании в сокращениях Emmet, которые начинаются с \"-\". Чтобы префикс o никогда не подставлялся, установите в качестве этого параметра пустое значение. ", + "emmetPreferencesCssMsProperties": "Разделенный запятыми список свойств CSS, которые получают префикс разработчика ms при использовании в сокращениях Emmet, которые начинаются с \"-\". Чтобы префикс ms никогда не подставлялся, установите в качестве этого параметра пустое значение. " } \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/autofetch.i18n.json b/i18n/rus/extensions/git/out/autofetch.i18n.json index d53301e4a67..fcc8c01bac9 100644 --- a/i18n/rus/extensions/git/out/autofetch.i18n.json +++ b/i18n/rus/extensions/git/out/autofetch.i18n.json @@ -8,5 +8,7 @@ ], "yes": "Да", "read more": "Подробнее", - "no": "Нет" + "no": "Нет", + "not now": "Спросить меня позже", + "suggest auto fetch": "Вы хотите, чтобы среда Code периодически выполняла команду \"git fetch\"?" } \ 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 e32644e5e4b..ef93bfa4e37 100644 --- a/i18n/rus/extensions/git/out/commands.i18n.json +++ b/i18n/rus/extensions/git/out/commands.i18n.json @@ -28,6 +28,7 @@ "revert": "Отменить изменения", "discard": "Отменить изменения", "confirm delete": "Вы действительно хотите удалить {0}?", + "delete file": "Удалить файл", "confirm discard": "Вы действительно хотите отменить изменения в {0}?", "confirm discard multiple": "Вы действительно хотите отменить изменения в файлах ({0})?", "warn untracked": "Это приведет к удалению неотслеживаемых файлов ({0})!", @@ -42,6 +43,10 @@ "confirm discard all 2": "{0}\n\nОтменить это действие нельзя, текущие изменения будут утеряны.", "yes discard tracked": "Отменить изменения для отслеживаемого файла", "yes discard tracked multiple": "Отменить изменения для отслеживаемых файлов ({0})", + "unsaved files single": "Следующий файл не сохранен: {0}.\n\nВы хотите сохранить его перед тем как продолжить?", + "unsaved files": "Некоторые файлы ({0}) не сохранены.\n\nВы хотите сохранить их перед тем как продолжить?", + "save and commit": "Сохранить все и зафиксировать", + "commit": "Все равно зафиксировать", "no staged changes": "Отсутствуют промежуточные изменения для фиксации.\n\nВы хотите сделать все изменения промежуточными и зафиксировать их напрямую?", "always": "Всегда", "no changes": "Нет изменений для фиксации.", @@ -57,17 +62,21 @@ "branch already exists": "Ветви с именем '{0}' уже существует", "select a branch to merge from": "Выберите ветвь для слияния", "merge conflicts": "Обнаружены конфликты слияния. Устраните их перед фиксацией.", + "tag name": "Имя тега", "provide tag name": "Укажите имя тега", + "tag message": "Сообщение", "provide tag message": "Укажите сообщение для аннотирования тега", "no remotes to fetch": "Для этого репозитория не настроены удаленные репозитории для получения данных.", "no remotes to pull": "Для вашего репозитория не настроены удаленные репозитории для получения данных.", "pick remote pull repo": "Выберите удаленный компьютер, с которого следует загрузить ветвь", "no remotes to push": "Для вашего репозитория не настроены удаленные репозитории для отправки данных.", "nobranch": "Извлеките ветвь, чтобы передать данные в удаленный репозиторий.", + "confirm publish branch": "В ветви '{0}' отсутствует восходящая ветвь. Вы хотите опубликовать эту ветвь?", "ok": "ОК", "push with tags success": "Файлы с тегами успешно отправлены.", "pick remote": "Выберите удаленный сервер, на котором нужно опубликовать ветвь \"{0}\":", "sync is unpredictable": "Это действие отправляет фиксации в \"{0}\" и извлекает их из этого расположения.", + "never again": "ОК, больше не показывать", "no remotes to publish": "Для вашего репозитория не настроены удаленные репозитории для публикации.", "no changes stash": "Отсутствуют изменения, которые необходимо спрятать.", "provide stash message": "Укажите сообщение о скрытии", diff --git a/i18n/rus/extensions/git/out/main.i18n.json b/i18n/rus/extensions/git/out/main.i18n.json index a1cf97dd4cd..3d91096bb1a 100644 --- a/i18n/rus/extensions/git/out/main.i18n.json +++ b/i18n/rus/extensions/git/out/main.i18n.json @@ -8,6 +8,7 @@ ], "looking": "Поиск Git в: {0}", "using git": "Использование GIT {0} из {1}", + "downloadgit": "Скачать Git", "neverShowAgain": "Больше не показывать", "notfound": "Git не найден. Установите Git или укажите путь к нему в параметре 'git.path'.", "updateGit": "Обновить Git", diff --git a/i18n/rus/extensions/git/out/repository.i18n.json b/i18n/rus/extensions/git/out/repository.i18n.json index 5fe9e2f3030..581b0105606 100644 --- a/i18n/rus/extensions/git/out/repository.i18n.json +++ b/i18n/rus/extensions/git/out/repository.i18n.json @@ -10,6 +10,7 @@ "index modified": "Индекс изменен", "modified": "Изменено", "index added": "Индекс добавлен", + "index deleted": "Индекс удален", "deleted": "Удалено", "index renamed": "Индекс переименован", "index copied": "Индекс скопирован", @@ -28,6 +29,7 @@ "staged changes": "Промежуточно сохраненные изменения", "changes": "Изменения", "commitMessageCountdown": "Осталось {0} знаков в текущей строке", + "commitMessageWarning": "символов {0} над {1} в текущей строке", "ok": "ОК", "neveragain": "Больше не показывать", "huge": "Репозиторий git в '{0}' имеет очень много активных изменений, только часть функций Git будет доступна." diff --git a/i18n/rus/extensions/git/package.i18n.json b/i18n/rus/extensions/git/package.i18n.json index 9154d1481f6..07de51d98f5 100644 --- a/i18n/rus/extensions/git/package.i18n.json +++ b/i18n/rus/extensions/git/package.i18n.json @@ -56,11 +56,13 @@ "command.stashPopLatest": "Извлечь последнее спрятанное", "config.enabled": "Включен ли GIT", "config.path": "Путь к исполняемому файлу GIT", + "config.autoRepositoryDetection": "Следует ли обнаруживать репозитории автоматически", "config.autorefresh": "Включено ли автоматическое обновление", "config.autofetch": "Включено ли автоматическое получение", "config.enableLongCommitWarning": "Следует ли предупреждать о длинных сообщениях о фиксации", "config.confirmSync": "Подтвердите синхронизацию репозиториев GIT.", "config.countBadge": "\nУправляет счетчиком Git. При указании значения \"all\" подсчитываются все изменения, при указании значения \"tracked\" — только отслеживаемые изменения, при указании значения \"off\" счетчик отключается.", + "config.checkoutType": "Определяет типы ветвей, которые выводятся при выборе пункта меню \"Извлечь в...\". При указании значения \"all\" отображаются все ссылки, \"local\" — только локальные ветви, \"tags\" — только теги, а \"remote\" — только удаленные ветви.", "config.ignoreLegacyWarning": "Игнорирует предупреждение об устаревшей версии Git", "config.ignoreMissingGitWarning": "Игнорирует предупреждение об отсутствии Git", "config.ignoreLimitWarning": "Игнорировать предупреждение, когда в репозитории слишком много изменений", @@ -69,9 +71,14 @@ "config.enableCommitSigning": "Включает подписывание фиксации с GPG.", "config.discardAllScope": "Определяет, какие изменения отменяются с помощью команды \"Отменить все изменения\". При указании значения \"all\" отменяются все изменения, при указании значения \"tracked\" отменяются изменения только в отслеживаемых файлах, при указании значения \"prompt\" отображается окно подтверждения каждый раз при выполнении действия.", "config.decorations.enabled": "Управляет тем, используются ли цвета и эмблемы Git в проводнике и открытых представлениях редактора.", + "config.promptToSaveFilesBeforeCommit": "Определяет, должен ли Git проверять несохраненные файлы перед фиксацией.", + "config.showInlineOpenFileAction": "Определяет, должно ли отображаться интерактивное действие \"Открыть файл\" в представлении \"Изменения Git\".", + "config.inputValidation": "Определяет, следует ли проверять ввод в счетчике ввода.", + "config.detectSubmodules": "Определяет, следует ли автоматически определять подмодули Git.", "colors.modified": "Цвет измененных ресурсов.", "colors.deleted": "Цвет удаленных ресурсов.", "colors.untracked": "Цвет неотслеживаемых ресурсов.", "colors.ignored": "Цвет игнорируемых ресурсов.", - "colors.conflict": "Цвет ресурсов с конфликтами." + "colors.conflict": "Цвет ресурсов с конфликтами.", + "colors.submodule": "Цвет ресурсов подмодуля." } \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/out/commands.i18n.json b/i18n/rus/extensions/markdown/out/commands.i18n.json index b4a71726277..e57835dcf96 100644 --- a/i18n/rus/extensions/markdown/out/commands.i18n.json +++ b/i18n/rus/extensions/markdown/out/commands.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "previewTitle": "Предварительный просмотр {0}", "onPreviewStyleLoadError": "Не удалось загрузить 'markdown.styles': {0}" } \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/out/security.i18n.json b/i18n/rus/extensions/markdown/out/security.i18n.json index 85ed9bd8fa4..e57fedc24d6 100644 --- a/i18n/rus/extensions/markdown/out/security.i18n.json +++ b/i18n/rus/extensions/markdown/out/security.i18n.json @@ -6,6 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "strict.title": "Строгий", "strict.description": "Загружать только безопасное содержимое", "insecureContent.title": "Разрешить небезопасное содержимое", "insecureContent.description": "Включить загрузку содержимого через HTTP", @@ -14,5 +15,6 @@ "moreInfo.title": "Дополнительные сведения", "enableSecurityWarning.title": "Включить предварительный просмотр предупреждений системы безопасности в этой рабочей области", "disableSecurityWarning.title": "Отключить предварительный просмотр предупреждений системы безопасности в этой рабочей области", + "toggleSecurityWarning.description": "Не влияет на уровень безопасности содержимого", "preview.showPreviewSecuritySelector.title": "Установите параметры безопасности для предварительного просмотра Markdown в этой рабочей области" } \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/features/quickFixProvider.i18n.json b/i18n/rus/extensions/typescript/out/features/quickFixProvider.i18n.json index 35229bd6699..72b696f9b0a 100644 --- a/i18n/rus/extensions/typescript/out/features/quickFixProvider.i18n.json +++ b/i18n/rus/extensions/typescript/out/features/quickFixProvider.i18n.json @@ -5,5 +5,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." - ] + ], + "fixAllInFileLabel": "{0} (Исправить все в файле)" } \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/rus/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index 34eeeb68b9e..3d4dac7a419 100644 --- a/i18n/rus/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/rus/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -6,6 +6,13 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "previewOnGitHub": "Предварительный просмотр в GitHub", + "similarIssues": "Похожие проблемы", "noResults": "Результаты не найдены", - "description": "Описание" + "rateLimited": "Превышено ограничение на частоту использования API", + "stepsToReproduce": "Действия для воспроизведения проблемы", + "bugDescription": "Как вы столкнулись с этой проблемой? Какие шаги необходимо предпринять, чтобы воспроизвести проблему? Что должно было произойти и что произошло на самом деле?", + "performanceIssueDesciption": "Когда возникла эта проблема с производительностью? Например, происходит ли она только при запуске или после выполнения определенных действий? Укажите любые сведения, которые могут помочь в исследовании проблемы.", + "description": "Описание", + "disabledExtensions": "Расширения отключены" } \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/rus/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 35229bd6699..df4217a966a 100644 --- a/i18n/rus/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/rus/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -5,5 +5,25 @@ "Licensed under the MIT License. See License.txt in the project root for license information.", "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." - ] + ], + "completeInEnglish": "Заполните форму на английском языке.", + "issueTypeLabel": "Я хочу отправить", + "bugReporter": "Отчет об ошибке", + "performanceIssue": "Проблема с производительностью", + "featureRequest": "Запрос функции", + "issueTitleLabel": "Название", + "issueTitleRequired": "Введите название.", + "vscodeVersion": "Версия VS Code", + "osVersion": "Версия ОС", + "systemInfo": "Информация о системе", + "sendData": "Отправить мои данные", + "processes": "Запущенные процессы", + "workspaceStats": "Статистика моей рабочей области", + "extensions": "Мои расширения", + "tryDisablingExtensions": "Проблему можно воспроизвести, когда расширения отключены", + "disableExtensions": "отключение всех расширений и перезагрузка окна", + "showRunningExtensions": "просмотр всех запущенных расширений", + "githubMarkdown": "Поддерживается разметка Markdown в стиле GitHub. Вы можете отредактировать текст проблемы и добавить снимки экрана при просмотре проблемы в GitHub.", + "issueDescriptionRequired": "Укажите описание.", + "loadingData": "Загрузка данных..." } \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-main/logUploader.i18n.json b/i18n/rus/src/vs/code/electron-main/logUploader.i18n.json index 35229bd6699..01d56baa341 100644 --- a/i18n/rus/src/vs/code/electron-main/logUploader.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/logUploader.i18n.json @@ -5,5 +5,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." - ] + ], + "invalidEndpoint": "Недопустимая конечная точка средства отправки журнала", + "beginUploading": "Отправка...", + "didUploadLogs": "Отправка успешно завершена! Идентификатор файла журнала: {0}", + "userDeniedUpload": "Отправка отменена", + "logUploadPromptHeader": "Отправить журналы сеанса в защищенную конечную точку?", + "logUploadPromptBody": "Просмотрите файлы журнала здесь: \"{0}\"", + "logUploadPromptBodyDetails": "Журналы могут содержать личную информацию, например, полные пути и содержимое файлов.", + "logUploadPromptKey": "Я просмотрел журналы (нажмите \"y\" для подтверждения отправки)", + "postError": "Ошибка размещения журналов: {0}", + "responseError": "Ошибка размещения журналов. Получено {0} — {1}", + "parseError": "Ошибка разбора ответа", + "zipError": "Ошибка архивирования журналов: {0}" } \ 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 d14ec46f24d..2ba5bab4016 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -90,6 +90,7 @@ "miMarker": "Проблемы", "miAdditionalViews": "Дополнительные &&представления", "miCommandPalette": "&&Палитра команд...", + "miOpenView": "&&Открыть представление...", "miToggleFullScreen": "Включить/выключить полно&&экранный режим", "miToggleZenMode": "Включить/отключить режим \"Дзен\"", "miToggleMenuBar": "Показать/скрыть строку &&меню", @@ -184,6 +185,7 @@ "miCheckingForUpdates": "Идет проверка наличия обновлений...", "miDownloadUpdate": "Скачать доступное обновление", "miDownloadingUpdate": "Скачивается обновление...", + "miInstallUpdate": "Установить обновление...", "miInstallingUpdate": "Идет установка обновления...", "miRestartToUpdate": "Перезапустить программу для обновления...", "aboutDetail": "Версия {0}\nФиксация {1}\nДата {2}\nОболочка {3}\nОтрисовщик {4}\nУзел {5}\nАрхитектура {6}", 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 4f8eb695690..9ae0f49c855 100644 --- a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -28,6 +28,7 @@ "scrollBeyondLastLine": "Определяет, будет ли содержимое редактора прокручиваться за последнюю строку.", "smoothScrolling": "Определяет, будет ли использоваться анимация при прокрутке содержимого редактора", "minimap.enabled": "Определяет, отображается ли мини-карта", + "minimap.side": "Определяет, с какой стороны будет отображаться мини-карта. Возможные значения: \"right\" и \"left\"", "minimap.showSlider": "Определяет, будет ли автоматически скрываться ползунок мини-карты. Возможные значения: 'always' (всегда) и 'mouseover' (при наведении курсора мыши)", "minimap.renderCharacters": "Отображает фактические символы в строке вместо цветных блоков.", "minimap.maxColumn": "Ограничивает ширину мини-карты для отображения числа столбцов не больше определенного.", @@ -42,6 +43,9 @@ "wordWrapColumn": "Определяет столбец переноса редактора, если значение \"editor.wordWrap\" — \"wordWrapColumn\" или \"bounded\".", "wrappingIndent": "Управляет отступом строк с переносом по словам. Допустимые значения: \"none\", \"same\" или \"indent\".", "mouseWheelScrollSensitivity": "Множитель, используемый для параметров deltaX и deltaY событий прокрутки колесика мыши.", + "multiCursorModifier.ctrlCmd": "Соответствует клавише CTRL в Windows и Linux и клавише COMMAND в macOS.", + "multiCursorModifier.alt": "Соответствует клавише ALT в Windows и Linux и клавише OPTION в macOS.", + "multiCursorModifier": "Модификатор, который будет использоваться для добавления нескольких курсоров с помощью мыши. \"ctrlCmd\" соответствует клавише CTRL в Windows и Linux и клавише COMMAND в macOS. Жесты мыши \"Перейти к определению\" и \"Открыть ссылку\" будут изменены так, чтобы они не конфликтовали с несколькими курсорами.", "quickSuggestions.strings": "Разрешение кратких предложений в строках.", "quickSuggestions.comments": "Разрешение кратких предложений в комментариях.", "quickSuggestions.other": "Разрешение кратких предложений вне строк и комментариев.", @@ -62,6 +66,10 @@ "snippetSuggestions": "Управляет отображением фрагментов вместе с другими предложениями и их сортировкой.", "emptySelectionClipboard": "Управляет тем, копируется ли текущая строка при копировании без выделения.", "wordBasedSuggestions": "Определяет, следует ли оценивать завершения на основе слов в документе.", + "suggestSelection.first": "Всегда выбирать первое предложение.", + "suggestSelection.recentlyUsed": "Выбирать недавно использованные предложения, если введенному тексту не соответствует конкретное предложение, например, при вводе текста \"console.|\" будет выбрано предложение \"console.log\", так как \"log\" использовалось недавно.", + "suggestSelection.recentlyUsedByPrefix": "Выбирать предложения на основе предыдущих префиксов, которые завершали эти предложения, например, выбирать предложение \"console\" для \"co\" и предложение \"const\" для \"con\".", + "suggestSelection": "Управляет предварительным выбором предложений при отображении списка предложений.", "suggestFontSize": "Размер шрифта мини-приложения предложений", "suggestLineHeight": "Высота строки мини-приложения с предложениями", "selectionHighlight": "Определяет, будет ли редактор выделять фрагменты, совпадающие с выделенным текстом.", 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 cc6cb3829b7..1c687dc16fd 100644 --- a/i18n/rus/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/rus/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -8,6 +8,7 @@ ], "lineHighlight": "Цвет фона для выделения строки в позиции курсора.", "lineHighlightBorderBox": "Цвет фона границ вокруг строки в позиции курсора.", + "rangeHighlight": "Фоновый цвет выбранных диапазонов, например, в функциях быстрого открытия и поиска. Цвет должен быть прозрачным чтобы не перекрывать основных знаков отличия.", "caret": "Цвет курсора редактора.", "editorCursorBackground": "Цвет фона курсора редактора. Позволяет настраивать цвет символа, перекрываемого прямоугольным курсором.", "editorWhitespaces": "Цвет пробелов в редакторе.", diff --git a/i18n/rus/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/rus/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json index 5070b295387..ccd0f3d736d 100644 --- a/i18n/rus/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -6,5 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "smartSelect.jumpBracket": "Перейти к скобке" + "overviewRulerBracketMatchForeground": "Цвет метки линейки в окне просмотра для пар скобок.", + "smartSelect.jumpBracket": "Перейти к скобке", + "smartSelect.selectToBracket": "Выбрать скобку" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json b/i18n/rus/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json index 61764fb1929..a98aebe345f 100644 --- a/i18n/rus/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/quickFix/quickFixCommands.i18n.json @@ -8,5 +8,6 @@ ], "quickFixWithKb": "Показать исправления ({0})", "quickFix": "Показать исправления", - "quickfix.trigger.label": "Быстрое исправление" + "quickfix.trigger.label": "Быстрое исправление", + "refactor.label": "Рефакторинг" } \ No newline at end of file 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 321f7624b03..75e85a8667e 100644 --- a/i18n/rus/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/rus/src/vs/platform/environment/node/argv.i18n.json @@ -10,8 +10,11 @@ "diff": "Сравнение двух файлов друг с другом", "add": "Добавление папок в последнее активное окно.", "goto": "Открытие файла по указанному пути с выделением указанного символа в указанной строке.", + "newWindow": "Принудительно открыть новое окно.", + "reuseWindow": "Принудительно открыть файл или папку в последнем активном окне.", "wait": "Дождаться закрытия файлов перед возвратом.", "locale": "Языковой стандарт, который следует использовать (например, en-US или zh-TW).", + "userDataDir": "Указывает каталог, в котором хранятся данные пользователей. Может использоваться для открытия нескольких отдельных экземпляров Code.", "version": "Печать версии.", "help": "Распечатать данные об использовании.", "extensionHomePath": "Задайте корневой путь для расширений.", @@ -29,6 +32,7 @@ "inspect-extensions": "Разрешить отладку и профилирование расширений. Проверьте URI подключения для инструментов разработчика.", "inspect-brk-extensions": "Разрешить отладку и профилирование расширений, когда узел расширения приостановлен после запуска. Проверьте URI подключения для инструментов разработчика. ", "disableGPU": "Отключить аппаратное ускорение GPU.", + "uploadLogs": "Отправляет журналы из текущего сеанса в защищенную конечную точку.", "usage": "Использование", "options": "параметры", "paths": "пути", diff --git a/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json index d76fe02ad9e..5d6e27da236 100644 --- a/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json +++ b/i18n/rus/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -13,6 +13,7 @@ "cancel": "Отмена", "errorInstallingDependencies": "Ошибка при установке зависимостей. {0}", "notFoundCompatible": "Невозможно установить '{0}'; нет версии, совместимой с VS Code '{1}'.", + "malicious extension": "Не удается установить расширение, так как оно помечено как проблемное.", "notFoundCompatibleDependency": "Не удается выполнить установку, так как не найдено зависимое расширение '{0}', совместимое с текущей версией VS Code '{1}'. ", "quitCode": "Невозможно установить расширение. Пожалуйста, выйдите и зайдите в VS Code перед переустановкой.", "exitCode": "Невозможно установить расширение. Пожалуйста, выйдите и зайдите в VS Code перед переустановкой.", diff --git a/i18n/rus/src/vs/platform/issue/electron-main/issueService.i18n.json b/i18n/rus/src/vs/platform/issue/electron-main/issueService.i18n.json index 35229bd6699..04993184c64 100644 --- a/i18n/rus/src/vs/platform/issue/electron-main/issueService.i18n.json +++ b/i18n/rus/src/vs/platform/issue/electron-main/issueService.i18n.json @@ -5,5 +5,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." - ] + ], + "issueReporter": "Средство создания отчетов о неполадках" } \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/list/browser/listService.i18n.json b/i18n/rus/src/vs/platform/list/browser/listService.i18n.json index 7894eceea4d..a5965b1f141 100644 --- a/i18n/rus/src/vs/platform/list/browser/listService.i18n.json +++ b/i18n/rus/src/vs/platform/list/browser/listService.i18n.json @@ -6,5 +6,11 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "workbenchConfigurationTitle": "Рабочее место" + "workbenchConfigurationTitle": "Рабочее место", + "multiSelectModifier.ctrlCmd": "Соответствует клавише CTRL в Windows и Linux и клавише COMMAND в macOS.", + "multiSelectModifier.alt": "Соответствует клавише ALT в Windows и Linux и клавише OPTION в macOS.", + "multiSelectModifier": "Модификатор, который будет использоваться для добавления элементов в деревьях и списках в элемент множественного выбора с помощью мыши (например, в проводнике, в открытых редакторах и в представлении scm). \"ctrlCmd\" соответствует клавише CTRL в Windows и Linux и клавише COMMAND в macOS. Жесты мыши \"Открыть сбоку\" (если они поддерживаются), будут изменены таким образом, чтобы они не конфликтовали с модификатором элемента множественного выбора.", + "openMode.singleClick": "Открывает элемент одним щелчком мыши.", + "openMode.doubleClick": "Открывает элемент двойным щелчком мыши.", + "openModeModifier": "Управляет тем, как открывать элементы в деревьях и списках с помощью мыши (если поддерживается). Укажите значение \"singleClick\", чтобы открывать элементы одним щелчком мыши, и \"doubleClick\", чтобы открывать их только двойным щелчком мыши. Для родительских элементов с дочерними элементами в деревьях этот параметр управляет тем, будет ли родительский элемент разворачиваться по одинарному или по двойному щелчку мыши. Обратите внимание, что этот параметр может игнорироваться в некоторых деревьях и списках, если он не применяется к ним. " } \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/localizations/common/localizations.i18n.json b/i18n/rus/src/vs/platform/localizations/common/localizations.i18n.json index 35229bd6699..3a9dc5f5581 100644 --- a/i18n/rus/src/vs/platform/localizations/common/localizations.i18n.json +++ b/i18n/rus/src/vs/platform/localizations/common/localizations.i18n.json @@ -5,5 +5,13 @@ "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.localizations": "Добавляет локализации в редактор", + "vscode.extension.contributes.localizations.languageId": "Идентификатор языка, на который будут переведены отображаемые строки.", + "vscode.extension.contributes.localizations.languageName": "Название языка на английском языке.", + "vscode.extension.contributes.localizations.languageNameLocalized": "Название языка на предоставленном языке.", + "vscode.extension.contributes.localizations.translations": "Список переводов, связанных с языком.", + "vscode.extension.contributes.localizations.translations.id": "Идентификатор VS Code или расширения, для которого предоставляется этот перевод. Идентификатор VS Code всегда имеет формат \"vscode\", а идентификатор расширения должен иметь формат \"publisherId.extensionName\".", + "vscode.extension.contributes.localizations.translations.id.pattern": "Идентификатор должен иметь формат \"vscode\" или \"publisherId.extensionName\" для перевода VS Code или расширения соответственно.", + "vscode.extension.contributes.localizations.translations.path": "Относительный путь к файлу, содержащему переводы для языка." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json index 35229bd6699..37bcdaf055d 100644 --- a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json +++ b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.i18n.json @@ -5,5 +5,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." - ] + ], + "saveParticipants": "Сохранение участников..." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json index 35229bd6699..b98c8daeb90 100644 --- a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json +++ b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "folderStatusMessageAddSingleFolder": "Расширение \"{0}\" добавило одну папку в рабочую область", + "folderStatusMessageAddMultipleFolders": "Расширение \"{0}\" добавило папки ({1}) в рабочую область", + "folderStatusMessageRemoveSingleFolder": "Расширение \"{0}\" удалило одну папку из рабочей области", + "folderStatusMessageRemoveMultipleFolders": "Расширение \"{0}\" удалило папки ({1}) из рабочей области", + "folderStatusChangeFolder": "Расширение \"{0}\" изменило папки рабочей области " } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostWorkspace.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostWorkspace.i18n.json index 35229bd6699..aed5a76d9f1 100644 --- a/i18n/rus/src/vs/workbench/api/node/extHostWorkspace.i18n.json +++ b/i18n/rus/src/vs/workbench/api/node/extHostWorkspace.i18n.json @@ -5,5 +5,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." - ] + ], + "updateerror": "Расширению \"{0}\" не удалось обновить папки рабочей области: {1}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json index f1a5f11a1f2..f5e6250eb3a 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json @@ -22,6 +22,7 @@ "closeAllUnmodified": "Закрыть без изменений", "closeAll": "Закрыть все", "keepOpen": "Оставить открытым", + "toggleInlineView": "Переключить интерактивное представление", "showOpenedEditors": "Показать открытые редакторы", "keepEditor": "Сохранить редактор", "closeEditorsInGroup": "Закрыть все редакторы в группе", diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json index 320c1467b62..096f82a9a51 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/resourceViewer.i18n.json @@ -11,7 +11,9 @@ "sizeMB": "{0} МБ", "sizeGB": "{0} ГБ", "sizeTB": "{0} ТБ", + "largeImageError": "Изображение имеет слишком большой размер для отображения в редакторе (более 1 МБ). ", "resourceOpenExternalButton": "Открыть изображение с помощью внешней программы?", "nativeBinaryError": "Файл не будет отображен в редакторе, так как он двоичный, очень большой или использует неподдерживаемую кодировку текста.", + "zoom.action.fit.label": "Все изображение", "imgMeta": "{0}x{1} {2}" } \ 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 2a0c1db176e..82a624ca75f 100644 --- a/i18n/rus/src/vs/workbench/common/theme.i18n.json +++ b/i18n/rus/src/vs/workbench/common/theme.i18n.json @@ -8,9 +8,13 @@ ], "tabActiveBackground": "Цвет фона активной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabInactiveBackground": "Цвет фона неактивной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabHoverBackground": "Цвет фона вкладки при наведении. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabUnfocusedHoverBackground": "Цвет фона вкладки в группе, не имеющей фокуса, при наведении. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Также можно открыть несколько групп редакторов.", "tabBorder": "Граница для разделения вкладок. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Может быть несколько групп редакторов.", "tabActiveBorder": "Граница для выделения активных вкладок. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Также можно открыть несколько групп редакторов. ", "tabActiveUnfocusedBorder": "Граница для выделения активных вкладок в группе, не имеющей фокуса. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Также можно открыть несколько групп редакторов.", + "tabHoverBorder": "Граница для выделения вкладок при наведении курсора. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Также можно открыть несколько групп редакторов. ", + "tabUnfocusedHoverBorder": "Граница для выделения вкладок в группе, не имеющей фокуса, при наведении. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Также можно открыть несколько групп редакторов.", "tabActiveForeground": "Цвет переднего плана активной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabInactiveForeground": "Цвет переднего плана неактивной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabUnfocusedActiveForeground": "Цвет переднего плана активной вкладки в группе, не имеющей фокуса. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Также можно открыть несколько групп редакторов.", @@ -18,6 +22,7 @@ "editorGroupBackground": "Цвет фона группы редакторов. Группы редакторов представляют собой контейнеры редакторов. Цвет фона отображается при перетаскивании групп редакторов.", "tabsContainerBackground": "Цвет фона для заголовка группы редакторов, когда вкладки включены. Группы редакторов представляют собой контейнеры редакторов.", "tabsContainerBorder": "Цвет границы для заголовка группы редакторов, когда вкладки включены. Группы редакторов представляют собой контейнеры редакторов.", + "editorGroupHeaderBackground": "Цвет фона для заголовка группы редакторов, когда вкладки отключены (`\"workbench.editor.showTabs\": false`). Группы редакторов представляют собой контейнеры редакторов.", "editorGroupBorder": "Цвет для разделения нескольких групп редакторов. Группы редакторов — это контейнеры редакторов.", "editorDragAndDropBackground": "Цвет фона при перетаскивании редакторов. Этот цвет должен обладать прозрачностью, чтобы содержимое редактора оставалось видимым.", "panelBackground": "Цвет фона панели. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", @@ -34,6 +39,8 @@ "statusBarNoFolderBorder": "Цвет границы строки состояния, который распространяется на боковую панель и редактор, когда открытые папки отсутствуют. Строка состояния расположена в нижней части окна.", "statusBarItemActiveBackground": "Цвет фона элементов панели состояния при щелчке. Панель состояния отображается внизу окна.", "statusBarItemHoverBackground": "Цвет фона элементов панели состояния при наведении. Панель состояния отображается внизу окна.", + "statusBarProminentItemBackground": "Цвет фона приоритетных элементов панели состояния. Приоритетные элементы выделяются на фоне других элементов панели состояния, чтобы подчеркнуть их значение. Чтобы просмотреть пример, измените режим \"Toggle Tab Key Moves Focus\" из палитры команд. Панель состояния отображается в нижней части окна.", + "statusBarProminentItemHoverBackground": "Цвет фона приоритетных элементов панели состояния при наведении. Приоритетные элементы выделяются на фоне других элементов панели состояния, чтобы подчеркнуть их значение. Чтобы просмотреть пример, измените режим \"Toggle Tab Key Moves Focus\" из палитры команд. Панель состояния отображается в нижней части окна.", "activityBarBackground": "Цвет фона панели действий. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarForeground": "Цвет переднего плана панели действий (например, цвет, используемый для значков). Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarBorder": "Цвет границы панели действий, который распространяется на боковую панель. Панель действий отображается слева или справа и позволяет переключаться между представлениями в боковой панели.", 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 dfd0b2e5bc6..8436da97092 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 @@ -32,11 +32,14 @@ "closeOnFocusLost": "Управляет автоматическим закрытием Quick Open при потере фокуса.", "openDefaultSettings": "Управляет открытием редактора с отображением всех настроек по умолчанию при открытии настроек.", "sideBarLocation": "Определяет расположение боковой панели: слева или справа от рабочего места.", + "panelDefaultLocation": "Определяет расположение панели по умолчанию. Она может находиться снизу или справа от рабочего места.", "statusBarVisibility": "Управляет видимостью строки состояния в нижней части рабочего места.", "activityBarVisibility": "Управляет видимостью панели действий на рабочем месте.", + "fontAliasing": "Управляет методом сглаживания шрифтов в рабочей области.\n- default: субпиксельное сглаживание шрифтов; позволит добиться максимальной четкости текста на большинстве дисплеев за исключением Retina\n- antialiased: сглаживание шрифтов на уровне пикселей, в отличие от субпиксельного сглаживания; позволит сделать шрифт более светлым в целом\n- none: сглаживание шрифтов отключено; текст будет отображаться с неровными острыми краями\n- auto: автоматически применяется режим \"default\" или \"antialiased\" в зависимости от разрешения дисплея (количество точек на дюйм).", "workbench.fontAliasing.default": "Субпиксельное сглаживание шрифтов; позволит добиться максимальной четкости текста на большинстве дисплеев за исключением Retina.", "workbench.fontAliasing.antialiased": "Сглаживание шрифтов на уровне пикселей, в отличие от субпиксельного сглаживания. Может сделать шрифт светлее в целом.", "workbench.fontAliasing.none": "Отключает сглаживание шрифтов; текст будет отображаться с неровными острыми краями.", + "workbench.fontAliasing.auto": "Автоматически применяется режим \"default\" или \"antialiased\" в зависимости от разрешения дисплея (количество точек на дюйм).", "enableNaturalLanguageSettingsSearch": "Определяет, следует ли включить режим поиска естественного языка для параметров.", "windowConfigurationTitle": "Окно", "window.openFilesInNewWindow.on": "Файлы будут открываться в новом окне.", 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 9d3790bf43c..adbbf477cfc 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 @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "debugToolBarBackground": "Цвет фона для панели инструментов отладки." + "debugToolBarBackground": "Цвет фона для панели инструментов отладки.", + "debugToolBarBorder": "Цвет границы для панели инструментов отладки." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index 04e36f262a2..718232647ac 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -21,6 +21,8 @@ "vscode.extension.contributes.debuggers.configurationAttributes": "Конфигурации схемы JSON для проверки launch.json.", "vscode.extension.contributes.debuggers.windows": "Параметры, связанные с Windows.", "vscode.extension.contributes.debuggers.windows.runtime": "Среда выполнения, используемая для Windows.", + "vscode.extension.contributes.debuggers.osx": "Параметры, связанные с macOS.", + "vscode.extension.contributes.debuggers.osx.runtime": "Среда выполнения, используемая для macOS.", "vscode.extension.contributes.debuggers.linux": "Параметры, связанные с Linux.", "vscode.extension.contributes.debuggers.linux.runtime": "Среда выполнения, используемая для Linux.", "vscode.extension.contributes.breakpoints": "Добавляет точки останова.", @@ -30,8 +32,12 @@ "app.launch.json.configurations": "Список конфигураций. Добавьте новые конфигурации или измените существующие с помощью IntelliSense.", "app.launch.json.compounds": "Список составных объектов. Каждый из них ссылается на несколько конфигураций, которые будут запущены вместе.", "app.launch.json.compound.name": "Имя составного объекта. Отображается в раскрывающемся меню запуска конфигурации.", + "useUniqueNames": "Используйте уникальное имя конфигурации.", + "app.launch.json.compound.folder": "Имя папки, в которой расположен составной объект.", "app.launch.json.compounds.configurations": "Имена конфигураций, которые будут запущены как часть этого составного объекта.", "debugNoType": "Параметр type адаптера отладки не может быть опущен и должен иметь тип string.", "selectDebug": "Выбор среды", - "DebugConfig.failed": "Не удается создать файл launch.json в папке .vscode ({0})." + "DebugConfig.failed": "Не удается создать файл launch.json в папке .vscode ({0}).", + "workspace": "рабочая область", + "user settings": "параметры пользователя" } \ 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 36b2312dd65..9277f42da30 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 @@ -13,6 +13,9 @@ "breakpointAdded": "Добавлена точка останова: строка {0}, файл {1}", "breakpointRemoved": "Удалена точка останова: строка {0}, файл {1}", "compoundMustHaveConfigurations": "Для составного элемента должен быть задан атрибут configurations для запуска нескольких конфигураций.", + "noConfigurationNameInWorkspace": "Не удалось найти конфигурацию запуска \"{0}\" в рабочей области.", + "multipleConfigurationNamesInWorkspace": "В рабочей области есть несколько конфигураций запуска \"{0}\". Используйте имя папки для определения конфигурации.", + "noFolderWithName": "Не удается найти папку с именем '{0}' для конфигурации '{1}' в составном объекте '{2}'.", "configMissing": "Конфигурация \"{0}\" отсутствует в launch.json.", "launchJsonDoesNotExist": "Файл \"launch.json\" не существует.", "debugRequestNotSupported": "Атрибут '{0}' имеет неподдерживаемое значение '{1}' в выбранной конфигурации отладки.", @@ -23,6 +26,7 @@ "preLaunchTaskError": "При выполнении предварительной задачи \"{0}\" обнаружена ошибка.", "preLaunchTaskExitCode": "Выполнение предварительной задачи \"{0}\" завершено с кодом выхода {1}.", "debugAnyway": "Принудительная отладка", + "showErrors": "Показывать ошибки", "cancel": "Отмена", "noFolderWorkspaceDebugError": "Нельзя выполнить отладку активного файла. Убедитесь, что файл сохранен на диске и установлено расширение отладки для этого типа файла.", "DebugTaskNotFound": "Не удалось найти задачу preLaunchTask \"{0}\".", 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 8cdee6de7cf..e3a986b75ef 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 @@ -33,6 +33,10 @@ "view id": "Идентификатор", "view name": "Имя", "view location": "Где", + "localizations": "Локализации ({0})", + "localizations language id": "Идентификатор языка", + "localizations language name": "Название языка", + "localizations localized language name": "Название языка (локализованное)", "colorThemes": "Цветовые темы ({0})", "iconThemes": "Темы значков ({0})", "colors": "Цвета ({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 126d3a1028c..943a6d17939 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 @@ -52,6 +52,8 @@ "configureWorkspaceRecommendedExtensions": "Настроить рекомендуемые расширения (рабочая область)", "configureWorkspaceFolderRecommendedExtensions": "Настроить рекомендуемые расширения (папка рабочей области)", "builtin": "Встроенное", + "malicious tooltip": "Это расширение помечено как проблемное.", + "malicious": "Вредоносный", "disableAll": "Отключить все установленные расширения", "disableAllWorkspace": "Отключить все установленные расширения для этой рабочей области", "enableAll": "Включить все установленные расширения", diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index 63ca7f876a0..90ccf0f849c 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "noPro": "Для профилирования расширений выполните команду с параметром \"--inspect-extensions=<port>\".", "selectAndStartDebug": "Щелкните здесь, чтобы остановить профилирование." } \ 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 74d611f933b..237e0b0edf9 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 @@ -11,10 +11,13 @@ "workspaceRecommendation": "Это расширение рекомендуется пользователями текущей рабочей области.", "fileBasedRecommendation": "Рекомендуется использовать это расширение (на основе недавно открытых файлов).", "exeBasedRecommendation": "Рекомендуется использовать это расширение, так как установлено {0}.", + "dynamicWorkspaceRecommendation": "Это расширение может вас заинтересовать, потому что многие другие пользователи в этой рабочей области пользуются им.", "reallyRecommended2": "Для этого типа файлов рекомендуется использовать расширение '{0}'.", "reallyRecommendedExtensionPack": "Для этого типа файлов рекомендуется использовать пакет расширений '{0}'.", "showRecommendations": "Показать рекомендации", "install": "Установить", + "showLanguageExtensions": "В Marketplace есть расширения для работы с файлами '.{0}'", + "searchMarketplace": "Поиск в Marketplace", "workspaceRecommended": "Эта рабочая область включает рекомендации по расширениям.", "installAll": "Установить все", "ignoreExtensionRecommendations": "Вы действительно хотите проигнорировать все рекомендации по расширениям?", 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 4367c72b1cb..fc2676c541b 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 @@ -19,5 +19,6 @@ "suggestProxyError": "Marketplace вернул значение \"ECONNREFUSED\". Проверьте параметр \"http.proxy\".", "extensions": "Расширения", "outdatedExtensions": "Устаревшие расширения: {0}", + "malicious warning": "Мы удалили расширение '{0}', которое вызывало проблемы.", "reloadNow": "Перезагрузить" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json index e19c26eebd7..7639b5985ab 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -6,6 +6,10 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "installingVSIXExtension": "Установка расширений из VSIX...", + "malicious": "Это расширение помечено как проблемное.", + "installingMarketPlaceExtension": "Установка расширения из Marketplace...", + "uninstallingExtension": "Удаление расширения...", "enableDependeciesConfirmation": "Включение \"{0}\" также включит соответствующие зависимости. Продолжить?", "enable": "Да", "doNotEnable": "Нет", diff --git a/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json index 7894eceea4d..a559dd5de9c 100644 --- a/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedback.contribution.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], - "workbenchConfigurationTitle": "Рабочее место" + "workbenchConfigurationTitle": "Рабочее место", + "feedbackVisibility": "Определяет, отображается ли отзыв Twitter (смайлик) на панели состояния в нижней части рабочего места." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json b/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json index fabffd55baa..e0dd8cc5cc0 100644 --- a/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json @@ -18,6 +18,7 @@ "request a missing feature": "Запросить отсутствующую возможность", "tell us why?": "Расскажите нам о причинах", "commentsHeader": "Комментарии", + "showFeedback": "Отображать смайлик отзыва в строке состояния", "tweet": "Твит", "character left": "символ остался", "characters left": "симв. осталось", diff --git a/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json b/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json index 35229bd6699..956ea0325cf 100644 --- a/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.i18n.json @@ -5,5 +5,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." - ] + ], + "hide": "Скрыть" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json index 7094260597f..3eaaab932e9 100644 --- a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.i18n.json @@ -12,6 +12,7 @@ "revertLocalChanges": "Отменить изменения и вернуться к содержимому на диске", "copyPathOfActive": "Копировать путь к активному файлу", "saveAllInGroup": "Сохранить все в группе", + "saveFiles": "Сохранить все файлы", "revert": "Отменить изменения в файле", "compareActiveWithSaved": "Сравнить активный файл с сохраненным", "closeEditor": "Закрыть редактор", @@ -23,7 +24,9 @@ "copyPath": "Скопировать путь", "saveAll": "Сохранить все", "compareWithSaved": "Сравнить с сохраненным", + "compareWithSelected": "Сравнить с выбранным", "compareSource": "Выбрать для сравнения", + "compareSelected": "Сравнить выбранное", "close": "Закрыть", "closeOthers": "Закрыть другие", "closeUnmodified": "Закрыть без изменений", diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json index a6e1a42df1e..cd6f07eb718 100644 --- a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileActions.i18n.json @@ -20,15 +20,18 @@ "deleteButtonLabelRecycleBin": "&&Переместить в корзину", "deleteButtonLabelTrash": "&&Переместить в удаленные", "deleteButtonLabel": "&&Удалить", + "dirtyMessageFilesDelete": "Вы удаляете файлы с несохраненными изменениями. Вы хотите продолжить?", "dirtyMessageFolderOneDelete": "Вы удаляете папку с несохраненными изменениями в одном файле. Вы хотите продолжить?", "dirtyMessageFolderDelete": "Вы удаляете папку с несохраненными изменениями в нескольких файлах ({0}). Вы хотите продолжить?", "dirtyMessageFileDelete": "Вы удаляете файл с несохраненными изменениями. Вы хотите продолжить?", "dirtyWarning": "Если не сохранить изменения, они будут утеряны.", + "confirmMoveTrashMessageMultiple": "Вы действительно хотите удалить следующие файлы ({0})?", "confirmMoveTrashMessageFolder": "Вы действительно хотите удалить папку \"{0}\" и ее содержимое?", "confirmMoveTrashMessageFile": "Вы действительно хотите удалить \"{0}\"?", "undoBin": "Вы можете выполнить восстановление из корзины.", "undoTrash": "Вы можете выполнить восстановление из корзины.", "doNotAskAgain": "Больше не спрашивать", + "confirmDeleteMessageMultiple": "Вы действительно хотите удалить следующие файлы ({0}) без возможности восстановления?", "confirmDeleteMessageFolder": "Вы действительно хотите удалить папку \"{0}\" и ее содержимое без возможности восстановления?", "confirmDeleteMessageFile": "Вы действительно хотите удалить \"{0}\" без возможности восстановления?", "irreversible": "Это действие необратимо.", @@ -36,6 +39,8 @@ "importFiles": "Импорт файлов", "confirmOverwrite": "Файл или папка с таким именем уже существует в конечной папке. Заменить их?", "replaceButtonLabel": "Заменить", + "fileDeleted": "Файл был удален или перемещен в другое место", + "fileIsAncestor": "Копируемый файл является предком папки назначения", "duplicateFile": "Дублировать", "globalCompareFile": "Сравнить активный файл с...", "openFileToCompare": "Чтобы сравнить файл с другим файлом, сначала откройте его.", diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json index cdc7eb369f3..0f4e31686b5 100644 --- a/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/fileCommands.i18n.json @@ -13,6 +13,7 @@ "save": "Сохранить", "saveAll": "Сохранить все", "removeFolderFromWorkspace": "Удалить папку из рабочей области", + "genericRevertError": "Не удалось отменить изменения \"{0}\": {1}", "modifiedLabel": "{0} (на диске) ↔ {1}", "openFileToReveal": "Чтобы отобразить файл, сначала откройте его", "openFileToCopy": "Чтобы скопировать путь к файлу, сначала откройте его" diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json index 616044b2c9b..7864917b59e 100644 --- a/i18n/rus/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/files.contribution.i18n.json @@ -38,6 +38,7 @@ "editorConfigurationTitle": "Редактор", "formatOnSave": "Форматирование файла при сохранении. Модуль форматирования должен быть доступен, файл не должен сохраняться автоматически, а работа редактора не должна завершаться.", "explorerConfigurationTitle": "Проводник", + "openEditorsVisible": "Число редакторов, отображаемых на панели \"Открытые редакторы\".", "autoReveal": "Определяет, будет ли проводник автоматически отображать и выбирать файлы при их открытии.", "enableDragAndDrop": "Определяет, разрешено ли перемещение файлов и папок перетаскиванием в проводнике.", "confirmDragAndDrop": "Определяет, должно ли запрашиваться подтверждение при перемещении файлов и папок в проводнике.", diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json index 1fdae0619e5..ea471609734 100644 --- a/i18n/rus/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.i18n.json @@ -7,9 +7,14 @@ "Do not edit this file. It is machine generated." ], "userGuide": "Используйте команды на панели инструментов редактора справа для **отмены** изменений или **перезаписи** содержимого на диске с учетом этих изменений", + "overwriteElevated": "Перезаписать с правами администратора....", + "saveElevated": "Повторить с правами администратора....", "overwrite": "Перезаписать", "retry": "Повторить попытку", "discard": "Отмена", + "readonlySaveErrorAdmin": "Не удалось сохранить \"{0}\": файл защищен от записи. Чтобы повторить попытку с правами администратора, выберите \"Перезаписать с правами администратора\".", + "readonlySaveError": "Не удалось сохранить \"{0}\": файл защищен от записи. Чтобы попытаться снять защиту, выберите \"Перезаписать\".", + "permissionDeniedSaveError": "Не удалось сохранить \"{0}\": недостаточные разрешения. Чтобы повторить попытку с правами администратора, выберите \"Повторить попытку с правами администратора\".", "genericSaveError": "Не удалось сохранить \"{0}\": {1}", "staleSaveError": "Не удалось сохранить \"{0}\": содержимое на диске более новое. Чтобы сравнить свою версию с версией на диске, нажмите **Сравнить**.", "compareChanges": "Сравнить", diff --git a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json index ed319f477df..42c4426c51c 100644 --- a/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.i18n.json @@ -12,6 +12,7 @@ "dropFolder": "Вы хотите действительно добавить папку в эту рабочую область?", "addFolders": "&&Добавить папки", "addFolder": "&&Добавить папку", + "confirmMultiMove": "Вы действительно хотите переместить следующие файлы ({0})?", "confirmMove": "Вы действительно хотите переместить '{0}'?", "doNotAskAgain": "Больше не спрашивать", "moveButtonLabel": "&&Переместить", diff --git a/i18n/rus/src/vs/workbench/parts/logs/electron-browser/logs.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/logs/electron-browser/logs.contribution.i18n.json index 04973ae4268..e75467d6715 100644 --- a/i18n/rus/src/vs/workbench/parts/logs/electron-browser/logs.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/logs/electron-browser/logs.contribution.i18n.json @@ -8,5 +8,7 @@ ], "mainLog": "Лог (Основной)", "sharedLog": "Лог (общий)", + "rendererLog": "Журнал (окно)", + "extensionsLog": "Журнал (узел расширения)", "developer": "Разработчик" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json b/i18n/rus/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json index 9665e49caa1..abb406c1b5a 100644 --- a/i18n/rus/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/logs/electron-browser/logsActions.i18n.json @@ -7,10 +7,13 @@ "Do not edit this file. It is machine generated." ], "openLogsFolder": "Открыть папку журналов", + "showLogs": "Показать журналы...", + "rendererProcess": "Окно ({0})", "emptyWindow": "Окно", "extensionHost": "Узел расширения", "sharedProcess": "Общий", "mainProcess": "Главный", + "selectProcess": "Выберите журнал для обработки", "openLogFile": "Открыть лог", "setLogLevel": "Установите уровень ведения журнала", "trace": "Трассировка", @@ -21,5 +24,7 @@ "critical": "Критично", "off": "Отключено", "selectLogLevel": "Установите уровень ведения журнала", - "default": "По умолчанию" + "default and current": "По умолчанию и текущий", + "default": "По умолчанию", + "current": "Текущий" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json index bb54b70e540..a1ef2cd59b1 100644 --- a/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -7,6 +7,8 @@ "Do not edit this file. It is machine generated." ], "viewCategory": "Просмотреть", + "problems.view.toggle.label": "Включить или отключить сообщения о проблемах (ошибки, предупреждения, информационные сообщения)", + "problems.view.focus.label": "Перевести фокус на сообщения о проблемах (ошибки, предупреждения, информационные сообщения) ", "problems.panel.configuration.title": "Представление \"Проблемы\"", "problems.panel.configuration.autoreveal": "Определяет, следует ли представлению \"Проблемы\" отображать файлы при их открытии", "markers.panel.title.problems": "Проблемы", diff --git a/i18n/rus/src/vs/workbench/parts/output/electron-browser/output.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/output/electron-browser/output.contribution.i18n.json index 929c54c82e9..e357345cb24 100644 --- a/i18n/rus/src/vs/workbench/parts/output/electron-browser/output.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/output/electron-browser/output.contribution.i18n.json @@ -7,6 +7,7 @@ "Do not edit this file. It is machine generated." ], "output": "Вывод", + "logViewer": "Средство просмотра журналов", "viewCategory": "Просмотр", "clearOutput.label": "Очистить выходные данные" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/output/electron-browser/outputServices.i18n.json b/i18n/rus/src/vs/workbench/parts/output/electron-browser/outputServices.i18n.json index 35229bd6699..78ebecbf38b 100644 --- a/i18n/rus/src/vs/workbench/parts/output/electron-browser/outputServices.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/output/electron-browser/outputServices.i18n.json @@ -5,5 +5,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." - ] + ], + "output": "{0} - выходные данные", + "channel": "Канал выходных данных для '{0}'" } \ No newline at end of file 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 07d11b5eb6f..007de0de321 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 @@ -17,7 +17,9 @@ "addLabel": "Добавить настраиваемое сочетание клавиш", "removeLabel": "Удаление настраиваемого сочетания клавиш", "resetLabel": "Сбросить настраиваемое сочетание клавиш", + "showSameKeybindings": "Показывать одинаковые настраиваемые сочетания клавиш", "copyLabel": "Копировать", + "copyCommandLabel": "Команда копирования", "error": "Произошла ошибка \"{0}\" при редактировании настраиваемого сочетания клавиш. Откройте и проверьте файл \"keybindings.json\".", "command": "Команда", "keybinding": "Настраиваемое сочетание клавиш", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json index 5d997666f2a..d1d27d53dda 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -10,7 +10,11 @@ "SearchSettingsWidget.AriaLabel": "Параметры поиска", "SearchSettingsWidget.Placeholder": "Параметры поиска", "noSettingsFound": "Нет результатов", + "oneSettingFound": "Найден один параметр", + "settingsFound": "Найдено параметров: {0}", "totalSettingsMessage": "Всего параметров: {0}", + "nlpResult": "Результаты естественного языка", + "filterResult": "Отфильтрованные результаты", "defaultSettings": "Параметры по умолчанию", "defaultFolderSettings": "Параметры папок по умолчанию", "defaultEditorReadonly": "Редактировать в правой области редактора, чтобы переопределить значения по умолчанию.", 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 25906ddf058..4febeb5b22c 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 @@ -9,6 +9,7 @@ "emptyUserSettingsHeader": "Укажите параметры здесь, чтобы перезаписать параметры по умолчанию.", "emptyWorkspaceSettingsHeader": "Укажите параметры здесь, чтобы перезаписать параметры пользователей.", "emptyFolderSettingsHeader": "Укажите параметры папок здесь, чтобы перезаписать параметры рабочих областей.", + "newExtensionLabel": "Показать расширение «{0}»", "editTtile": "Изменить", "replaceDefaultValue": "Заменить в параметрах", "copyDefaultValue": "Копировать в параметры", 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 62ef4a12c96..9f5ad1adbbb 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 @@ -11,5 +11,6 @@ "toggleSCMViewlet": "Показать SCM", "view": "Просмотреть", "scmConfigurationTitle": "SCM", - "alwaysShowProviders": "Всегда отображать хранилище исходного кода" + "alwaysShowProviders": "Всегда отображать хранилище исходного кода", + "diffDecorations": "Управляет декораторами diff в редакторе." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/rus/src/vs/workbench/parts/search/browser/searchActions.i18n.json index 9e5b6280df4..a43c7553d81 100644 --- a/i18n/rus/src/vs/workbench/parts/search/browser/searchActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -18,6 +18,7 @@ "RefreshAction.label": "Обновить", "CollapseDeepestExpandedLevelAction.label": "Свернуть все", "ClearSearchResultsAction.label": "Очистить", + "CancelSearchAction.label": "Отменить поиск", "FocusNextSearchResult.label": "Перейти к следующему результату поиска.", "FocusPreviousSearchResult.label": "Перейти к предыдущему результату поиска.", "RemoveAction.label": "Отклонить", diff --git a/i18n/rus/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json index a8ba80c5dfa..65bc79a6ec8 100644 --- a/i18n/rus/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/electron-browser/search.contribution.i18n.json @@ -6,6 +6,8 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "findInFolder": "Найти в папке...", + "findInWorkspace": "Найти в рабочей области...", "showTriggerActions": "Перейти к символу в рабочей области...", "name": "Поиск", "search": "Поиск", @@ -21,5 +23,7 @@ "useRipgrep": "Определяет, следует ли использовать ripgrep в текстовом поиске и в поиске по файлам", "useIgnoreFiles": "Определяет, следует ли использовать GITIGNORE- и IGNORE-файлы по умолчанию при поиске файлов.", "search.quickOpen.includeSymbols": "Настройте для включения результатов поиска глобальных символов в файлы по запросу для Quick Open.", - "search.followSymlinks": "Определяет, нужно ли следовать символическим ссылкам при поиске." + "search.followSymlinks": "Определяет, нужно ли следовать символическим ссылкам при поиске.", + "search.smartCase": "Выполняет поиск без учета регистра, если шаблон состоит только из букв нижнего регистра; в противном случае выполняет поиск с учетом регистра", + "search.globalFindClipboard": "Определяет, должно ли мини-приложение поиска считывать или изменять общий буфер обмена поиска в macOS" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json index f052e8c0cc2..be81058c120 100644 --- a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/configureSnippets.i18n.json @@ -6,7 +6,12 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "global.scope": "(глобальный)", "global.1": "({0})", "new.global": "Новый файл с глобальным фрагментом кода ", + "group.global": "Существующие фрагменты кода", + "new.global.sep": "Новые фрагменты кода", + "openSnippet.pickLanguage": "Выберите файл фрагментов кода или создайте фрагменты", + "openSnippet.label": "Настроить пользовательские фрагменты кода", "preferences": "Параметры" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json index da2eee89faa..c1919f596fc 100644 --- a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippetsFile.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "source.snippetGlobal": "Глобальный пользовательский фрагмент кода", "source.snippet": "Фрагмент кода пользователя" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json index 16abca69f02..6a37d94b67d 100644 --- a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json @@ -7,6 +7,7 @@ "Do not edit this file. It is machine generated." ], "invalid.path.0": "В contributes.{0}.path требуется строка. Указанное значение: {1}", + "invalid.language.0": "Если язык не указан, то в качестве значения параметра \"contributes.{0}.path\" необходимо указать файл \".code-snippets\". Указанное значение: {1}", "invalid.language": "Неизвестный язык в contributes.{0}.language. Указанное значение: {1}", "invalid.path.1": "contributes.{0}.path ({1}) должен был быть включен в папку расширения ({2}). Это может сделать расширение непереносимым.", "vscode.extension.contributes.snippets": "Добавляет фрагменты.", 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 cb0885ffff1..60e666cad4c 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 @@ -21,6 +21,10 @@ "JsonSchema.tasks.terminal": "Свойство terminal является устаревшим. Используйте свойство presentation", "JsonSchema.tasks.group.kind": "Группа выполнения задачи", "JsonSchema.tasks.group.isDefault": "Определяет, является ли эта задача задачей по умолчанию в группе.", + "JsonSchema.tasks.group.defaultBuild": "Отмечает задачу как задачу сборки по умолчанию.", + "JsonSchema.tasks.group.defaultTest": "Отмечает задачу как задачу тестирования по умолчанию.", + "JsonSchema.tasks.group.build": "Отмечает задачу как задачу сборки, доступ к которой осуществляется с помощью команды \"Запустить задачу сборки\".", + "JsonSchema.tasks.group.test": "Отмечает задачу как задачу тестирования, доступ к которой осуществляется с помощью команды \"Запустить задачу тестирования\".", "JsonSchema.tasks.group.none": "Отменяет связь задачи со всеми группами", "JsonSchema.tasks.group": "Определяет, к какой группе выполнения принадлежит эта задача. Поддерживаемые значения: \"build\" для добавления задачи к группе сборки и \"test\" для добавления задачи к группе тестирования.", "JsonSchema.tasks.type": "Определяет, выполняется ли задача в виде процесса или в виде команды оболочки.", 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 a56f8c90a3e..36cf40efb26 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 @@ -15,21 +15,26 @@ "terminal.integrated.shellArgs.osx": "Аргументы командной строки, которые следует использовать в терминале OS X.", "terminal.integrated.shell.windows": "Путь к оболочке, который используется терминалом в Windows. Для оболочек, входящих в состав ОС Windows (cmd, PowerShell или Bash в Ubuntu).", "terminal.integrated.shellArgs.windows": "Аргументы командной строки, используемые в терминале Windows.", + "terminal.integrated.macOptionIsMeta": "Считать клавишу OPTION метаклавишей в терминале macOS.", "terminal.integrated.rightClickCopyPaste": "Если задано, блокирует отображение контекстного меню при щелчке правой кнопкой мыши в терминале. Вместо этого будет выполняться копирование выбранного элемента и вставка в область, в которой нет выбранных элементов.", "terminal.integrated.copyOnSelection": "Если задано, текст выделенный в терминале будет скопирован в буфер обмена", "terminal.integrated.fontFamily": "Определяет семейство шрифтов терминала, значение по умолчанию — editor.fontFamily.", "terminal.integrated.fontSize": "Определяет размер шрифта (в пикселях) для терминала.", "terminal.integrated.lineHeight": "Определяет высоту строки терминала; это число умножается на размер шрифта терминала, что дает фактическую высоту строки в пикселях.", + "terminal.integrated.fontWeight": "Насыщенность шрифта в терминале для нежирного текста.", + "terminal.integrated.fontWeightBold": "Насыщенность шрифта в терминале для полужирного текста. ", "terminal.integrated.cursorBlinking": "Управляет миганием курсора терминала.", "terminal.integrated.cursorStyle": "Определяет стиль курсора терминала.", "terminal.integrated.scrollback": "Определяет предельное число строк в буфере терминала.", "terminal.integrated.setLocaleVariables": "Управляет заданием переменных при запуске терминала, значение по умолчанию: \"True\" для OS X и \"False\" для других платформ.", "terminal.integrated.cwd": "Путь явного запуска, по которому будет запущен терминал. Используется в качестве текущего рабочего каталога (cwd) для процесса оболочки. Это может быть особенно удобно в параметрах рабочей области, если корневой каталог не является подходящим каталогом cwd.", "terminal.integrated.confirmOnExit": "Указывает, следует ли при выходе выводить подтверждение об имеющихся активных сеансах терминала.", + "terminal.integrated.enableBell": "Определяет, включен ли \"звонок\" терминала.", "terminal.integrated.commandsToSkipShell": "Набор идентификаторов команд, настраиваемые сочетания клавиш которых не будут передаваться в оболочку, а вместо этого будут всегда обрабатываться Code. Это позволяет использовать настраиваемые сочетания клавиш, которые при обычных условиях были бы использованы оболочкой и работали бы так же, как если бы терминал не имел фокуса, например клавиши CTRL+P запускали бы Quick Open.", "terminal.integrated.env.osx": "Объект с переменными среды, которые будут добавлены к процессу VS Code для использования в терминале OS X", "terminal.integrated.env.linux": "Объект с переменными среды, которые будут добавлены к процессу VS Code для использования в терминале Linux ", "terminal.integrated.env.windows": "Объект с переменными среды, которые будут добавлены к процессу VS Code для использования в терминале Windows", + "terminal.integrated.showExitAlert": "Отображать предупреждение \"Процесс терминала завершен с кодом выхода\", если код выхода не равен нулю.", "terminalCategory": "Терминал", "viewCategory": "Просмотреть" } \ 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 e4a7dd24430..d43f2b103ef 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 @@ -16,6 +16,8 @@ "workbench.action.terminal.deleteWordRight": "Удалить слово справа", "workbench.action.terminal.new": "Создание нового интегрированного терминала", "workbench.action.terminal.new.short": "Новый терминал", + "workbench.action.terminal.newWorkspacePlaceholder": "Выбрать текущий рабочий каталог для нового терминала", + "workbench.action.terminal.newInActiveWorkspace": "Создать новый интегрированный терминал (в активной рабочей области)", "workbench.action.terminal.focus": "Фокус на терминале", "workbench.action.terminal.focusNext": "Фокус на следующем терминале", "workbench.action.terminal.focusPrevious": "Фокус на предыдущем терминале", 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 e48d7b1d2ac..5d87c842d72 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 @@ -10,5 +10,6 @@ "terminal.foreground": "Цвет переднего плана терминала.", "terminalCursor.foreground": "Цвет переднего плана курсора терминала.", "terminalCursor.background": "Цвет фона курсора терминала. Позволяет выбрать цвет символа, который перекрывается блочным курсором.", - "terminal.selectionBackground": "Цвет фона выделения терминала." + "terminal.selectionBackground": "Цвет фона выделения терминала.", + "terminal.ansiColor": "Цвет ANSI \"{0}\" в терминале." } \ 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 3c71e76847d..86dafb69b0f 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 @@ -6,6 +6,9 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "terminal.integrated.a11yBlankLine": "Пустая строка", + "terminal.integrated.a11yPromptLabel": "Ввод терминала", + "terminal.integrated.a11yTooMuchOutput": "Объем выходных данных слишком велик для создания оповещения; проверьте строки вручную", "terminal.integrated.copySelection.noSelection": "В терминале отсутствует выделенный текст для копирования", "terminal.integrated.exitedWithCode": "Процесс терминала завершен с кодом выхода: {0}", "terminal.integrated.waitOnExit": "Нажмите любую клавишу, чтобы закрыть терминал.", diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json index 5895a366543..c0d1bbc3e20 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -9,6 +9,7 @@ "terminal.integrated.chooseWindowsShellInfo": "Вы можете изменить оболочку терминала по умолчанию, нажав кнопку \"Настроить\".", "customize": "Настроить", "cancel": "Отмена", + "never again": "ОК, больше не показывать", "terminal.integrated.chooseWindowsShell": "Выберите предпочитаемую оболочку терминала. Ее можно позже изменить в параметрах", "terminalService.terminalCloseConfirmationSingular": "Есть активный сеанс терминала, завершить его?", "terminalService.terminalCloseConfirmationPlural": "Есть несколько активных сеансов терминала ({0}), завершить их?" diff --git a/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json index 522f111f58e..18124ac0173 100644 --- a/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -8,5 +8,6 @@ ], "release notes": "Заметки о выпуске", "updateConfigurationTitle": "Обновить", - "updateChannel": "Настройте канал обновления, по которому вы будете получать обновления. После изменения значения необходим перезапуск." + "updateChannel": "Настройте канал обновления, по которому вы будете получать обновления. После изменения значения необходим перезапуск.", + "enableWindowsBackgroundUpdates": "Включает обновления Windows в фоновом режиме." } \ No newline at end of file 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 9f0954a0641..b54b0cfefeb 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 @@ -20,16 +20,21 @@ "noUpdatesAvailable": "В настоящее время нет доступных обновлений.", "download now": "Скачать сейчас", "thereIsUpdateAvailable": "Доступно обновление.", + "installUpdate": "Установить обновление", + "updateAvailable": "Доступно обновление: {0} {1}", + "updateInstalling": "{0} {1} устанавливается в фоновом режиме, мы сообщим вам о завершении.", "updateNow": "Обновить сейчас", "updateAvailableAfterRestart": "{0} будет обновлен после перезапуска.", "commandPalette": "Палитра команд...", "settings": "Параметры", "keyboardShortcuts": "Сочетания клавиш", + "userSnippets": "Фрагменты кода пользователя", "selectTheme.label": "Цветовая тема", "themes.selectIconTheme.label": "Тема значков файлов", "checkForUpdates": "Проверить наличие обновлений...", "checkingForUpdates": "Идет проверка наличия обновлений...", "DownloadingUpdate": "Скачивается обновление...", + "installUpdate...": "Установить обновление...", "installingUpdate": "Идет установка обновления...", "restartToUpdate": "Перезапустить для обновления..." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json b/i18n/rus/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json index 9661f9ed6db..6f52d0bf69f 100644 --- a/i18n/rus/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json +++ b/i18n/rus/src/vs/workbench/services/configuration/common/configurationExtensionPoint.i18n.json @@ -21,6 +21,7 @@ "workspaceConfig.name.description": "Необязательное имя папки.", "workspaceConfig.uri.description": "URI папки", "workspaceConfig.settings.description": "Параметры рабочей области", + "workspaceConfig.launch.description": "Конфигурации запуска рабочей области", "workspaceConfig.extensions.description": "Расширения рабочей области", "unknownWorkspaceProperty": "Неизвестное свойство рабочей области" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/files/electron-browser/remoteFileService.i18n.json b/i18n/rus/src/vs/workbench/services/files/electron-browser/remoteFileService.i18n.json index 03822ddf2b9..b754ce1af13 100644 --- a/i18n/rus/src/vs/workbench/services/files/electron-browser/remoteFileService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/files/electron-browser/remoteFileService.i18n.json @@ -6,6 +6,7 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "fileIsDirectoryError": "Файл является каталогом", "fileNotModifiedError": "undefined", "fileBinaryError": "Похоже, файл является двоичным, и его нельзя открыть как текстовый." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/rus/src/vs/workbench/services/files/node/fileService.i18n.json index cd7a65a19e4..10de0847f46 100644 --- a/i18n/rus/src/vs/workbench/services/files/node/fileService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/files/node/fileService.i18n.json @@ -12,6 +12,7 @@ "fileTooLargeError": "Не удается открыть файл, так как он имеет слишком большой размер", "fileNotFoundError": "Файл не найден ({0})", "fileBinaryError": "Похоже, файл является двоичным, и его нельзя открыть как текстовый.", + "filePermission": "Отсутствует разрешение на запись в файл ({0})", "fileExists": "Создаваемый файл уже существует ({0})", "fileMoveConflict": "Невозможно переместить или скопировать файл, так как он уже существует в папке назначения.", "unableToMoveCopyError": "Невозможно переместить или скопировать файл, так как он заменил бы папку, в которой содержится.", 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 b18b5d56bab..920221aaf1f 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 @@ -24,5 +24,6 @@ "keybindings.json.when": "Условие, когда клавиша нажата.", "keybindings.json.args": "Аргументы, передаваемые в выполняемую команду.", "keyboardConfigurationTitle": "Клавиатура", - "dispatch": "Управляет логикой диспетчеризации для нажатий клавиш \"code\" (рекомендуется) или \"keyCode\"." + "dispatch": "Управляет логикой диспетчеризации для нажатий клавиш \"code\" (рекомендуется) или \"keyCode\".", + "touchbar.enabled": "Включает кнопки сенсорной панели macOS на клавиатуре, если они доступны." } \ No newline at end of file diff --git a/i18n/trk/extensions/git/package.i18n.json b/i18n/trk/extensions/git/package.i18n.json index f7b71e7ac2c..4c5ed661f39 100644 --- a/i18n/trk/extensions/git/package.i18n.json +++ b/i18n/trk/extensions/git/package.i18n.json @@ -73,6 +73,7 @@ "config.decorations.enabled": "Git'in gezgine ve açık düzenleyiciler görünümüne renkler ve göstergeler ile ekleme yapıp yapmadığını denetler.", "config.promptToSaveFilesBeforeCommit": "Commit'lemeden önce Git'in kaydedilmemiş dosyaları kontrol edip etmeyeceğini denetler.", "config.showInlineOpenFileAction": "Git değişiklikleri görünümünde satır içi Dosyayı Aç eyleminin gösterilip gösterilmeyeceğini denetler.", + "config.inputValidation": "Girdi sayacının ne zaman gösterileceğini denetler.", "config.detectSubmodules": "Git alt modüllerin otomatik olarak tespit edilip edilmeyeceğini denetler.", "colors.modified": "Değiştirilen kaynakların rengi.", "colors.deleted": "Silinen kaynakların rengi.", diff --git a/i18n/trk/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json b/i18n/trk/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json index e526a94f4fe..922f61899ca 100644 --- a/i18n/trk/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json +++ b/i18n/trk/src/vs/code/electron-browser/issue/issueReporterMain.i18n.json @@ -9,6 +9,7 @@ "previewOnGitHub": "GitHub'da Önizle", "similarIssues": "Benzer sorunlar", "noResults": "Sonuç bulunamadı", + "rateLimited": "API limiti aşıldı", "stepsToReproduce": "Yeniden oluşturma adımları", "bugDescription": "Bu sorunla nasıl karşılaştınız? Sorunu güvenilir bir şekilde oluşturmak için gerçekleştirmeniz gereken adımlar nelerdir? Ne olmasını bekliyordunuz ve karşılığında ne oldu?", "performanceIssueDesciption": "Bu performans sorunu ne zaman oluştu? Örneğin, başlangıçtan sonra mı yoksa belirli eylemlerden sonra mı oluşuyor? Belirteceğiniz her detay araştırmamıza yardımcı olacaktır.", diff --git a/i18n/trk/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json b/i18n/trk/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json index 9335c658b90..c58bf060a51 100644 --- a/i18n/trk/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json +++ b/i18n/trk/src/vs/code/electron-browser/issue/issueReporterPage.i18n.json @@ -23,6 +23,7 @@ "tryDisablingExtensions": "Eklentiler devre dışı bırakıldığında sorun yeniden oluşturulabiliyor", "disableExtensions": "tüm eklentileri devre dışı bırakıp pencereyi yeniden yükleyin", "showRunningExtensions": "tüm çalışan eklentileri görün", + "githubMarkdown": "GitHub-tarzı Markdown'ı destekliyoruz. GitHub'da önizleme yaptığımızda sorununuzu düzenleyebilecek ve ekran görüntüleri ekleyebileceksiniz.", "issueDescriptionRequired": "Lütfen bir açıklama girin.", "loadingData": "Veri yükleniyor..." } \ 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 index 677e275ea7b..788541c699b 100644 --- a/i18n/trk/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/trk/src/vs/code/electron-main/menus.i18n.json @@ -90,6 +90,7 @@ "miMarker": "S&&orunlar", "miAdditionalViews": "&&Ek Görünümler", "miCommandPalette": "Komut &&Paleti...", + "miOpenView": "&&Görünümü Aç...", "miToggleFullScreen": "Tam Ekra&&nı Aç/Kapat", "miToggleZenMode": "Zen Modunu Aç/Kapat", "miToggleMenuBar": "&&Menü Çubuğunu Gizle/Göster", diff --git a/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json index fe3cdc25532..a5bd635fbcf 100644 --- a/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -67,6 +67,9 @@ "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.", "suggestSelection.first": "Her zaman ilk öneriyi seç.", + "suggestSelection.recentlyUsed": "Devamını yazarak başka bir tanesini tamamlamadığınız sürece son zamanlarda kullanılan önerileri seçin, ör. `console.| -> console.log` çünkü `log` son zamanlarda seçilmiştir.", + "suggestSelection.recentlyUsedByPrefix": "Öneklere dayanan ve daha önce tamamlama yaptığınız önerileri seçin, ör. `co -> console` ve `con -> const`.", + "suggestSelection": "Öneri listesi gösterilirken ön seçiminin nasıl yapılacağı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", diff --git a/i18n/trk/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json b/i18n/trk/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json index e5c99a76729..4dcdf3f519f 100644 --- a/i18n/trk/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json +++ b/i18n/trk/src/vs/editor/contrib/bracketMatching/bracketMatching.i18n.json @@ -7,5 +7,6 @@ "Do not edit this file. It is machine generated." ], "overviewRulerBracketMatchForeground": "Eşleşen ayraçlar için genel bakış cetvelinin işaretleyici rengi.", - "smartSelect.jumpBracket": "Ayraca Git" + "smartSelect.jumpBracket": "Ayraca Git", + "smartSelect.selectToBracket": "Ayraca Kadar Seç" } \ 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 index cd45b59aebc..a8cf3c979b7 100644 --- 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 @@ -33,6 +33,7 @@ "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.", "useUniqueNames": "Lütfen benzersiz yapılandırma adları kullanın.", + "app.launch.json.compound.folder": "Bileşiğin bulunduğu klasörün adı.", "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.", "selectDebug": "Ortam Seçin", 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 index 6460a155a16..f5566ad1a03 100644 --- 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 @@ -13,6 +13,9 @@ "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.", + "noConfigurationNameInWorkspace": "Çalışma alanında '{0}' başlatma yapılandırması bulunamadı.", + "multipleConfigurationNamesInWorkspace": "Çalışma alanında birden fazla `{0}` başlatma yapılandırması var. Yapılandırmayı belirtmek için klasör adını kullanın.", + "noFolderWithName": "'{2}' bileşiğindeki '{1}' yapılandırması için '{0}' adlı klasör bulunamadı.", "configMissing": "'launch.json' dosyasında '{0}' yapılandırması eksik.", "launchJsonDoesNotExist": "'launch.json' mevcut değil.", "debugRequestNotSupported": "Seçilen hata ayıklama yapılandırılmasındaki `{0}` özniteliği desteklenmeyen `{1}` değeri içeriyor.", 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 index 0899baae717..d7ea7654fbb 100644 --- a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -33,8 +33,10 @@ "view id": "ID", "view name": "Adı", "view location": "Yeri", + "localizations": "Çeviriler ({0})", "localizations language id": "Dil Kimliği", "localizations language name": "Dil Adı", + "localizations localized language name": "Dil Adı (Çevrilen Dilde)", "colorThemes": "Renk Temaları ({0})", "iconThemes": "Simge Temaları ({0})", "colors": "Renkler ({0})", diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json index d50a2c42059..d2997058702 100644 --- a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionProfileService.i18n.json @@ -6,5 +6,6 @@ "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], + "noPro": "Eklentileri ayrımlamak için, `--inspect-extensions=<port>` parametresi ile çalıştırın.", "selectAndStartDebug": "Ayrımlamayı durdurmak için tıklayın." } \ 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 index cdc94b0f213..a26140e1ab9 100644 --- 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 @@ -11,6 +11,7 @@ "workspaceRecommendation": "Bu eklenti geçerli çalışma alanı kullanıcıları tarafından tavsiye ediliyor.", "fileBasedRecommendation": "Bu eklenti yakınlarda açtığınız dosyalara dayanarak tavsiye ediliyor.", "exeBasedRecommendation": "Bu eklenti, sizde {0} kurulu olduğu için tavsiye ediliyor.", + "dynamicWorkspaceRecommendation": "Bu eklenti şu anki çalışma alanındaki diğer birçok kullanıcı tarafından kullanıldığı için ilginizi çekebilir.", "reallyRecommended2": "'{0}' eklentisi bu dosya türü için tavsiye edilir.", "reallyRecommendedExtensionPack": "'{0}' eklenti paketi bu dosya türü için tavsiye edilir.", "showRecommendations": "Tavsiyeleri Göster", 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 index d7f8e0bba99..00780d6b0c2 100644 --- a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -9,6 +9,7 @@ "emptyUserSettingsHeader": "Varsayılan ayarların üzerine yazmak için ayarlarınızı buraya yerleştirin.", "emptyWorkspaceSettingsHeader": "Varsayılan kullanıcı ayarlarının üzerine yazmak için ayarlarınızı buraya yerleştirin.", "emptyFolderSettingsHeader": "Çalışma alanı ayarlarındakilerin üzerine yazmak için klasör ayarlarınızı buraya yerleştirin.", + "newExtensionLabel": "\"{0}\" Eklentisini Göster", "editTtile": "Düzenle", "replaceDefaultValue": "Ayarlarda Değiştir", "copyDefaultValue": "Ayarlara Kopyala", 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 index 36924d0a44b..7c27215e26a 100644 --- 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 @@ -8,6 +8,7 @@ ], "terminal.integrated.a11yBlankLine": "Boş satır", "terminal.integrated.a11yPromptLabel": "Terminal girdisi", + "terminal.integrated.a11yTooMuchOutput": "Gösterilecek çok fazla çıktı var, okumak için satırları manuel olarak gezin.", "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", diff --git a/package.json b/package.json index a31d663e45f..d5ecf0b52ef 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", - "version": "1.20.0", - "distro": "4043249e7a0ad8b60b7ad1cae7c80234f32e3b01", + "version": "1.21.0", + "distro": "4957472198ae7ca4a3ed49fd40d6d082c0bc592b", "author": { "name": "Microsoft Corporation" }, @@ -44,9 +44,9 @@ "v8-inspect-profiler": "^0.0.7", "vscode-chokidar": "1.6.2", "vscode-debugprotocol": "1.25.0", - "vscode-ripgrep": "^0.7.1-patch.0", + "vscode-ripgrep": "0.7.1-patch.1.1", "vscode-textmate": "^3.2.0", - "vscode-xterm": "3.1.0-beta15", + "vscode-xterm": "3.2.0-beta1", "yauzl": "2.8.0" }, "devDependencies": { @@ -132,4 +132,4 @@ "windows-mutex": "^0.2.0", "windows-process-tree": "0.1.6" } -} \ No newline at end of file +} diff --git a/src/typings/vscode-xterm.d.ts b/src/typings/vscode-xterm.d.ts index 5add50ae237..773a98fa581 100644 --- a/src/typings/vscode-xterm.d.ts +++ b/src/typings/vscode-xterm.d.ts @@ -87,6 +87,12 @@ declare module 'vscode-xterm' { */ macOptionIsMeta?: boolean; + /** + * Whether to select the word under the cursor on right click, this is + * standard behavior in a lot of macOS applications. + */ + rightClickSelectsWord?: boolean; + /** * The number of rows in the terminal. */ @@ -469,7 +475,7 @@ declare module 'vscode-xterm' { * Retrieves an option's value from the terminal. * @param key The option key. */ - getOption(key: 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'enableBold' | 'macOptionIsMeta' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell'): boolean; + getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'enableBold' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell'): boolean; /** * Retrieves an option's value from the terminal. * @param key The option key. @@ -514,7 +520,7 @@ declare module 'vscode-xterm' { * @param key The option key. * @param value The option value. */ - setOption(key: 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'enableBold' | 'macOptionIsMeta' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell', value: boolean): void; + setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'enableBold' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell', value: boolean): void; /** * Sets an option on the terminal. * @param key The option key. diff --git a/src/vs/base/browser/dnd.ts b/src/vs/base/browser/dnd.ts index 85bc36aac42..82e5954e301 100644 --- a/src/vs/base/browser/dnd.ts +++ b/src/vs/base/browser/dnd.ts @@ -45,20 +45,20 @@ export class DelayedDragHandler { export const DataTransfers = { /** - * Application specific resource transfer type. + * Application specific resource transfer type */ - URL: 'URL', + RESOURCES: 'ResourceURLs', /** - * Application specific resource transfer type when multiple resources are being dragged. - */ - URLS: 'URLS', - - /** - * Browser specific transfer type to download. + * Browser specific transfer type to download */ DOWNLOAD_URL: 'DownloadURL', + /** + * Browser specific transfer type for files + */ + FILES: 'Files', + /** * Typicaly transfer type for copy/paste transfers. */ diff --git a/src/vs/base/browser/touch.ts b/src/vs/base/browser/touch.ts index 57c603edcbb..a9478ba3025 100644 --- a/src/vs/base/browser/touch.ts +++ b/src/vs/base/browser/touch.ts @@ -100,7 +100,7 @@ export class Gesture implements IDisposable { @memoize private static isTouchDevice(): boolean { - return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0; + return 'ontouchstart' in window as any || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0; } public dispose(): void { diff --git a/src/vs/base/browser/ui/iconLabel/iconLabel.ts b/src/vs/base/browser/ui/iconLabel/iconLabel.ts index 26b4d09bcd3..764e32a0c84 100644 --- a/src/vs/base/browser/ui/iconLabel/iconLabel.ts +++ b/src/vs/base/browser/ui/iconLabel/iconLabel.ts @@ -16,13 +16,16 @@ import { IDisposable, combinedDisposable } from 'vs/base/common/lifecycle'; export interface IIconLabelCreationOptions { supportHighlights?: boolean; + supportDescriptionHighlights?: boolean; } -export interface IIconLabelOptions { +export interface IIconLabelValueOptions { title?: string; + descriptionTitle?: string; extraClasses?: string[]; italic?: boolean; matches?: IMatch[]; + descriptionMatches?: IMatch[]; } class FastLabelNode { @@ -63,7 +66,11 @@ class FastLabelNode { } this._title = title; - this._element.title = title; + if (this._title) { + this._element.title = title; + } else { + this._element.removeAttribute('title'); + } } public set empty(empty: boolean) { @@ -82,21 +89,27 @@ class FastLabelNode { export class IconLabel { private domNode: FastLabelNode; + private labelDescriptionContainer: FastLabelNode; private labelNode: FastLabelNode | HighlightedLabel; - private descriptionNode: FastLabelNode; + private descriptionNode: FastLabelNode | HighlightedLabel; + private descriptionNodeFactory: () => FastLabelNode | HighlightedLabel; constructor(container: HTMLElement, options?: IIconLabelCreationOptions) { this.domNode = new FastLabelNode(dom.append(container, dom.$('.monaco-icon-label'))); - const labelDescriptionContainer = new FastLabelNode(dom.append(this.domNode.element, dom.$('.monaco-icon-label-description-container'))); + this.labelDescriptionContainer = new FastLabelNode(dom.append(this.domNode.element, dom.$('.monaco-icon-label-description-container'))); if (options && options.supportHighlights) { - this.labelNode = new HighlightedLabel(dom.append(labelDescriptionContainer.element, dom.$('a.label-name'))); + this.labelNode = new HighlightedLabel(dom.append(this.labelDescriptionContainer.element, dom.$('a.label-name'))); } else { - this.labelNode = new FastLabelNode(dom.append(labelDescriptionContainer.element, dom.$('a.label-name'))); + this.labelNode = new FastLabelNode(dom.append(this.labelDescriptionContainer.element, dom.$('a.label-name'))); } - this.descriptionNode = new FastLabelNode(dom.append(labelDescriptionContainer.element, dom.$('span.label-description'))); + if (options && options.supportDescriptionHighlights) { + this.descriptionNodeFactory = () => new HighlightedLabel(dom.append(this.labelDescriptionContainer.element, dom.$('span.label-description'))); + } else { + this.descriptionNodeFactory = () => new FastLabelNode(dom.append(this.labelDescriptionContainer.element, dom.$('span.label-description'))); + } } public get element(): HTMLElement { @@ -105,21 +118,11 @@ export class IconLabel { public onClick(callback: (event: MouseEvent) => void): IDisposable { return combinedDisposable([ - dom.addDisposableListener(this.labelElement, dom.EventType.CLICK, (e: MouseEvent) => callback(e)), - dom.addDisposableListener(this.descriptionNode.element, dom.EventType.CLICK, (e: MouseEvent) => callback(e)) + dom.addDisposableListener(this.labelDescriptionContainer.element, dom.EventType.CLICK, (e: MouseEvent) => callback(e)), ]); } - private get labelElement(): HTMLElement { - const labelNode = this.labelNode; - if (labelNode instanceof HighlightedLabel) { - return labelNode.element; - } - - return labelNode.element; - } - - public setValue(label?: string, description?: string, options?: IIconLabelOptions): void { + public setValue(label?: string, description?: string, options?: IIconLabelValueOptions): void { const classes = ['monaco-icon-label']; if (options) { if (options.extraClasses) { @@ -134,21 +137,39 @@ export class IconLabel { this.domNode.className = classes.join(' '); this.domNode.title = options && options.title ? options.title : ''; - const labelNode = this.labelNode; - if (labelNode instanceof HighlightedLabel) { - labelNode.set(label || '', options ? options.matches : void 0); + if (this.labelNode instanceof HighlightedLabel) { + this.labelNode.set(label || '', options ? options.matches : void 0); } else { - labelNode.textContent = label || ''; + this.labelNode.textContent = label || ''; } - this.descriptionNode.textContent = description || ''; - this.descriptionNode.empty = !description; + if (description || this.descriptionNode) { + if (!this.descriptionNode) { + this.descriptionNode = this.descriptionNodeFactory(); // description node is created lazily on demand + } + + if (this.descriptionNode instanceof HighlightedLabel) { + this.descriptionNode.set(description || '', options ? options.descriptionMatches : void 0); + if (options && options.descriptionTitle) { + this.descriptionNode.element.title = options.descriptionTitle; + } else { + this.descriptionNode.element.removeAttribute('title'); + } + } else { + this.descriptionNode.textContent = description || ''; + this.descriptionNode.title = options && options.descriptionTitle ? options.descriptionTitle : ''; + this.descriptionNode.empty = !description; + } + } } public dispose(): void { this.domNode.dispose(); this.labelNode.dispose(); - this.descriptionNode.dispose(); + + if (this.descriptionNode) { + this.descriptionNode.dispose(); + } } } diff --git a/src/vs/base/browser/ui/inputbox/inputBox.ts b/src/vs/base/browser/ui/inputbox/inputBox.ts index df7c0b99ba6..47f33833fe2 100644 --- a/src/vs/base/browser/ui/inputbox/inputBox.ts +++ b/src/vs/base/browser/ui/inputbox/inputBox.ts @@ -160,8 +160,7 @@ export class InputBox extends Widget { } if (this.placeholder) { - this.input.setAttribute('placeholder', this.placeholder); - this.input.title = this.placeholder; + this.setPlaceHolder(this.placeholder); } this.oninput(this.input, () => this.onValueChange()); @@ -204,6 +203,7 @@ export class InputBox extends Widget { public setPlaceHolder(placeHolder: string): void { if (this.input) { this.input.setAttribute('placeholder', placeHolder); + this.input.title = placeHolder; } } diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index 804081a26f0..ed5bf0ceba4 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -364,8 +364,14 @@ const DefaultMultipleSelectionContoller = { }; const DefaultOpenController = { - shouldOpen: (event: UIEvent) => true -}; + shouldOpen: (event: UIEvent) => { + if (event instanceof MouseEvent) { + return event.button === 0 /* left mouse button */ || event.button === 1 /* middle mouse button */; + } + + return true; + } +} as IOpenController; class MouseController<T> implements IDisposable { diff --git a/src/vs/base/browser/ui/selectBox/selectBox.ts b/src/vs/base/browser/ui/selectBox/selectBox.ts index c9939222f77..157fa9410d2 100644 --- a/src/vs/base/browser/ui/selectBox/selectBox.ts +++ b/src/vs/base/browser/ui/selectBox/selectBox.ts @@ -36,6 +36,7 @@ export interface ISelectBoxDelegate { export interface ISelectBoxStyles extends IListStyles { selectBackground?: Color; + selectListBackground?: Color; selectForeground?: Color; selectBorder?: Color; focusBorder?: Color; diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts index b087da27605..079989e3dde 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts @@ -306,8 +306,11 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate<ISelectOptio public applyStyles(): void { // Style parent select + + let background = null; + if (this.selectElement) { - const background = this.styles.selectBackground ? this.styles.selectBackground.toString() : null; + background = this.styles.selectBackground ? this.styles.selectBackground.toString() : null; const foreground = this.styles.selectForeground ? this.styles.selectForeground.toString() : null; const border = this.styles.selectBorder ? this.styles.selectBorder.toString() : null; @@ -321,8 +324,8 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate<ISelectOptio if (this.selectList) { this.selectList.style({}); - const background = this.styles.selectBackground ? this.styles.selectBackground.toString() : null; - this.selectDropDownListContainer.style.backgroundColor = background; + let listBackground = this.styles.selectListBackground ? this.styles.selectListBackground.toString() : background; + this.selectDropDownListContainer.style.backgroundColor = listBackground; const optionsBorder = this.styles.focusBorder ? this.styles.focusBorder.toString() : null; this.selectDropDownContainer.style.outlineColor = optionsBorder; this.selectDropDownContainer.style.outlineOffset = '-1px'; @@ -350,7 +353,7 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate<ISelectOptio this.cloneElementFont(this.selectElement, this.selectDropDownContainer); this.contextViewProvider.showContextView({ getAnchor: () => this.selectElement, - render: (container: HTMLElement) => { return this.renderSelectDropDown(container); }, + render: (container: HTMLElement) => this.renderSelectDropDown(container), layout: () => this.layoutSelectDropDown(), onHide: () => { dom.toggleClass(this.selectDropDownContainer, 'visible', false); @@ -372,7 +375,7 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate<ISelectOptio this.contextViewProvider.hideContextView(); } - private renderSelectDropDown(container: HTMLElement) { + private renderSelectDropDown(container: HTMLElement): IDisposable { dom.append(container, this.selectDropDownContainer); this.layoutSelectDropDown(); return null; diff --git a/src/vs/base/browser/ui/splitview/panelview.css b/src/vs/base/browser/ui/splitview/panelview.css index 50a7d87499a..51e31aa0d21 100644 --- a/src/vs/base/browser/ui/splitview/panelview.css +++ b/src/vs/base/browser/ui/splitview/panelview.css @@ -54,6 +54,7 @@ /* TODO: actions should be part of the panel, but they aren't yet */ .monaco-panel-view .panel:hover > .panel-header.expanded > .actions, +.monaco-panel-view .panel > .panel-header.actions-always-visible.expanded > .actions, .monaco-panel-view .panel > .panel-header.focused.expanded > .actions { display: initial; } diff --git a/src/vs/base/common/color.ts b/src/vs/base/common/color.ts index f18a87dc15e..c92127cf5b4 100644 --- a/src/vs/base/common/color.ts +++ b/src/vs/base/common/color.ts @@ -399,6 +399,22 @@ export class Color { return new Color(new RGBA(r, g, b, a)); } + flatten(...backgrounds: Color[]): Color { + const background = backgrounds.reduceRight((accumulator, color) => { + return Color._flatten(color, accumulator); + }); + return Color._flatten(this, background); + } + + private static _flatten(foreground: Color, background: Color) { + const backgroundAlpha = 1 - foreground.rgba.a; + return new Color(new RGBA( + backgroundAlpha * background.rgba.r + foreground.rgba.a * foreground.rgba.r, + backgroundAlpha * background.rgba.g + foreground.rgba.a * foreground.rgba.g, + backgroundAlpha * background.rgba.b + foreground.rgba.a * foreground.rgba.b + )); + } + toString(): string { return Color.Format.CSS.format(this); } diff --git a/src/vs/base/common/labels.ts b/src/vs/base/common/labels.ts index e00cc11da16..cb962143454 100644 --- a/src/vs/base/common/labels.ts +++ b/src/vs/base/common/labels.ts @@ -8,6 +8,7 @@ import URI from 'vs/base/common/uri'; import platform = require('vs/base/common/platform'); import { nativeSep, normalize, isEqualOrParent, isEqual, basename as pathsBasename, join } from 'vs/base/common/paths'; import { endsWith, ltrim } from 'vs/base/common/strings'; +import { Schemas } from 'vs/base/common/network'; export interface IWorkspaceFolderProvider { getWorkspaceFolder(resource: URI): { uri: URI }; @@ -29,7 +30,7 @@ export function getPathLabel(resource: URI | string, rootProvider?: IWorkspaceFo resource = URI.file(resource); } - if (resource.scheme !== 'file' && resource.scheme !== 'untitled') { + if (resource.scheme !== Schemas.file && resource.scheme !== Schemas.untitled) { return resource.with({ query: null, fragment: null }).toString(true); } diff --git a/src/vs/base/common/octicon.ts b/src/vs/base/common/octicon.ts new file mode 100644 index 00000000000..42358caa50d --- /dev/null +++ b/src/vs/base/common/octicon.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 { matchesFuzzy, IMatch } from 'vs/base/common/filters'; +import { ltrim } from 'vs/base/common/strings'; + +const octiconStartMarker = '$('; + +export interface IParsedOcticons { + text: string; + octiconOffsets?: number[]; +} + +export function parseOcticons(text: string): IParsedOcticons { + const firstOcticonIndex = text.indexOf(octiconStartMarker); + if (firstOcticonIndex === -1) { + return { text }; // return early if the word does not include an octicon + } + + return doParseOcticons(text, firstOcticonIndex); +} + +function doParseOcticons(text: string, firstOcticonIndex: number): IParsedOcticons { + const octiconOffsets: number[] = []; + let textWithoutOcticons: string = ''; + + function appendChars(chars: string) { + if (chars) { + textWithoutOcticons += chars; + + for (let i = 0; i < chars.length; i++) { + octiconOffsets.push(octiconsOffset); // make sure to fill in octicon offsets + } + } + } + + let currentOcticonStart = -1; + let currentOcticonValue: string = ''; + let octiconsOffset = 0; + + let char: string; + let nextChar: string; + + let offset = firstOcticonIndex; + const length = text.length; + + // Append all characters until the first octicon + appendChars(text.substr(0, firstOcticonIndex)); + + // example: $(file-symlink-file) my cool $(other-octicon) entry + while (offset < length) { + char = text[offset]; + nextChar = text[offset + 1]; + + // beginning of octicon: some value $( <-- + if (char === octiconStartMarker[0] && nextChar === octiconStartMarker[1]) { + currentOcticonStart = offset; + + // if we had a previous potential octicon value without + // the closing ')', it was actually not an octicon and + // so we have to add it to the actual value + appendChars(currentOcticonValue); + + currentOcticonValue = octiconStartMarker; + + offset++; // jump over '(' + } + + // end of octicon: some value $(some-octicon) <-- + else if (char === ')' && currentOcticonStart !== -1) { + const currentOcticonLength = offset - currentOcticonStart + 1; // +1 to include the closing ')' + octiconsOffset += currentOcticonLength; + currentOcticonStart = -1; + currentOcticonValue = ''; + } + + // within octicon + else if (currentOcticonStart !== -1) { + currentOcticonValue += char; + } + + // any value outside of octicons + else { + appendChars(char); + } + + offset++; + } + + // if we had a previous potential octicon value without + // the closing ')', it was actually not an octicon and + // so we have to add it to the actual value + appendChars(currentOcticonValue); + + return { text: textWithoutOcticons, octiconOffsets }; +} + +export function matchesFuzzyOcticonAware(query: string, target: IParsedOcticons, enableSeparateSubstringMatching = false): IMatch[] { + const { text, octiconOffsets } = target; + + // Return early if there are no octicon markers in the word to match against + if (!octiconOffsets || octiconOffsets.length === 0) { + return matchesFuzzy(query, text, enableSeparateSubstringMatching); + } + + // Trim the word to match against because it could have leading + // whitespace now if the word started with an octicon + const wordToMatchAgainstWithoutOcticonsTrimmed = ltrim(text, ' '); + const leadingWhitespaceOffset = text.length - wordToMatchAgainstWithoutOcticonsTrimmed.length; + + // match on value without octicons + const matches = matchesFuzzy(query, wordToMatchAgainstWithoutOcticonsTrimmed, enableSeparateSubstringMatching); + + // Map matches back to offsets with octicons and trimming + if (matches) { + for (let i = 0; i < matches.length; i++) { + const octiconOffset = octiconOffsets[matches[i].start] /* octicon offsets at index */ + leadingWhitespaceOffset /* overall leading whitespace offset */; + matches[i].start += octiconOffset; + matches[i].end += octiconOffset; + } + } + + return matches; +} \ No newline at end of file diff --git a/src/vs/base/node/config.ts b/src/vs/base/node/config.ts index 8c8842d8efa..aa39e7d7abb 100644 --- a/src/vs/base/node/config.ts +++ b/src/vs/base/node/config.ts @@ -151,20 +151,16 @@ export class ConfigWatcher<T> implements IConfigWatcher<T>, IDisposable { return; // avoid watchers that will never get disposed by checking for being disposed } - try { - const watcher = extfs.watch(path, (type, file) => this.onConfigFileChange(type, file, isParentFolder)); - watcher.on('error', (code: number, signal: string) => this.options.onError(`Error watching ${path} for configuration changes (${code}, ${signal})`)); + const watcher = extfs.watch(path, + (type, file) => this.onConfigFileChange(type, file, isParentFolder), + (error: string) => this.options.onError(error) + ); + if (watcher) { this.disposables.push(toDisposable(() => { watcher.removeAllListeners(); watcher.close(); })); - } catch (error) { - fs.exists(path, exists => { - if (exists) { - this.options.onError(`Failed to watch ${path} for configuration changes (${error.toString()})`); - } - }); } } diff --git a/src/vs/base/node/extfs.ts b/src/vs/base/node/extfs.ts index 3b1e301967f..d3e56f8555b 100644 --- a/src/vs/base/node/extfs.ts +++ b/src/vs/base/node/extfs.ts @@ -598,21 +598,34 @@ function normalizePath(path: string): string { return strings.rtrim(paths.normalize(path), paths.sep); } -export function watch(path: string, onChange: (type: string, path: string) => void): fs.FSWatcher { - const watcher = fs.watch(path); - watcher.on('change', (type, raw) => { - let file: string = null; - if (raw) { // https://github.com/Microsoft/vscode/issues/38191 - file = raw.toString(); - if (platform.isMacintosh) { - // Mac: uses NFD unicode form on disk, but we want NFC - // See also https://github.com/nodejs/node/issues/2165 - file = strings.normalizeNFC(file); +export function watch(path: string, onChange: (type: string, path: string) => void, onError: (error: string) => void): fs.FSWatcher { + try { + const watcher = fs.watch(path); + + watcher.on('change', (type, raw) => { + let file: string = null; + if (raw) { // https://github.com/Microsoft/vscode/issues/38191 + file = raw.toString(); + if (platform.isMacintosh) { + // Mac: uses NFD unicode form on disk, but we want NFC + // See also https://github.com/nodejs/node/issues/2165 + file = strings.normalizeNFC(file); + } } - } - onChange(type, file); - }); + onChange(type, file); + }); - return watcher; + watcher.on('error', (code: number, signal: string) => onError(`Failed to watch ${path} for changes (${code}, ${signal})`)); + + return watcher; + } catch (error) { + fs.exists(path, exists => { + if (exists) { + onError(`Failed to watch ${path} for changes (${error.toString()})`); + } + }); + } + + return void 0; } \ No newline at end of file diff --git a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts index 914878e5454..0880137be99 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts @@ -10,7 +10,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import types = require('vs/base/common/types'); import URI from 'vs/base/common/uri'; import { ITree, IActionProvider } from 'vs/base/parts/tree/browser/tree'; -import { IconLabel, IIconLabelOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; +import { IconLabel, IIconLabelValueOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; import { IQuickNavigateConfiguration, IModel, IDataSource, IFilter, IAccessiblityProvider, IRenderer, IRunner, Mode } from 'vs/base/parts/quickopen/common/quickOpen'; import { Action, IAction, IActionRunner } from 'vs/base/common/actions'; import { compareAnything } from 'vs/base/common/comparers'; @@ -84,7 +84,7 @@ export class QuickOpenEntry { /** * The options for the label to use for this entry */ - public getLabelOptions(): IIconLabelOptions { + public getLabelOptions(): IIconLabelValueOptions { return null; } @@ -116,6 +116,20 @@ export class QuickOpenEntry { return null; } + /** + * A tooltip to show when hovering over the entry. + */ + public getTooltip(): string { + return null; + } + + /** + * A tooltip to show when hovering over the description portion of the entry. + */ + public getDescriptionTooltip(): string { + return null; + } + /** * An optional keybinding to show for an entry. */ @@ -220,7 +234,7 @@ export class QuickOpenEntryGroup extends QuickOpenEntry { return this.entry ? this.entry.getLabel() : super.getLabel(); } - public getLabelOptions(): IIconLabelOptions { + public getLabelOptions(): IIconLabelValueOptions { return this.entry ? this.entry.getLabelOptions() : super.getLabelOptions(); } @@ -298,7 +312,6 @@ export interface IQuickOpenEntryTemplateData { icon: HTMLSpanElement; label: IconLabel; detail: HighlightedLabel; - description: HighlightedLabel; keybinding: KeybindingLabel; actionBar: ActionBar; } @@ -352,13 +365,7 @@ class Renderer implements IRenderer<QuickOpenEntry> { row1.appendChild(icon); // Label - const label = new IconLabel(row1, { supportHighlights: true }); - - // Description - const descriptionContainer = document.createElement('span'); - row1.appendChild(descriptionContainer); - DOM.addClass(descriptionContainer, 'quick-open-entry-description'); - const description = new HighlightedLabel(descriptionContainer); + const label = new IconLabel(row1, { supportHighlights: true, supportDescriptionHighlights: true }); // Keybinding const keybindingContainer = document.createElement('span'); @@ -397,7 +404,6 @@ class Renderer implements IRenderer<QuickOpenEntry> { icon, label, detail, - description, keybinding, group, actionBar @@ -460,17 +466,16 @@ class Renderer implements IRenderer<QuickOpenEntry> { data.icon.className = iconClass; // Label - const options: IIconLabelOptions = entry.getLabelOptions() || Object.create(null); + const options: IIconLabelValueOptions = entry.getLabelOptions() || Object.create(null); options.matches = labelHighlights || []; - data.label.setValue(entry.getLabel(), null, options); + options.title = entry.getTooltip(); + options.descriptionTitle = entry.getDescriptionTooltip() || entry.getDescription(); // tooltip over description because it could overflow + options.descriptionMatches = descriptionHighlights || []; + data.label.setValue(entry.getLabel(), entry.getDescription(), options); // Meta data.detail.set(entry.getDetail(), detailHighlights); - // Description - data.description.set(entry.getDescription(), descriptionHighlights || []); - data.description.element.title = entry.getDescription(); - // Keybinding data.keybinding.set(entry.getKeybinding(), null); } @@ -482,8 +487,6 @@ class Renderer implements IRenderer<QuickOpenEntry> { data.actionBar = null; data.container = null; data.entry = null; - data.description.dispose(); - data.description = null; data.keybinding.dispose(); data.keybinding = null; data.detail.dispose(); diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index 4804d0c7b46..61b96456350 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -26,6 +26,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { Color } from 'vs/base/common/color'; import { mixin } from 'vs/base/common/objects'; +import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; export interface IQuickOpenCallbacks { onOk: () => void; @@ -253,7 +254,10 @@ export class QuickOpenWidget implements IModelProvider { this.toUnbind.push(this.tree.onDidChangeSelection((event: ISelectionEvent) => { if (event.selection && event.selection.length > 0) { - this.elementSelected(event.selection[0], event); + const mouseEvent: StandardMouseEvent = event.payload && event.payload.originalEvent instanceof StandardMouseEvent ? event.payload.originalEvent : void 0; + const shouldOpenInBackground = mouseEvent ? this.shouldOpenInBackground(mouseEvent) : false; + + this.elementSelected(event.selection[0], event, shouldOpenInBackground ? Mode.OPEN_IN_BACKGROUND : Mode.OPEN); } })); }). @@ -399,19 +403,26 @@ export class QuickOpenWidget implements IModelProvider { } } - private shouldOpenInBackground(e: StandardKeyboardEvent): boolean { - if (e.keyCode !== KeyCode.RightArrow) { - return false; // only for right arrow + private shouldOpenInBackground(e: StandardKeyboardEvent | StandardMouseEvent): boolean { + + // Keyboard + if (e instanceof StandardKeyboardEvent) { + if (e.keyCode !== KeyCode.RightArrow) { + return false; // only for right arrow + } + + if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) { + return false; // no modifiers allowed + } + + // validate the cursor is at the end of the input and there is no selection, + // and if not prevent opening in the background such as the selection can be changed + const element = this.inputBox.inputElement; + return element.selectionEnd === this.inputBox.value.length && element.selectionStart === element.selectionEnd; } - if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) { - return false; // no modifiers allowed - } - - // validate the cursor is at the end of the input and there is no selection, - // and if not prevent opening in the background such as the selection can be changed - const element = this.inputBox.inputElement; - return element.selectionEnd === this.inputBox.value.length && element.selectionStart === element.selectionEnd; + // Mouse + return e.middleButton; } private onType(): void { diff --git a/src/vs/base/parts/quickopen/browser/quickopen.css b/src/vs/base/parts/quickopen/browser/quickopen.css index 18dc9c52559..722ca1358e0 100644 --- a/src/vs/base/parts/quickopen/browser/quickopen.css +++ b/src/vs/base/parts/quickopen/browser/quickopen.css @@ -70,6 +70,11 @@ flex-shrink: 0; } +.quick-open-widget .quick-open-tree .monaco-icon-label, +.quick-open-widget .quick-open-tree .monaco-icon-label .monaco-icon-label-description-container { + flex: 1; /* make sure the icon label grows within the row */ +} + .quick-open-widget .quick-open-tree .quick-open-entry .monaco-highlighted-label span { opacity: 1; } @@ -79,15 +84,6 @@ line-height: normal; } -.quick-open-widget .quick-open-tree .quick-open-entry-description { - opacity: 0.7; - margin-left: 0.5em; - font-size: 0.9em; - overflow: hidden; - flex: 1; - text-overflow: ellipsis; -} - .quick-open-widget .quick-open-tree .content.has-group-label .quick-open-entry-keybinding { margin-right: 8px; } diff --git a/src/vs/base/parts/quickopen/common/quickOpenScorer.ts b/src/vs/base/parts/quickopen/common/quickOpenScorer.ts index 4d151a7c217..50c3cfa8050 100644 --- a/src/vs/base/parts/quickopen/common/quickOpenScorer.ts +++ b/src/vs/base/parts/quickopen/common/quickOpenScorer.ts @@ -87,10 +87,10 @@ function doScore(query: string, queryLower: string, queryLength: number, target: const leftIndex = currentIndex - 1; const diagIndex = (queryIndex - 1) * targetLength + targetIndex - 1; - const leftScore = targetIndex > 0 ? scores[leftIndex] : 0; - const diagScore = queryIndex > 0 && targetIndex > 0 ? scores[diagIndex] : 0; + const leftScore: number = targetIndex > 0 ? scores[leftIndex] : 0; + const diagScore: number = queryIndex > 0 && targetIndex > 0 ? scores[diagIndex] : 0; - const matchesSequenceLength = queryIndex > 0 && targetIndex > 0 ? matches[diagIndex] : 0; + const matchesSequenceLength: number = queryIndex > 0 && targetIndex > 0 ? matches[diagIndex] : 0; // If we are not matching on the first query character any more, we only produce a // score if we had a score previously for the last query index (by looking at the diagScore). diff --git a/src/vs/base/parts/tree/browser/treeDefaults.ts b/src/vs/base/parts/tree/browser/treeDefaults.ts index 845ec66aa4c..9f1cd3cd48d 100644 --- a/src/vs/base/parts/tree/browser/treeDefaults.ts +++ b/src/vs/base/parts/tree/browser/treeDefaults.ts @@ -88,7 +88,7 @@ export class DefaultController implements _.IController { private options: IControllerOptions; - constructor(options: IControllerOptions = { clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: true, openMode: OpenMode.SINGLE_CLICK }) { + constructor(options: IControllerOptions = { clickBehavior: ClickBehavior.ON_MOUSE_DOWN, keyboardSupport: true, openMode: OpenMode.SINGLE_CLICK }) { this.options = options; this.downKeyBindingDispatcher = new KeybindingDispatcher(); @@ -159,13 +159,14 @@ export class DefaultController implements _.IController { protected onLeftClick(tree: _.ITree, element: any, eventish: ICancelableEvent, origin: string = 'mouse'): boolean { const payload = { origin: origin, originalEvent: eventish }; - const isDoubleClick = (origin === 'mouse' && (<mouse.IMouseEvent>eventish).detail === 2); + const event = <mouse.IMouseEvent>eventish; + const isDoubleClick = (origin === 'mouse' && event.detail === 2); if (tree.getInput() === element) { tree.clearFocus(payload); tree.clearSelection(payload); } else { - const isMouseDown = eventish && (<mouse.IMouseEvent>eventish).browserEvent && (<mouse.IMouseEvent>eventish).browserEvent.type === 'mousedown'; + const isMouseDown = eventish && event.browserEvent && event.browserEvent.type === 'mousedown'; if (!isMouseDown) { eventish.preventDefault(); // we cannot preventDefault onMouseDown because this would break DND otherwise } @@ -175,7 +176,7 @@ export class DefaultController implements _.IController { tree.setSelection([element], payload); tree.setFocus(element, payload); - if (this.openOnSingleClick || isDoubleClick) { + if (this.openOnSingleClick || isDoubleClick || this.isClickOnTwistie(event)) { if (tree.isExpanded(element)) { tree.collapse(element).done(null, errors.onUnexpectedError); } else { @@ -195,6 +196,16 @@ export class DefaultController implements _.IController { return this.options.openMode === OpenMode.SINGLE_CLICK; } + protected isClickOnTwistie(event: mouse.IMouseEvent): boolean { + const target = event.target as HTMLElement; + + // There is no way to find out if the ::before element is clicked where + // the twistie is drawn, but the <div class="content"> element in the + // tree item is the only thing we get back as target when the user clicks + // on the twistie. + return target && target.className === 'content' && dom.hasClass(target.parentElement, 'monaco-tree-row'); + } + public onContextMenu(tree: _.ITree, element: any, event: _.ContextMenuEvent): boolean { if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'input') { return false; // allow context menu on input fields diff --git a/src/vs/base/parts/tree/browser/treeDnd.ts b/src/vs/base/parts/tree/browser/treeDnd.ts index 7b2fa8c4b1a..a13cf53a55c 100644 --- a/src/vs/base/parts/tree/browser/treeDnd.ts +++ b/src/vs/base/parts/tree/browser/treeDnd.ts @@ -6,11 +6,6 @@ import _ = require('vs/base/parts/tree/browser/tree'); import Mouse = require('vs/base/browser/mouseEvent'); -import { DefaultDragAndDrop } from 'vs/base/parts/tree/browser/treeDefaults'; -import URI from 'vs/base/common/uri'; -import { basename } from 'vs/base/common/paths'; -import { getPathLabel } from 'vs/base/common/labels'; -import { DataTransfers } from 'vs/base/browser/dnd'; export class ElementsDragAndDropData implements _.IDragAndDropData { @@ -76,48 +71,4 @@ export class DesktopDragAndDropData implements _.IDragAndDropData { files: this.files }; } -} - -export class SimpleFileResourceDragAndDrop extends DefaultDragAndDrop { - - constructor(private toResource: (obj: any) => URI) { - super(); - } - - public getDragURI(tree: _.ITree, obj: any): string { - const resource = this.toResource(obj); - if (resource) { - return resource.toString(); - } - - return void 0; - } - - public getDragLabel(tree: _.ITree, elements: any[]): string { - if (elements.length > 1) { - return String(elements.length); - } - - const resource = this.toResource(elements[0]); - if (resource) { - return basename(resource.fsPath); - } - - return void 0; - } - - public onDragStart(tree: _.ITree, data: _.IDragAndDropData, originalEvent: Mouse.DragMouseEvent): void { - const sources: object[] = data.getData(); - - let source: object = null; - if (sources.length > 0) { - source = sources[0]; - } - - // Apply some datatransfer types to allow for dragging the element outside of the application - const resource = this.toResource(source); - if (resource) { - originalEvent.dataTransfer.setData(DataTransfers.TEXT, getPathLabel(resource)); - } - } } \ No newline at end of file diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 5f331083499..e717487827d 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -1292,7 +1292,7 @@ export class TreeView extends HeightMap { } e.dataTransfer.effectAllowed = 'copyMove'; - e.dataTransfer.setData(DataTransfers.URL, item.uri); + e.dataTransfer.setData(DataTransfers.RESOURCES, JSON.stringify([item.uri])); if (e.dataTransfer.setDragImage) { let label: string; diff --git a/src/vs/base/test/common/octicon.test.ts b/src/vs/base/test/common/octicon.test.ts new file mode 100644 index 00000000000..a8ab85f111a --- /dev/null +++ b/src/vs/base/test/common/octicon.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 { IMatch } from 'vs/base/common/filters'; +import { matchesFuzzyOcticonAware, parseOcticons } from 'vs/base/common/octicon'; + +export interface IOcticonFilter { + // Returns null if word doesn't match. + (query: string, target: { text: string, octiconOffsets?: number[] }): IMatch[]; +} + +function filterOk(filter: IOcticonFilter, word: string, target: { text: string, octiconOffsets?: number[] }, highlights?: { start: number; end: number; }[]) { + let r = filter(word, target); + assert(r); + if (highlights) { + assert.deepEqual(r, highlights); + } +} + +suite('Octicon', () => { + test('matchesFuzzzyOcticonAware', function () { + + // Camel Case + + filterOk(matchesFuzzyOcticonAware, 'ccr', parseOcticons('$(octicon)CamelCaseRocks$(octicon)'), [ + { start: 10, end: 11 }, + { start: 15, end: 16 }, + { start: 19, end: 20 } + ]); + + filterOk(matchesFuzzyOcticonAware, 'ccr', parseOcticons('$(octicon) CamelCaseRocks $(octicon)'), [ + { start: 11, end: 12 }, + { start: 16, end: 17 }, + { start: 20, end: 21 } + ]); + + filterOk(matchesFuzzyOcticonAware, 'iut', parseOcticons('$(octicon) Indent $(octico) Using $(octic) Tpaces'), [ + { start: 11, end: 12 }, + { start: 28, end: 29 }, + { start: 43, end: 44 }, + ]); + + // Prefix + + filterOk(matchesFuzzyOcticonAware, 'using', parseOcticons('$(octicon) Indent Using Spaces'), [ + { start: 18, end: 23 }, + ]); + + // Broken Octicon + + filterOk(matchesFuzzyOcticonAware, 'octicon', parseOcticons('This $(octicon Indent Using Spaces'), [ + { start: 7, end: 14 }, + ]); + + filterOk(matchesFuzzyOcticonAware, 'indent', parseOcticons('This $octicon Indent Using Spaces'), [ + { start: 14, end: 20 }, + ]); + }); +}); diff --git a/src/vs/code/electron-browser/issue/issueReporterMain.ts b/src/vs/code/electron-browser/issue/issueReporterMain.ts index 400b8610977..8c6a04f03a5 100644 --- a/src/vs/code/electron-browser/issue/issueReporterMain.ts +++ b/src/vs/code/electron-browser/issue/issueReporterMain.ts @@ -11,6 +11,7 @@ import { localize } from 'vs/nls'; import { $ } from 'vs/base/browser/dom'; import * as collections from 'vs/base/common/collections'; import * as browser from 'vs/base/browser/browser'; +import { escape } from 'vs/base/common/strings'; import product from 'vs/platform/node/product'; import pkg from 'vs/platform/node/package'; import * as os from 'os'; @@ -30,12 +31,14 @@ import { resolveCommonProperties } from 'vs/platform/telemetry/node/commonProper import { WindowsChannelClient } from 'vs/platform/windows/common/windowsIpc'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { IssueReporterModel } from 'vs/code/electron-browser/issue/issueReporterModel'; -import { IssueReporterData, IssueReporterStyles, IssueType } from 'vs/platform/issue/common/issue'; +import { IssueReporterData, IssueReporterStyles, IssueType, ISettingsSearchIssueReporterData } from 'vs/platform/issue/common/issue'; import BaseHtml from 'vs/code/electron-browser/issue/issueReporterPage'; import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; import { debounce } from 'vs/base/common/decorators'; import * as platform from 'vs/base/common/platform'; +const MAX_URL_LENGTH = 5400; + export interface IssueReporterConfiguration extends IWindowConfiguration { data: IssueReporterData; } @@ -52,6 +55,8 @@ export class IssueReporter extends Disposable { private telemetryService: ITelemetryService; private issueReporterModel: IssueReporterModel; private shouldQueueSearch = true; + private receivedSystemInfo = false; + private receivedPerformanceInfo = false; constructor(configuration: IssueReporterConfiguration) { super(); @@ -63,7 +68,8 @@ export class IssueReporter extends Disposable { includeSystemInfo: true, includeWorkspaceInfo: true, includeProcessInfo: true, - includeExtensions: true, + includeSearchedExtensions: true, + includeSettingsSearchDetails: true, versionInfo: { vscodeVersion: `${pkg.name} ${pkg.version} (${product.commit || 'Commit unknown'}, ${product.date || 'Date unknown'})`, os: `${os.type()} ${os.arch()} ${os.release()}` @@ -72,30 +78,43 @@ export class IssueReporter extends Disposable { reprosWithoutExtensions: false }); - ipcRenderer.on('issueInfoResponse', (event, info) => { + ipcRenderer.on('issuePerformanceInfoResponse', (event, info) => { this.issueReporterModel.update(info); + this.receivedPerformanceInfo = true; - this.updateAllBlocks(this.issueReporterModel.getData()); - - const submitButton = <HTMLButtonElement>document.getElementById('github-submit-btn'); - submitButton.disabled = false; - submitButton.textContent = localize('previewOnGitHub', "Preview on GitHub"); + const state = this.issueReporterModel.getData(); + this.updateProcessInfo(state); + this.updateWorkspaceInfo(state); + this.updatePreviewButtonState(); }); - ipcRenderer.send('issueInfoRequest'); + ipcRenderer.on('issueSystemInfoResponse', (event, info) => { + this.issueReporterModel.update({ systemInfo: info }); + this.receivedSystemInfo = true; + + this.updateSystemInfo(this.issueReporterModel.getData()); + this.updatePreviewButtonState(); + }); + + ipcRenderer.send('issueSystemInfoRequest'); + ipcRenderer.send('issuePerformanceInfoRequest'); if (window.document.documentElement.lang !== 'en') { show(document.getElementById('english')); } + this.setUpTypes(); this.setEventHandlers(); this.applyZoom(configuration.data.zoomLevel); this.applyStyles(configuration.data.styles); this.handleExtensionData(configuration.data.enabledExtensions); + + if (configuration.data.issueType === IssueType.SettingsSearchIssue) { + this.handleSettingsSearchData(<ISettingsSearchIssueReporterData>configuration.data); + } } render(): void { - (<HTMLSelectElement>document.getElementById('issue-type')).value = this.issueReporterModel.getData().issueType.toString(); this.renderBlocks(); } @@ -155,6 +174,18 @@ export class IssueReporter extends Disposable { content.push(`a { color: ${styles.textLinkColor}; }`); } + if (styles.sliderBackgroundColor) { + content.push(`body::-webkit-scrollbar-thumb { background-color: ${styles.sliderBackgroundColor}; }`); + } + + if (styles.sliderActiveColor) { + content.push(`body::-webkit-scrollbar-thumb:active { background-color: ${styles.sliderActiveColor}; }`); + } + + if (styles.sliderHoverColor) { + content.push(`body::-webkit-scrollbar-thumb:hover { background-color: ${styles.sliderHoverColor}; }`); + } + styleTag.innerHTML = content.join('\n'); document.head.appendChild(styleTag); document.body.style.color = styles.color; @@ -178,6 +209,46 @@ export class IssueReporter extends Disposable { } } + private handleSettingsSearchData(data: ISettingsSearchIssueReporterData): void { + this.issueReporterModel.update({ + actualSearchResults: data.actualSearchResults, + query: data.query, + filterResultCount: data.filterResultCount + }); + this.updateSearchedExtensionTable(data.enabledExtensions); + this.updateSettingsSearchDetails(data); + } + + private updateSettingsSearchDetails(data: ISettingsSearchIssueReporterData): void { + const target = document.querySelector('.block-settingsSearchResults .block-info'); + + const details = ` + <div class='block-settingsSearchResults-details'> + <div>Query: "${data.query}"</div> + <div>Literal match count: ${data.filterResultCount}</div> + </div> + `; + + let table = ` + <tr> + <th>Setting</th> + <th>Extension</th> + <th>Score</th> + </tr>`; + + data.actualSearchResults + .forEach(setting => { + table += ` + <tr> + <td>${setting.key}</td> + <td>${setting.extensionId}</td> + <td>${String(setting.score).slice(0, 5)}</td> + </tr>`; + }); + + target.innerHTML = `${details}<table>${table}</table>`; + } + private initServices(configuration: IWindowConfiguration): void { const serviceCollection = new ServiceCollection(); const mainProcessClient = new ElectronIPCClient(String(`window${configuration.windowId}`)); @@ -209,16 +280,35 @@ export class IssueReporter extends Disposable { private setEventHandlers(): void { document.getElementById('issue-type').addEventListener('change', (event: Event) => { this.issueReporterModel.update({ issueType: parseInt((<HTMLInputElement>event.target).value) }); + this.updatePreviewButtonState(); this.render(); }); - ['includeSystemInfo', 'includeProcessInfo', 'includeWorkspaceInfo', 'includeExtensions'].forEach(elementId => { + ['includeSystemInfo', 'includeProcessInfo', 'includeWorkspaceInfo', 'includeExtensions', 'includeSearchedExtensions', 'includeSettingsSearchDetails'].forEach(elementId => { document.getElementById(elementId).addEventListener('click', (event: Event) => { event.stopPropagation(); this.issueReporterModel.update({ [elementId]: !this.issueReporterModel.getData()[elementId] }); }); }); + const labelElements = document.getElementsByClassName('caption'); + for (let i = 0; i < labelElements.length; i++) { + const label = labelElements.item(i); + label.addEventListener('click', (e) => { + e.stopPropagation(); + + // Stop propgagation not working as expected in this case https://bugs.chromium.org/p/chromium/issues/detail?id=809801 + // preventDefault does prevent outer details tag from toggling, so use that and manually toggle the checkbox + e.preventDefault(); + const containingDiv = (<HTMLLabelElement>e.target).parentElement; + const checkbox = <HTMLInputElement>containingDiv.firstElementChild; + if (checkbox) { + checkbox.checked = !checkbox.checked; + this.issueReporterModel.update({ [checkbox.id]: !this.issueReporterModel.getData()[checkbox.id] }); + } + }); + } + document.getElementById('reproducesWithoutExtensions').addEventListener('click', (e) => { this.issueReporterModel.update({ reprosWithoutExtensions: true }); }); @@ -227,7 +317,7 @@ export class IssueReporter extends Disposable { this.issueReporterModel.update({ reprosWithoutExtensions: false }); }); - document.getElementById('description').addEventListener('blur', (event: Event) => { + document.getElementById('description').addEventListener('input', (event: Event) => { this.issueReporterModel.update({ issueDescription: (<HTMLInputElement>event.target).value }); }); @@ -235,15 +325,30 @@ export class IssueReporter extends Disposable { document.getElementById('github-submit-btn').addEventListener('click', () => this.createIssue()); - document.getElementById('disableExtensions').addEventListener('click', () => { + const disableExtensions = document.getElementById('disableExtensions'); + disableExtensions.addEventListener('click', () => { ipcRenderer.send('workbenchCommand', 'workbench.extensions.action.disableAll'); ipcRenderer.send('workbenchCommand', 'workbench.action.reloadWindow'); }); - document.getElementById('showRunning').addEventListener('click', () => { + disableExtensions.addEventListener('keydown', (e) => { + if (e.keyCode === 13 || e.keyCode === 32) { + ipcRenderer.send('workbenchCommand', 'workbench.extensions.action.disableAll'); + ipcRenderer.send('workbenchCommand', 'workbench.action.reloadWindow'); + } + }); + + const showRunning = document.getElementById('showRunning'); + showRunning.addEventListener('click', () => { ipcRenderer.send('workbenchCommand', 'workbench.action.showRuntimeExtensions'); }); + showRunning.addEventListener('keydown', (e) => { + if (e.keyCode === 13 || e.keyCode === 32) { + ipcRenderer.send('workbenchCommand', 'workbench.action.showRuntimeExtensions'); + } + }); + // Cmd+Enter or Mac or Ctrl+Enter on other platforms previews issue and closes window if (platform.isMacintosh) { let prevKeyWasCommand = false; @@ -267,6 +372,38 @@ export class IssueReporter extends Disposable { } } + private updatePreviewButtonState() { + const submitButton = <HTMLButtonElement>document.getElementById('github-submit-btn'); + if (this.isPreviewEnabled()) { + submitButton.disabled = false; + submitButton.textContent = localize('previewOnGitHub', "Preview on GitHub"); + } else { + submitButton.disabled = true; + submitButton.textContent = localize('loadingData', "Loading data..."); + } + } + + private isPreviewEnabled() { + const issueType = this.issueReporterModel.getData().issueType; + if (issueType === IssueType.Bug && this.receivedSystemInfo) { + return true; + } + + if (issueType === IssueType.PerformanceIssue && this.receivedSystemInfo && this.receivedPerformanceInfo) { + return true; + } + + if (issueType === IssueType.FeatureRequest) { + return true; + } + + if (issueType === IssueType.SettingsSearchIssue) { + return true; + } + + return false; + } + @debounce(300) private searchGitHub(event: Event): void { const title = (<HTMLInputElement>event.target).value; @@ -338,6 +475,25 @@ export class IssueReporter extends Disposable { this.telemetryService.publicLog('issueReporterSearchError', { message: error.message }); } + private setUpTypes(): void { + const makeOption = (issueType: IssueType, description: string) => `<option value="${issueType.valueOf()}">${escape(description)}</option>`; + + const typeSelect = (<HTMLSelectElement>document.getElementById('issue-type')); + const { issueType } = this.issueReporterModel.getData(); + if (issueType === IssueType.SettingsSearchIssue) { + typeSelect.innerHTML = makeOption(IssueType.SettingsSearchIssue, localize('settingsSearchIssue', "Settings Search Issue")); + typeSelect.disabled = true; + } else { + typeSelect.innerHTML = [ + makeOption(IssueType.Bug, localize('bugReporter', "Bug Report")), + makeOption(IssueType.PerformanceIssue, localize('performanceIssue', "Performance Issue")), + makeOption(IssueType.FeatureRequest, localize('featureRequest', "Feature Request")) + ].join('\n'); + } + + typeSelect.value = issueType.toString(); + } + private renderBlocks(): void { // Depending on Issue Type, we render different blocks and text const { issueType } = this.issueReporterModel.getData(); @@ -345,21 +501,29 @@ export class IssueReporter extends Disposable { const processBlock = document.querySelector('.block-process'); const workspaceBlock = document.querySelector('.block-workspace'); const extensionsBlock = document.querySelector('.block-extensions'); - const disabledExtensions = document.getElementById('disabledExtensions'); + const searchedExtensionsBlock = document.querySelector('.block-searchedExtensions'); + const settingsSearchResultsBlock = document.querySelector('.block-settingsSearchResults'); + const disabledExtensions = document.getElementById('disabledExtensions'); const descriptionTitle = document.getElementById('issue-description-label'); const descriptionSubtitle = document.getElementById('issue-description-subtitle'); + // Hide all by default + hide(systemBlock); + hide(processBlock); + hide(workspaceBlock); + hide(extensionsBlock); + hide(searchedExtensionsBlock); + hide(settingsSearchResultsBlock); + hide(disabledExtensions); + if (issueType === IssueType.Bug) { show(systemBlock); - hide(processBlock); - hide(workspaceBlock); show(extensionsBlock); show(disabledExtensions); descriptionTitle.innerHTML = `${localize('stepsToReproduce', "Steps to Reproduce")} <span class="required-input">*</span>`; - show(descriptionSubtitle); - descriptionSubtitle.innerHTML = localize('bugDescription', "How did you encounter this problem? What steps do you need to perform to reliably reproduce the problem? What did you expect to happen and what actually did happen?"); + descriptionSubtitle.innerHTML = localize('bugDescription', "Share the steps needed to reliably reproduce the problem. Please include actual and expected results. We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."); } else if (issueType === IssueType.PerformanceIssue) { show(systemBlock); show(processBlock); @@ -368,28 +532,25 @@ export class IssueReporter extends Disposable { show(disabledExtensions); descriptionTitle.innerHTML = `${localize('stepsToReproduce', "Steps to Reproduce")} <span class="required-input">*</span>`; - show(descriptionSubtitle); - descriptionSubtitle.innerHTML = localize('performanceIssueDesciption', "When did this performance issue happen? For example, does it occur on startup or after a specific series of actions? Any details you can provide help our investigation."); - } else { - hide(systemBlock); - hide(processBlock); - hide(workspaceBlock); - hide(extensionsBlock); - hide(disabledExtensions); - + descriptionSubtitle.innerHTML = localize('performanceIssueDesciption', "When did this performance issue happen? Does it occur on startup or after a specific series of actions? We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."); + } else if (issueType === IssueType.FeatureRequest) { descriptionTitle.innerHTML = `${localize('description', "Description")} <span class="required-input">*</span>`; - hide(descriptionSubtitle); + descriptionSubtitle.innerHTML = localize('featureRequestDescription', "Please describe the feature you would like to see. We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."); + } else if (issueType === IssueType.SettingsSearchIssue) { + show(searchedExtensionsBlock); + show(settingsSearchResultsBlock); + + descriptionTitle.innerHTML = `${localize('expectedResults', "Expected Results")} <span class="required-input">*</span>`; + descriptionSubtitle.innerHTML = localize('settingsSearchResultsDescription', "Please list the results that you were expecting to see when you searched with this query. We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."); } } private validateInput(inputId: string): boolean { const inputElement = (<HTMLInputElement>document.getElementById(inputId)); if (!inputElement.value) { - show(document.getElementById(`${inputId}-validation-error`)); inputElement.classList.add('invalid-input'); return false; } else { - hide(document.getElementById(`${inputId}-validation-error`)); inputElement.classList.remove('invalid-input'); return true; } @@ -431,15 +592,15 @@ export class IssueReporter extends Disposable { this.telemetryService.publicLog('issueReporterSubmit', { issueType: this.issueReporterModel.getData().issueType }); } - const issueTitle = (<HTMLInputElement>document.getElementById('issue-title')).value; + const issueTitle = encodeURIComponent((<HTMLInputElement>document.getElementById('issue-title')).value); const queryStringPrefix = product.reportIssueUrl.indexOf('?') === -1 ? '?' : '&'; const baseUrl = `${product.reportIssueUrl}${queryStringPrefix}title=${issueTitle}&body=`; const issueBody = this.issueReporterModel.serialize(); const url = baseUrl + encodeURIComponent(issueBody); const lengthValidationElement = document.getElementById('url-length-validation-error'); - if (url.length > 2081) { - lengthValidationElement.textContent = localize('urlLengthError', "The data exceeds the length limit of 2081. The data is length {0}.", url.length); + if (url.length > MAX_URL_LENGTH) { + lengthValidationElement.textContent = localize('urlLengthError', "The data exceeds the length limit of {0} characters. The data is length {1}.", MAX_URL_LENGTH, url.length); show(lengthValidationElement); return false; } else { @@ -450,16 +611,6 @@ export class IssueReporter extends Disposable { return true; } - /** - * Update blocks - */ - - private updateAllBlocks(state) { - this.updateSystemInfo(state); - this.updateProcessInfo(state); - this.updateWorkspaceInfo(state); - } - private updateSystemInfo = (state) => { const target = document.querySelector('.block-system .block-info'); let tableHtml = ''; @@ -517,6 +668,23 @@ export class IssueReporter extends Disposable { return; } + const table = this.getExtensionTableHtml(extensions); + target.innerHTML = `<table>${table}</table>${themeExclusionStr}`; + } + + private updateSearchedExtensionTable(extensions: ILocalExtension[]): void { + const target = document.querySelector('.block-searchedExtensions .block-info'); + + if (!extensions.length) { + target.innerHTML = 'Extensions: none'; + return; + } + + const table = this.getExtensionTableHtml(extensions); + target.innerHTML = `<table>${table}</table>`; + } + + private getExtensionTableHtml(extensions: ILocalExtension[]): string { let table = ` <tr> <th>Extension</th> @@ -524,16 +692,16 @@ export class IssueReporter extends Disposable { <th>Version</th> </tr>`; - extensions.forEach(extension => { - table += ` + table += extensions.map(extension => { + return ` <tr> <td>${extension.manifest.name}</td> <td>${extension.manifest.publisher.substr(0, 3)}</td> <td>${extension.manifest.version}</td> </tr>`; - }); + }).join(''); - target.innerHTML = `<table>${table}</table>${themeExclusionStr}`; + return table; } } diff --git a/src/vs/code/electron-browser/issue/issueReporterModel.ts b/src/vs/code/electron-browser/issue/issueReporterModel.ts index e9590c15068..4ae150e9651 100644 --- a/src/vs/code/electron-browser/issue/issueReporterModel.ts +++ b/src/vs/code/electron-browser/issue/issueReporterModel.ts @@ -7,7 +7,7 @@ import { assign } from 'vs/base/common/objects'; import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { IssueType } from 'vs/platform/issue/common/issue'; +import { IssueType, ISettingSearchResult } from 'vs/platform/issue/common/issue'; export interface IssueReporterData { issueType?: IssueType; @@ -22,11 +22,16 @@ export interface IssueReporterData { includeWorkspaceInfo?: boolean; includeProcessInfo?: boolean; includeExtensions?: boolean; + includeSearchedExtensions?: boolean; + includeSettingsSearchDetails?: boolean; numberOfThemeExtesions?: number; enabledNonThemeExtesions?: ILocalExtension[]; extensionsDisabled?: boolean; reprosWithoutExtensions?: boolean; + actualSearchResults?: ISettingSearchResult[]; + query?: string; + filterResultCount?: number; } export class IssueReporterModel { @@ -99,6 +104,17 @@ ${this.getInfos()}`; info += this._data.reprosWithoutExtensions ? '\nReproduces without extensions' : '\nReproduces only with extensions'; } + if (this._data.issueType === IssueType.SettingsSearchIssue) { + if (this._data.includeSearchedExtensions) { + info += this.generateExtensionsMd(); + } + + if (this._data.includeSettingsSearchDetails) { + info += this.generateSettingSearchResultsMd(); + info += '\n' + this.generateSettingsSearchResultDetailsMd(); + } + } + return info; } @@ -171,6 +187,35 @@ ${tableHeader} ${table} ${themeExclusionStr} +</details>`; + } + + private generateSettingsSearchResultDetailsMd(): string { + return ` +Query: ${this._data.query} +Literal matches: ${this._data.filterResultCount}`; + } + + private generateSettingSearchResultsMd(): string { + if (!this._data.actualSearchResults) { + return ''; + } + + if (!this._data.actualSearchResults.length) { + return `No fuzzy results`; + } + + let tableHeader = `Setting|Extension|Score +---|---|---`; + const table = this._data.actualSearchResults.map(setting => { + return `${setting.key}|${setting.extensionId}|${String(setting.score).slice(0, 5)}`; + }).join('\n'); + + return `<details><summary>Results</summary> + +${tableHeader} +${table} + </details>`; } } \ No newline at end of file diff --git a/src/vs/code/electron-browser/issue/issueReporterPage.ts b/src/vs/code/electron-browser/issue/issueReporterPage.ts index 86d5a0afc34..1b889915991 100644 --- a/src/vs/code/electron-browser/issue/issueReporterPage.ts +++ b/src/vs/code/electron-browser/issue/issueReporterPage.ts @@ -6,8 +6,6 @@ import { escape } from 'vs/base/common/strings'; import { localize } from 'vs/nls'; -import * as os from 'os'; -import pkg from 'vs/platform/node/package'; export default (): string => ` <div id="issue-reporter"> @@ -15,18 +13,15 @@ export default (): string => ` <div class="section"> <div class="input-group"> - <label for="issue-type">${escape(localize('issueTypeLabel', "I want to submit a"))}</label> - <select id="issue-type" class="form-control"> - <option value="0">${escape(localize('bugReporter', "Bug Report"))}</option> - <option value="1">${escape(localize('performanceIssue', "Performance Issue"))}</option> - <option value="2">${escape(localize('featureRequest', "Feature Request"))}</option> + <label id="issue-type-label" class="inline-form-control" for="issue-type">${escape(localize('issueTypeLabel', "This is a"))}</label> + <select id="issue-type" class="inline-form-control"> + <!-- To be dynamically filled --> </select> </div> <div class="input-group"> - <label for="issue-title">${escape(localize('issueTitleLabel', "Title"))} <span class="required-input">*</span></label> - <div id="issue-title-validation-error" class="validation-error hidden" role="alert">${escape(localize('issueTitleRequired', "Please enter a title."))}</div> - <input id="issue-title" type="text" required> + <label id="issue-title-label" for="issue-title">${escape(localize('issueTitleLabel', "Title"))} <span class="required-input">*</span></label> + <input id="issue-title" type="text" class="inline-form-control" placeholder="${escape(localize('issueTitleRequired', "Please enter a title."))}" required> <small id="similar-issues"> <!-- To be dynamically filled --> </small> @@ -34,24 +29,14 @@ export default (): string => ` </div> <div class="system-info"> - <div class="input-group"> - <div class="two-col"> - <label for="vscode-version">${escape(localize('vscodeVersion', "VS Code Version"))}</label> - <input id="vscode-version" type="text" value="${pkg.name} ${pkg.version}" disabled/> - </div> - <div class="two-col"> - <label for="os">${escape(localize('osVersion', "OS Version"))}</label> - <input id="os" type="text" value="${os.type()} ${os.arch()} ${os.release()}" disabled/> - </div> - </div> - <div id="block-container"> <div class="block block-system"> <details> <summary>${escape(localize('systemInfo', "My System Info"))} - <input class="sendData" type="checkbox" id="includeSystemInfo" checked> + <div class="include-data"> + <input class="sendData" type="checkbox" id="includeSystemInfo" checked/> <label class="caption" for="includeSystemInfo">${escape(localize('sendData', "Send my data"))}</label> - </input> + </div> </summary> <div class="block-info"> <!-- To be dynamically filled --> @@ -61,9 +46,10 @@ export default (): string => ` <div class="block block-process"> <details> <summary>${escape(localize('processes', "Currently Running Processes"))} - <input class="sendData" type="checkbox" id="includeProcessInfo" checked> + <div class="include-data"> + <input class="sendData" type="checkbox" id="includeProcessInfo" checked/> <label class="caption" for="includeProcessInfo">${escape(localize('sendData', "Send my data"))}</label> - </input> + </div> </summary> <div class="block-info"> <!-- To be dynamically filled --> @@ -73,9 +59,10 @@ export default (): string => ` <div class="block block-workspace"> <details> <summary>${escape(localize('workspaceStats', "My Workspace Stats"))} - <input class="sendData" type="checkbox" id="includeWorkspaceInfo" checked> + <div class="include-data"> + <input class="sendData" type="checkbox" id="includeWorkspaceInfo" checked/> <label class="caption" for="includeWorkspaceInfo">${escape(localize('sendData', "Send my data"))}</label> - </input> + </div> </summary> <pre class="block-info"> <code> @@ -87,9 +74,36 @@ export default (): string => ` <div class="block block-extensions"> <details> <summary>${escape(localize('extensions', "My Extensions"))} - <input class="sendData" type="checkbox" id="includeExtensions" checked> + <div class="include-data"> + <input class="sendData" type="checkbox" id="includeExtensions" checked/> <label class="caption" for="includeExtensions">${escape(localize('sendData', "Send my data"))}</label> - </input> + </div> + </summary> + <div class="block-info"> + <!-- To be dynamically filled --> + </div> + </details> + </div> + <div class="block block-searchedExtensions"> + <details> + <summary>${escape(localize('searchedExtensions', "Searched Extensions"))} + <div class="include-data"> + <input class="sendData" type="checkbox" id="includeSearchedExtensions" checked/> + <label class="caption" for="includeSearchedExtensions">${escape(localize('sendData', "Send my data"))}</label> + </div> + </summary> + <div class="block-info"> + <!-- To be dynamically filled --> + </div> + </details> + </div> + <div class="block block-settingsSearchResults"> + <details> + <summary>${escape(localize('settingsSearchDetails', "Settings Search Details"))} + <div class="include-data"> + <input class="sendData" type="checkbox" id="includeSettingsSearchDetails" checked/> + <label class="caption" for="includeSettingsSearchDetails">${escape(localize('sendData', "Send my data"))}</label> + </div> </summary> <div class="block-info"> <!-- To be dynamically filled --> @@ -101,17 +115,21 @@ export default (): string => ` <div class="section"> <div id="disabledExtensions"> - <label>${escape(localize('tryDisablingExtensions', "Is the problem reproducible when extensions are disabled?"))}</label> - <div class="choice"> - <input type="radio" id="reproducesWithoutExtensions" value=true name="reprosWithoutExtensions" /> - <label for="reproducesWithoutExtensions">${escape(localize('yes', "Yes"))}</label> + <div class="extensions-form"> + <label>${escape(localize('tryDisablingExtensions', "Is the problem reproducible when extensions are disabled?"))}</label> + <div class="form-buttons"> + <div class="choice"> + <input type="radio" id="reproducesWithoutExtensions" value=true name="reprosWithoutExtensions" /> + <label for="reproducesWithoutExtensions">${escape(localize('yes', "Yes"))}</label> + </div> + <div class="choice"> + <input type="radio" id="reproducesWithExtensions" value=false name="reprosWithoutExtensions" checked/> + <label for="reproducesWithExtensions">${escape(localize('no', "No"))}</label> + </div> + </div> </div> - <div class="choice"> - <input type="radio" id="reproducesWithExtensions" value=false name="reprosWithoutExtensions" checked/> - <label for="reproducesWithExtensions">${escape(localize('no', "No"))}</label> - </div> - <div class="instructions">Try to reproduce the problem after <button id="disableExtensions" class="workbenchCommand">${escape(localize('disableExtensions', "disabling all extensions and reloading the window"))}</button>.</div> - <div class="instructions">If you suspect it's an extension issue, <button id="showRunning" class="workbenchCommand">${escape(localize('showRunningExtensions', "see all running extensions"))}</button>.</div> + <div class="instructions">${escape(localize('disableExtensionsLabel', "Try to reproduce the problem after "))}<span tabIndex=0 role="button" id="disableExtensions" class="workbenchCommand">${escape(localize('disableExtensions', "disabling all extensions and reloading the window"))}</span>.</div> + <div class="instructions">${escape(localize('showRunningExtensionsLabel', "If you suspect it's an extension issue, "))}<span tabIndex=0 role="button"id="showRunning" class="workbenchCommand">${escape(localize('showRunningExtensions', "see all running extensions"))}</span>.</div> </div> </div> @@ -123,9 +141,7 @@ export default (): string => ` <!-- To be dynamically filled --> </div> <div class="block-info-text"> - <div class="instructions">${escape(localize('githubMarkdown', "We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."))}</div> - <div id="description-validation-error" class="validation-error hidden" role="alert">${escape(localize('issueDescriptionRequired', "Please enter a description."))}</div> - <textarea name="description" id="description" cols="100" rows="15" required></textarea> + <textarea name="description" id="description" cols="100" rows="12" placeholder="${escape(localize('details', "Please enter details."))}" required></textarea> </div> </div> diff --git a/src/vs/code/electron-browser/issue/media/issueReporter.css b/src/vs/code/electron-browser/issue/media/issueReporter.css index b0da6839f0e..74c25832695 100644 --- a/src/vs/code/electron-browser/issue/media/issueReporter.css +++ b/src/vs/code/electron-browser/issue/media/issueReporter.css @@ -30,8 +30,21 @@ td { border-top: 1px solid #e9ecef; } +.block-settingsSearchResults-details { + padding-bottom: .5rem; +} + +.block-settingsSearchResults-details > div { + padding: .5rem .75rem; +} + .section { - margin-bottom: 2em; + margin-bottom: 1.5em; +} + +#similar-issues { + margin-left: 10%; + display: block; } /** @@ -48,6 +61,11 @@ input[type="text"], textarea { border-radius: .25rem; border: 1px solid #ced4da; } + +.inline-form-control { + display: inline-block !important; +} + textarea { overflow: auto; resize: vertical; @@ -73,10 +91,9 @@ button { select { height: calc(2.25rem + 2px); - display: block; - width: 100%; - padding: 0.375rem 0.75rem; - font-size: 1rem; + display: inline-block; + padding: 3px 3px; + font-size: 14px; line-height: 1.5; color: #495057; background-color: #fff; @@ -87,6 +104,11 @@ select { * { box-sizing: border-box; } + +textarea { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; +} + html { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; color: #CCCCCC; @@ -107,7 +129,7 @@ body { .block .block-info { width: 100%; font-family: 'Menlo', 'Courier New', 'Courier', monospace; - font-size: 14px; + font-size: 12px; overflow: auto; overflow-wrap: break-word; } @@ -152,13 +174,31 @@ button:disabled { margin-bottom: 1em; } -.choice { - display: inline-block; - margin: 0 5px; +.extensions-form { + display: flex; } -.choice > label, .choice > input { +.extensions-form > .form-buttons { + display: flex; + margin-left: 20px; +} + +.extensions-form > .form-buttons > .choice { + margin-right: 35px; + position: relative; +} + +.extensions-form > .form-buttons > .choice > label, .extensions-form > .form-buttons > .choice > input { cursor: pointer; + height: 100%; + margin-top: 1px; +} + +.extensions-form > .form-buttons > .choice > label { + position: absolute; + top: 50%; + margin-top: -50%; + left: 20px; } .system-info { @@ -172,7 +212,7 @@ select, input, textarea { summary { border: 1px solid transparent; - padding: 10px; + padding: 0 10px; margin-bottom: 5px; } @@ -181,11 +221,19 @@ summary { margin-top: 1em; } -.caption { +.include-data { + display: inline-block; + position: relative; +} + +.include-data > .caption { display: inline-block; font-size: 12px; - vertical-align: middle; - height: 18px; + position: absolute; + width: 80px; + top: 2px; + left: 30px; + cursor: pointer; } .sendData { @@ -197,6 +245,7 @@ input[type="checkbox"] { display: inline-block; margin-top: 0; vertical-align: middle; + cursor: pointer; } input:disabled { @@ -214,14 +263,9 @@ input:disabled { margin-top: .5em; } -.workbenchCommand { - padding: 0; - font-size: 12px; - background: transparent; -} - .workbenchCommand:disabled { color: #868e96; + cursor: pointer; } .block-extensions .block-info { @@ -250,4 +294,63 @@ a { button { background-color: #007ACC; color: #fff; -} \ No newline at end of file +} + +#issue-type-label { + width: 95px; +} + +#issue-type { + width: calc(100% - 100px); +} + +#issue-title-label { + width: 80px; + display: inline-block; +} + +#issue-title { + width: calc(100% - 85px); +} + + +@media (max-width: 950px) { + #issue-type-label { + width: 12%; + } + + #issue-type { + width: calc(88% - 5px); + } + + #issue-title-label { + width: 10%; + display: inline-block + } + + #issue-title { + width: calc(90% - 5px); + } +} + +@media (max-width: 620px) { + #issue-title-label, #issue-type-label { + display: none !important; + } + + #issue-type, #issue-title { + width: 100%; + } + + #similar-issues { + margin-left: 0; + } +} + +body::-webkit-scrollbar { + width: 14px; +} + +body::-webkit-scrollbar-thumb { + min-height: 20px; +} diff --git a/src/vs/code/electron-browser/sharedProcess/contrib/contributions.ts b/src/vs/code/electron-browser/sharedProcess/contrib/contributions.ts index 50ec33a43c9..27252840ff7 100644 --- a/src/vs/code/electron-browser/sharedProcess/contrib/contributions.ts +++ b/src/vs/code/electron-browser/sharedProcess/contrib/contributions.ts @@ -8,11 +8,9 @@ import { NodeCachedDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/nodeCachedDataCleaner'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable, combinedDisposable } from 'vs/base/common/lifecycle'; -import { LanguagePacksCache } from 'vs/platform/localizations/node/localizations'; export function createSharedProcessContributions(service: IInstantiationService): IDisposable { return combinedDisposable([ service.createInstance(NodeCachedDataCleaner), - service.createInstance(LanguagePacksCache) ]); } diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts index f13a6d2c95f..baf9a0bbe85 100644 --- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts @@ -40,6 +40,9 @@ import { createSharedProcessContributions } from 'vs/code/electron-browser/share import { createSpdLogService } from 'vs/platform/log/node/spdlogService'; import { ILogService, LogLevel } from 'vs/platform/log/common/log'; import { LogLevelSetterChannelClient, FollowerLogService } from 'vs/platform/log/common/logIpc'; +import { LocalizationsService } from 'vs/platform/localizations/node/localizations'; +import { ILocalizationsService } from 'vs/platform/localizations/common/localizations'; +import { LocalizationsChannel } from 'vs/platform/localizations/common/localizationsIpc'; export interface ISharedProcessConfiguration { readonly machineId: string; @@ -141,6 +144,7 @@ function main(server: Server, initData: ISharedProcessInitData, configuration: I services.set(IExtensionManagementService, new SyncDescriptor(ExtensionManagementService)); services.set(IExtensionGalleryService, new SyncDescriptor(ExtensionGalleryService)); + services.set(ILocalizationsService, new SyncDescriptor(LocalizationsService)); const instantiationService2 = instantiationService.createChild(services); @@ -152,6 +156,10 @@ function main(server: Server, initData: ISharedProcessInitData, configuration: I // clean up deprecated extensions (extensionManagementService as ExtensionManagementService).removeDeprecatedExtensions(); + const localizationsService = accessor.get(ILocalizationsService); + const localizationsChannel = new LocalizationsChannel(localizationsService); + server.registerChannel('localizations', localizationsChannel); + createSharedProcessContributions(instantiationService2); }); }); diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 06ce9b9d2f0..3c56236e8a8 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -58,6 +58,7 @@ import { IIssueService } from 'vs/platform/issue/common/issue'; import { IssueChannel } from 'vs/platform/issue/common/issueIpc'; import { IssueService } from 'vs/platform/issue/electron-main/issueService'; import { LogLevelSetterChannel } from 'vs/platform/log/common/logIpc'; +import { setUnexpectedErrorHandler } from 'vs/base/common/errors'; export class CodeApplication { @@ -90,26 +91,8 @@ export class CodeApplication { private registerListeners(): void { // We handle uncaught exceptions here to prevent electron from opening a dialog to the user - process.on('uncaughtException', (err: any) => { - if (err) { - - // take only the message and stack property - const friendlyError = { - message: err.message, - stack: err.stack - }; - - // handle on client side - if (this.windowsMainService) { - this.windowsMainService.sendToFocused('vscode:reportError', JSON.stringify(friendlyError)); - } - } - - this.logService.error(`[uncaught exception in main]: ${err}`); - if (err.stack) { - this.logService.error(err.stack); - } - }); + setUnexpectedErrorHandler(err => this.onUnexpectedError(err)); + process.on('uncaughtException', err => this.onUnexpectedError(err)); app.on('will-quit', () => { this.logService.trace('App#will-quit: disposing resources'); @@ -240,6 +223,27 @@ export class CodeApplication { }); } + private onUnexpectedError(err: Error): void { + if (err) { + + // take only the message and stack property + const friendlyError = { + message: err.message, + stack: err.stack + }; + + // handle on client side + if (this.windowsMainService) { + this.windowsMainService.sendToFocused('vscode:reportError', JSON.stringify(friendlyError)); + } + } + + this.logService.error(`[uncaught exception in main]: ${err}`); + if (err.stack) { + this.logService.error(err.stack); + } + } + private onBroadcast(event: string, payload: any): void { // Theme changes diff --git a/src/vs/code/electron-main/contributions.ts b/src/vs/code/electron-main/contributions.ts new file mode 100644 index 00000000000..327cea34b05 --- /dev/null +++ b/src/vs/code/electron-main/contributions.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. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/platform/update/node/update.config.contribution'; \ No newline at end of file diff --git a/src/vs/code/electron-main/diagnostics.ts b/src/vs/code/electron-main/diagnostics.ts index 926ce809c15..20101529482 100644 --- a/src/vs/code/electron-main/diagnostics.ts +++ b/src/vs/code/electron-main/diagnostics.ts @@ -38,13 +38,12 @@ export interface ProcessInfo { name: string; } -export interface DiagnosticInfo { - systemInfo?: SystemInfo; +export interface PerformanceInfo { processInfo?: ProcessInfo[]; workspaceInfo?: string; } -export function buildDiagnostics(info: IMainProcessInfo): Promise<DiagnosticInfo> { +export function getPerformanceInfo(info: IMainProcessInfo): Promise<PerformanceInfo> { return listProcesses(info.mainPID).then(rootProcess => { const workspaceInfoMessages = []; @@ -79,13 +78,36 @@ export function buildDiagnostics(info: IMainProcessInfo): Promise<DiagnosticInfo } return { - systemInfo: getSystemInfo(info), processInfo: getProcessList(info, rootProcess), workspaceInfo: workspaceInfoMessages.join('\n') }; }); } +export function getSystemInfo(info: IMainProcessInfo): SystemInfo { + const MB = 1024 * 1024; + const GB = 1024 * MB; + + const systemInfo: SystemInfo = { + 'Memory (System)': `${(os.totalmem() / GB).toFixed(2)}GB (${(os.freemem() / GB).toFixed(2)}GB free)`, + VM: `${Math.round((virtualMachineHint.value() * 100))}%`, + 'Screen Reader': `${app.isAccessibilitySupportEnabled() ? 'yes' : 'no'}`, + 'Process Argv': `${info.mainArguments.join(' ')}` + }; + + const cpus = os.cpus(); + if (cpus && cpus.length > 0) { + systemInfo.CPUs = `${cpus[0].model} (${cpus.length} x ${cpus[0].speed})`; + } + + if (!isWindows) { + systemInfo['Load (avg)'] = `${os.loadavg().map(l => Math.round(l)).join(', ')}`; + } + + + return systemInfo; +} + export function printDiagnostics(info: IMainProcessInfo): Promise<any> { return listProcesses(info.mainPID).then(rootProcess => { @@ -186,30 +208,6 @@ function formatLaunchConfigs(configs: WorkspaceStatItem[]): string { return output.join('\n'); } -function getSystemInfo(info: IMainProcessInfo): SystemInfo { - const MB = 1024 * 1024; - const GB = 1024 * MB; - - const systemInfo: SystemInfo = { - 'Memory (System)': `${(os.totalmem() / GB).toFixed(2)}GB (${(os.freemem() / GB).toFixed(2)}GB free)`, - VM: `${Math.round((virtualMachineHint.value() * 100))}%`, - 'Screen Reader': `${app.isAccessibilitySupportEnabled() ? 'yes' : 'no'}`, - 'Process Argv': `${info.mainArguments.join(' ')}` - }; - - const cpus = os.cpus(); - if (cpus && cpus.length > 0) { - systemInfo.CPUs = `${cpus[0].model} (${cpus.length} x ${cpus[0].speed})`; - } - - if (!isWindows) { - systemInfo['Load (avg)'] = `${os.loadavg().map(l => Math.round(l)).join(', ')}`; - } - - - return systemInfo; -} - function getProcessList(info: IMainProcessInfo, rootProcess: ProcessItem): ProcessInfo[] { const mapPidToWindowTitle = new Map<number, string>(); info.windows.forEach(window => mapPidToWindowTitle.set(window.pid, window.title)); diff --git a/src/vs/code/electron-main/launch.ts b/src/vs/code/electron-main/launch.ts index 17f5ac6ffde..3d2556b785d 100644 --- a/src/vs/code/electron-main/launch.ts +++ b/src/vs/code/electron-main/launch.ts @@ -16,6 +16,7 @@ import { OpenContext } from 'vs/platform/windows/common/windows'; import { IWindowsMainService, ICodeWindow } from 'vs/platform/windows/electron-main/windows'; import { whenDeleted } from 'vs/base/node/pfs'; import { IWorkspacesMainService } from 'vs/platform/workspaces/common/workspaces'; +import { Schemas } from 'vs/base/common/network'; export const ID = 'launchService'; export const ILaunchService = createDecorator<ILaunchService>(ID); @@ -191,6 +192,7 @@ export class LaunchService implements ILaunchService { public getLogsPath(): TPromise<string> { this.logService.trace('Received request for logs path from other instance.'); + return TPromise.as(this.environmentService.logsPath); } @@ -202,7 +204,7 @@ export class LaunchService implements ILaunchService { } else if (window.openedWorkspace) { const rootFolders = this.workspacesMainService.resolveWorkspaceSync(window.openedWorkspace.configPath).folders; rootFolders.forEach(root => { - if (root.uri.scheme === 'file') { + if (root.uri.scheme === Schemas.file) { // todo@remote signal remote folders? folders.push(root.uri.fsPath); } }); diff --git a/src/vs/code/electron-main/logUploader.ts b/src/vs/code/electron-main/logUploader.ts index 87425685c5b..543fab3fb41 100644 --- a/src/vs/code/electron-main/logUploader.ts +++ b/src/vs/code/electron-main/logUploader.ts @@ -124,7 +124,7 @@ function zipLogs( const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'vscode-log-upload')); const outZip = path.join(tempDir, 'logs.zip'); return new TPromise<string>((resolve, reject) => { - doZip(logsPath, outZip, (err, stdout, stderr) => { + doZip(logsPath, outZip, tempDir, (err, stdout, stderr) => { if (err) { console.error(localize('zipError', 'Error zipping logs: {0}', err)); reject(err); @@ -138,12 +138,17 @@ function zipLogs( function doZip( logsPath: string, outZip: string, + tempDir: string, callback: (error: Error, stdout: string, stderr: string) => void ) { switch (os.platform()) { case 'win32': - return cp.execFile('powershell', ['-Command', `Compress-Archive -Path "${logsPath}" -DestinationPath ${outZip}`], { cwd: logsPath }, callback); - + // Copy directory first to avoid file locking issues + const sub = path.join(tempDir, 'sub'); + return cp.execFile('powershell', ['-Command', + `[System.IO.Directory]::CreateDirectory("${sub}"); Copy-Item -recurse "${logsPath}" "${sub}"; Compress-Archive -Path "${sub}" -DestinationPath "${outZip}"`], + { cwd: logsPath }, + callback); default: return cp.execFile('zip', ['-r', outZip, '.'], { cwd: logsPath }, callback); } diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index db4b9f3c9b8..05b622cab01 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -5,6 +5,7 @@ 'use strict'; +import 'vs/code/electron-main/contributions'; import { app, dialog } from 'electron'; import { assign } from 'vs/base/common/objects'; import * as platform from 'vs/base/common/platform'; @@ -48,6 +49,7 @@ import { BufferLogService } from 'vs/platform/log/common/bufferLog'; import { uploadLogs } from 'vs/code/electron-main/logUploader'; import { IChoiceService } from 'vs/platform/message/common/message'; import { ChoiceCliService } from 'vs/platform/message/node/messageCli'; +import { setUnexpectedErrorHandler } from 'vs/base/common/errors'; function createServices(args: ParsedArgs, bufferLogService: BufferLogService): IInstantiationService { const services = new ServiceCollection(); @@ -289,8 +291,12 @@ function quit(accessor: ServicesAccessor, reason?: ExpectedError | Error): void } function main() { - let args: ParsedArgs; + // Set the error handler early enough so that we are not getting the + // default electron error dialog popping up + setUnexpectedErrorHandler(err => console.error(err)); + + let args: ParsedArgs; try { args = parseMainProcessArgv(process.argv); args = validatePaths(args); diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index f6f96d5cf64..6636672f4a2 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -9,8 +9,8 @@ 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, Menu, MenuItem, BrowserWindow, clipboard } from 'electron'; -import { OpenContext, IRunActionInWindowRequest } from 'vs/platform/windows/common/windows'; +import { ipcMain as ipc, app, shell, Menu, MenuItem, BrowserWindow } from 'electron'; +import { OpenContext, IRunActionInWindowRequest, IWindowsService } from 'vs/platform/windows/common/windows'; import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; import { AutoSaveConfiguration } from 'vs/platform/files/common/files'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -18,7 +18,7 @@ import { IUpdateService, StateType } 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 { mnemonicMenuLabel as baseMnemonicLabel, unmnemonicLabel, getPathLabel, mnemonicButtonLabel } from 'vs/base/common/labels'; +import { mnemonicMenuLabel as baseMnemonicLabel, unmnemonicLabel, getPathLabel } from 'vs/base/common/labels'; import { KeybindingsResolver } from 'vs/code/electron-main/keyboard'; import { IWindowsMainService, IWindowsCountChangedEvent } from 'vs/platform/windows/electron-main/windows'; import { IHistoryMainService } from 'vs/platform/history/common/history'; @@ -69,6 +69,7 @@ export class CodeMenu { @IInstantiationService instantiationService: IInstantiationService, @IConfigurationService private configurationService: IConfigurationService, @IWindowsMainService private windowsMainService: IWindowsMainService, + @IWindowsService private windowsService: IWindowsService, @IEnvironmentService private environmentService: IEnvironmentService, @ITelemetryService private telemetryService: ITelemetryService, @IHistoryMainService private historyMainService: IHistoryMainService @@ -998,7 +999,7 @@ export class CodeMenu { } helpMenu.append(__separator__()); - helpMenu.append(new MenuItem({ label: this.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.windowsService.openAboutDialog() })); } } @@ -1206,39 +1207,6 @@ export class CodeMenu { return options; } - private openAboutDialog(): void { - const lastActiveWindow = this.windowsMainService.getFocusedWindow() || this.windowsMainService.getLastActiveWindow(); - - const detail = nls.localize('aboutDetail', - "Version {0}\nCommit {1}\nDate {2}\nShell {3}\nRenderer {4}\nNode {5}\nArchitecture {6}", - app.getVersion(), - product.commit || 'Unknown', - product.date || 'Unknown', - process.versions['electron'], - process.versions['chrome'], - process.versions['node'], - process.arch - ); - - const buttons = [nls.localize('okButton', "OK")]; - if (isWindows) { - buttons.push(mnemonicButtonLabel(nls.localize({ key: 'copy', comment: ['&& denotes a mnemonic'] }, "&&Copy"))); // https://github.com/Microsoft/vscode/issues/37608 - } - - this.windowsMainService.showMessageBox({ - title: product.nameLong, - type: 'info', - message: product.nameLong, - detail: `\n${detail}`, - buttons, - noLink: true - }, lastActiveWindow).then(result => { - if (isWindows && result.button === 1) { - clipboard.writeText(detail); - } - }); - } - private openUrl(url: string, id: string): void { shell.openExternal(url); this.reportMenuActionTelemetry(id); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index b1bdea73fb4..ce7112ed726 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -944,10 +944,14 @@ export class WindowsManager implements IWindowsMainService { }; } - // Folder - return { - folderPath: candidate - }; + // Folder (we check for isDirectory() because e.g. paths like /dev/null + // are neither file nor folder but some external tools might pass them + // over to us) + else if (candidateStat.isDirectory()) { + return { + folderPath: candidate + }; + } } } catch (error) { this.historyMainService.removeFromRecentlyOpened([candidate]); // since file does not seem to exist anymore, remove from recent diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index f92847452e1..921165fc844 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -831,7 +831,7 @@ export interface EditorContribOptions { readonly acceptSuggestionOnCommitCharacter: boolean; readonly snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; readonly wordBasedSuggestions: boolean; - readonly suggestSelection: 'first' | 'byRecency' | 'byPrefix'; + readonly suggestSelection: 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'; readonly suggestFontSize: number; readonly suggestLineHeight: number; readonly selectionHighlight: boolean; @@ -1712,7 +1712,7 @@ export class EditorOptionsValidator { 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), - suggestSelection: _stringSet<'first' | 'byRecency' | 'byPrefix'>(opts.suggestSelection, defaults.suggestSelection, ['first', 'byRecency', 'byPrefix']), + suggestSelection: _stringSet<'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>(opts.suggestSelection, defaults.suggestSelection, ['first', 'recentlyUsed', 'recentlyUsedByPrefix']), suggestFontSize: _clampedInt(opts.suggestFontSize, defaults.suggestFontSize, 0, 1000), suggestLineHeight: _clampedInt(opts.suggestLineHeight, defaults.suggestLineHeight, 0, 1000), selectionHighlight: _boolean(opts.selectionHighlight, defaults.selectionHighlight), @@ -2268,7 +2268,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { acceptSuggestionOnCommitCharacter: true, snippetSuggestions: 'inline', wordBasedSuggestions: true, - suggestSelection: 'byRecency', + suggestSelection: 'recentlyUsed', suggestFontSize: 0, suggestLineHeight: 0, selectionHighlight: true, @@ -2280,7 +2280,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { find: { seedSearchStringFromSelection: true, autoFindInSelection: false, - globalFindClipboard: true + globalFindClipboard: false }, colorDecorators: true, lightbulbEnabled: true diff --git a/src/vs/editor/common/model/indentationGuesser.ts b/src/vs/editor/common/model/indentationGuesser.ts index a900d301953..c000376b200 100644 --- a/src/vs/editor/common/model/indentationGuesser.ts +++ b/src/vs/editor/common/model/indentationGuesser.ts @@ -97,14 +97,23 @@ export function guessIndentation(source: ITextBuffer, defaultTabSize: number, de let spacesDiffCount = [0, 0, 0, 0, 0, 0, 0, 0, 0]; // `tabSize` scores for (let lineNumber = 1; lineNumber <= linesCount; lineNumber++) { + let currentLineLength = source.getLineLength(lineNumber); let currentLineText = source.getLineContent(lineNumber); + let charCodeAt: (offset: number) => number; + if (currentLineLength > 65536) { + // if the text buffer is chunk based, so long lines are cons-string, v8 will flattern the string when we check charCode. + // checking charCode on chunks directly is cheaper. + charCodeAt = (offset: number) => source.getLineCharCode(lineNumber, offset); + } else { + charCodeAt = (offset: number) => currentLineText.charCodeAt(offset); + } let currentLineHasContent = false; // does `currentLineText` contain non-whitespace chars let currentLineIndentation = 0; // index at which `currentLineText` contains the first non-whitespace char let currentLineSpacesCount = 0; // count of spaces found in `currentLineText` indentation let currentLineTabsCount = 0; // count of tabs found in `currentLineText` indentation - for (let j = 0, lenJ = currentLineText.length; j < lenJ; j++) { - let charCode = currentLineText.charCodeAt(j); + for (let j = 0, lenJ = currentLineLength; j < lenJ; j++) { + let charCode = charCodeAt(j); if (charCode === CharCode.Tab) { currentLineTabsCount++; diff --git a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.ts b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.ts index d5497dd4c34..13d97ac3c5a 100644 --- a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.ts +++ b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.ts @@ -196,18 +196,82 @@ class PieceTreeSnapshot implements ITextSnapshot { } } +class PieceTreeSearchCache { + private _limit: number; + private _cache: { node: TreeNode, nodeStartOffset: number, nodeStartLineNumber?: number }[]; + + constructor(limit: number) { + this._limit = limit; + this._cache = []; + } + + public get(offset: number): { node: TreeNode, nodeStartOffset: number, nodeStartLineNumber?: number } { + for (let i = this._cache.length - 1; i >= 0; i--) { + let nodePos = this._cache[i]; + if (nodePos.nodeStartOffset <= offset && nodePos.nodeStartOffset + nodePos.node.piece.length >= offset) { + return nodePos; + } + } + return null; + } + + public get2(lineNumber: number): { node: TreeNode, nodeStartOffset: number, nodeStartLineNumber?: number } { + for (let i = this._cache.length - 1; i >= 0; i--) { + let nodePos = this._cache[i]; + if (nodePos.nodeStartLineNumber && nodePos.nodeStartLineNumber < lineNumber && nodePos.nodeStartLineNumber + nodePos.node.piece.lineFeedCnt >= lineNumber) { + return nodePos; + } + } + return null; + } + + public set(nodePosition: { node: TreeNode, nodeStartOffset: number, nodeStartLineNumber?: number }) { + if (this._cache.length >= this._limit) { + this._cache.shift(); + } + this._cache.push(nodePosition); + } + + public valdiate(offset: number) { + let hasInvalidVal = false; + for (let i = 0; i < this._cache.length; i++) { + let nodePos = this._cache[i]; + if (nodePos.node.parent === null || nodePos.nodeStartOffset >= offset) { + this._cache[i] = null; + hasInvalidVal = true; + continue; + } + } + + if (hasInvalidVal) { + let newArr = []; + for (let i = 0; i < this._cache.length; i++) { + if (this._cache[i] !== null) { + newArr.push(this._cache[i]); + } + } + + this._cache = newArr; + } + } +} + export class PieceTreeBase { root: TreeNode; protected _buffers: StringBuffer[]; // 0 is change buffer, others are readonly original buffer. protected _lineCnt: number; protected _length: number; + protected _EOL: string; + protected _EOLLength: number; + protected _EOLNormalized: boolean; private _lastChangeBufferPos: BufferCursor; + private _searchCache: PieceTreeSearchCache; - constructor(chunks: StringBuffer[]) { - this.create(chunks); + constructor(chunks: StringBuffer[], eol: '\r\n' | '\n', eolNormalized: boolean) { + this.create(chunks, eol, eolNormalized); } - create(chunks: StringBuffer[]) { + create(chunks: StringBuffer[], eol: '\r\n' | '\n', eolNormalized: boolean) { this._buffers = [ new StringBuffer('', [0]) ]; @@ -215,6 +279,9 @@ export class PieceTreeBase { this.root = SENTINEL; this._lineCnt = 1; this._length = 0; + this._EOL = eol; + this._EOLLength = eol.length; + this._EOLNormalized = eolNormalized; let lastNode: TreeNode = null; for (let i = 0, len = chunks.length; i < len; i++) { @@ -235,8 +302,8 @@ export class PieceTreeBase { } } + this._searchCache = new PieceTreeSearchCache(1); this.computeBufferMetadata(); - } normalizeEOL(eol: '\r\n' | '\n') { @@ -270,10 +337,20 @@ export class PieceTreeBase { chunks.push(new StringBuffer(text, createLineStartsFast(text))); } - this.create(chunks); + this.create(chunks, eol, true); } // #region Buffer API + public getEOL(): string { + return this._EOL; + } + + public setEOL(newEOL: '\r\n' | '\n'): void { + this._EOL = newEOL; + this._EOLLength = this._EOL.length; + this.normalizeEOL(newEOL); + } + public createSnapshot(BOM: string): ITextSnapshot { return new PieceTreeSnapshot(this, BOM); } @@ -372,8 +449,8 @@ export class PieceTreeBase { return ''; } - let startPosition = this.nodeAt2(new Position(range.startLineNumber, range.startColumn)); - let endPosition = this.nodeAt2(new Position(range.endLineNumber, range.endColumn)); + let startPosition = this.nodeAt2(range.startLineNumber, range.startColumn); + let endPosition = this.nodeAt2(range.endLineNumber, range.endColumn); return this.getValueInRange2(startPosition, endPosition); } @@ -422,11 +499,19 @@ export class PieceTreeBase { } public getLineContent(lineNumber): string { - return this.getLineRawContent(lineNumber).replace(/(\r\n|\r|\n)$/, ''); + if (lineNumber === this._lineCnt) { + return this.getLineRawContent(lineNumber); + } + + if (this._EOLNormalized) { + return this.getLineRawContent(lineNumber, this._EOLLength); + } else { + return this.getLineRawContent(lineNumber).replace(/(\r\n|\r|\n)$/, ''); + } } public getLineCharCode(lineNumber: number, index: number): number { - let nodePos = this.nodeAt2(new Position(lineNumber, index + 1)); + let nodePos = this.nodeAt2(lineNumber, index + 1); let buffer = this._buffers[nodePos.node.piece.bufferIndex]; let startOffset = this.offsetInBuffer(nodePos.node.piece.bufferIndex, nodePos.node.piece.start); let targetOffset = startOffset + index; @@ -434,10 +519,20 @@ export class PieceTreeBase { return buffer.buffer.charCodeAt(targetOffset); } + public getLineLength(lineNumber: number): number { + if (lineNumber === this.getLineCount()) { + let startOffset = this.getOffsetAt(lineNumber, 1); + return this.getLength() - startOffset; + } + return this.getOffsetAt(lineNumber + 1, 1) - this.getOffsetAt(lineNumber, 1) - this._EOLLength; + } + // #endregion // #region Piece Table - insert(offset: number, value: string): void { + insert(offset: number, value: string, eolNormalized: boolean = false): void { + this._EOLNormalized = this._EOLNormalized && eolNormalized; + if (this.root !== SENTINEL) { let { node, remainder, nodeStartOffset } = this.nodeAt(offset); let piece = node.piece; @@ -456,6 +551,7 @@ export class PieceTreeBase { if (nodeStartOffset === offset) { this.insertContentToNodeLeft(value, node); + this._searchCache.valdiate(offset); } else if (nodeStartOffset + node.piece.length > offset) { // we are inserting into the middle of a node. let nodesToDel = []; @@ -467,20 +563,20 @@ export class PieceTreeBase { this.offsetInBuffer(bufferIndex, piece.end) - this.offsetInBuffer(bufferIndex, insertPosInBuffer) ); - if (this.endWithCR(value)) { + if (this.shouldCheckCRLF() && this.endWithCR(value)) { let headOfRight = this.nodeCharCodeAt(node, remainder); if (headOfRight === 10 /** \n */) { let newStart: BufferCursor = { line: newRightPiece.start.line + 1, column: 0 }; newRightPiece.start = newStart; newRightPiece.length -= 1; - newRightPiece.lineFeedCnt = this.getLineFeedCnt(newRightPiece.bufferIndex, newRightPiece.start, newRightPiece.end); // @todo, we can optimize + newRightPiece.lineFeedCnt = this.getLineFeedCnt(newRightPiece.bufferIndex, newRightPiece.start, newRightPiece.end); value += '\n'; } } // reuse node for content before insertion point. - if (this.startWithLF(value)) { + if (this.shouldCheckCRLF() && this.startWithLF(value)) { let tailOfLeft = this.nodeCharCodeAt(node, remainder - 1); if (tailOfLeft === 13 /** \r */) { let previousPos = this.positionInBuffer(node, remainder - 1); @@ -539,6 +635,7 @@ export class PieceTreeBase { return; } this.deleteNodeHead(startNode, endSplitPosInBuffer); + this._searchCache.valdiate(offset); this.validateCRLFWithPrevNode(startNode); this.computeBufferMetadata(); return; @@ -561,6 +658,7 @@ export class PieceTreeBase { let startSplitPosInBuffer = this.positionInBuffer(startNode, startPosition.remainder); this.deleteNodeTail(startNode, startSplitPosInBuffer); + this._searchCache.valdiate(offset); if (startNode.piece.length === 0) { nodesToDel.push(startNode); } @@ -587,13 +685,13 @@ export class PieceTreeBase { insertContentToNodeLeft(value: string, node: TreeNode) { // we are inserting content to the beginning of node let nodesToDel = []; - if (this.endWithCR(value) && this.startWithLF(node)) { + if (this.shouldCheckCRLF() && this.endWithCR(value) && this.startWithLF(node)) { // move `\n` to new node. let piece = node.piece; let newStart: BufferCursor = { line: piece.start.line + 1, column: 0 }; piece.start = newStart; - piece.lineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, piece.end); // @todo, we can optimize + piece.lineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, piece.end); piece.length -= 1; value += '\n'; @@ -743,7 +841,7 @@ export class PieceTreeBase { 0, start, endPos, - this.getLineFeedCnt(0, start, endPos), // @todo, optimize + this.getLineFeedCnt(0, start, endPos), endOffset - startOffset ); this._lastChangeBufferPos = endPos; @@ -754,29 +852,53 @@ export class PieceTreeBase { return this.getContentOfSubTree(this.root); } - getLineRawContent(lineNumber: number): string { + getLineRawContent(lineNumber: number, endOffset: number = 0): string { let x = this.root; let ret = ''; - while (x !== SENTINEL) { - if (x.left !== SENTINEL && x.lf_left >= lineNumber - 1) { - x = x.left; - } else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) { - let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2); - let accumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1); - let buffer = this._buffers[x.piece.bufferIndex].buffer; - let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); - return buffer.substring(startOffset + prevAccumualtedValue, startOffset + accumualtedValue); - } else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) { - let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2); - let buffer = this._buffers[x.piece.bufferIndex].buffer; - let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); - + let cache = this._searchCache.get2(lineNumber); + if (cache) { + x = cache.node; + let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - cache.nodeStartLineNumber - 1); + let buffer = this._buffers[x.piece.bufferIndex].buffer; + let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); + if (cache.nodeStartLineNumber + x.piece.lineFeedCnt === lineNumber) { ret = buffer.substring(startOffset + prevAccumualtedValue, startOffset + x.piece.length); - break; } else { - lineNumber -= x.lf_left + x.piece.lineFeedCnt; - x = x.right; + let accumualtedValue = this.getAccumulatedValue(x, lineNumber - cache.nodeStartLineNumber); + return buffer.substring(startOffset + prevAccumualtedValue, startOffset + accumualtedValue - endOffset); + } + } else { + let nodeStartOffset = 0; + const originalLineNumber = lineNumber; + while (x !== SENTINEL) { + if (x.left !== SENTINEL && x.lf_left >= lineNumber - 1) { + x = x.left; + } else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) { + let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2); + let accumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1); + let buffer = this._buffers[x.piece.bufferIndex].buffer; + let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); + nodeStartOffset += x.size_left; + this._searchCache.set({ + node: x, + nodeStartOffset, + nodeStartLineNumber: originalLineNumber - (lineNumber - 1 - x.lf_left) + }); + + return buffer.substring(startOffset + prevAccumualtedValue, startOffset + accumualtedValue - endOffset); + } else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) { + let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2); + let buffer = this._buffers[x.piece.bufferIndex].buffer; + let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); + + ret = buffer.substring(startOffset + prevAccumualtedValue, startOffset + x.piece.length); + break; + } else { + lineNumber -= x.lf_left + x.piece.lineFeedCnt; + nodeStartOffset += x.size_left + x.piece.length; + x = x.right; + } } } @@ -789,7 +911,7 @@ export class PieceTreeBase { let accumualtedValue = this.getAccumulatedValue(x, 0); let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); - ret += buffer.substring(startOffset, startOffset + accumualtedValue); + ret += buffer.substring(startOffset, startOffset + accumualtedValue - endOffset); return ret; } else { let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); @@ -816,6 +938,7 @@ export class PieceTreeBase { this._lineCnt = lfCnt; this._length = len; + this._searchCache.valdiate(this._length); } // #region node operations @@ -869,7 +992,7 @@ export class PieceTreeBase { let originalStartOffset = this.offsetInBuffer(piece.bufferIndex, piece.start); piece.start = pos; - piece.lineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, piece.end); // @todo, maybe we can optimize this case as we just change start. + piece.lineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, piece.end); let newStartOffset = this.offsetInBuffer(piece.bufferIndex, piece.start); let lf_delta = piece.lineFeedCnt - originalLFCnt; let size_delta = originalStartOffset - newStartOffset; @@ -910,7 +1033,7 @@ export class PieceTreeBase { value += '\n'; } - let hitCRLF = this.startWithLF(value) && this.endWithCR(node); + let hitCRLF = this.shouldCheckCRLF() && this.startWithLF(value) && this.endWithCR(node); const startOffset = this._buffers[0].buffer.length; this._buffers[0].buffer += value; const lineStarts = createLineStartsFast(value, false); @@ -940,6 +1063,15 @@ export class PieceTreeBase { nodeAt(offset: number): NodePosition { let x = this.root; + let cache = this._searchCache.get(offset); + if (cache) { + return { + node: cache.node, + nodeStartOffset: cache.nodeStartOffset, + remainder: offset - cache.nodeStartOffset + }; + } + let nodeStartOffset = 0; while (x !== SENTINEL) { @@ -947,11 +1079,13 @@ export class PieceTreeBase { x = x.left; } else if (x.size_left + x.piece.length >= offset) { nodeStartOffset += x.size_left; - return { + let ret = { node: x, remainder: offset - x.size_left, nodeStartOffset }; + this._searchCache.set(ret); + return ret; } else { offset -= x.size_left + x.piece.length; nodeStartOffset += x.size_left + x.piece.length; @@ -962,10 +1096,8 @@ export class PieceTreeBase { return null; } - nodeAt2(position: Position): NodePosition { + nodeAt2(lineNumber: number, column: number): NodePosition { let x = this.root; - let lineNumber = position.lineNumber; - let column = position.column; let nodeStartOffset = 0; while (x !== SENTINEL) { @@ -1059,6 +1191,10 @@ export class PieceTreeBase { // #endregion // #region CRLF + shouldCheckCRLF() { + return !(this._EOLNormalized && this._EOL === '\n'); + } + startWithLF(val: string | TreeNode): boolean { if (typeof val === 'string') { return val.charCodeAt(0) === 10; @@ -1096,7 +1232,7 @@ export class PieceTreeBase { } validateCRLFWithPrevNode(nextNode: TreeNode) { - if (this.startWithLF(nextNode)) { + if (this.shouldCheckCRLF() && this.startWithLF(nextNode)) { let node = nextNode.prev(); if (this.endWithCR(node)) { this.fixCRLF(node, nextNode); @@ -1105,7 +1241,7 @@ export class PieceTreeBase { } validateCRLFWithNextNode(node: TreeNode) { - if (this.endWithCR(node)) { + if (this.shouldCheckCRLF() && this.endWithCR(node)) { let nextNode = node.next(); if (this.startWithLF(nextNode)) { this.fixCRLF(node, nextNode); @@ -1139,7 +1275,7 @@ export class PieceTreeBase { let newStart: BufferCursor = { line: next.piece.start.line + 1, column: 0 }; next.piece.start = newStart; next.piece.length -= 1; - next.piece.lineFeedCnt = this.getLineFeedCnt(next.piece.bufferIndex, next.piece.start, next.piece.end); // @todo, we can optimize + next.piece.lineFeedCnt = this.getLineFeedCnt(next.piece.bufferIndex, next.piece.start, next.piece.end); // } updateTreeMetadata(this, next, - 1, -1); @@ -1158,7 +1294,7 @@ export class PieceTreeBase { } adjustCarriageReturnFromNext(value: string, node: TreeNode): boolean { - if (this.endWithCR(value)) { + if (this.shouldCheckCRLF() && this.endWithCR(value)) { let nextNode = node.next(); if (this.startWithLF(nextNode)) { // move `\n` forward @@ -1172,7 +1308,7 @@ export class PieceTreeBase { let newStart: BufferCursor = { line: piece.start.line + 1, column: 0 }; piece.start = newStart; piece.length -= 1; - piece.lineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, piece.end); // @todo, we can optimize + piece.lineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, piece.end); updateTreeMetadata(this, nextNode, -1, -1); } return true; diff --git a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.ts b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.ts index f8505567923..1f5fbd1dda5 100644 --- a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.ts +++ b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.ts @@ -15,18 +15,14 @@ import { ITextSnapshot } from 'vs/platform/files/common/files'; export class PieceTreeTextBuffer implements ITextBuffer { private _pieceTree: PieceTreeBase; private _BOM: string; - private _EOL: string; - private _EOLLength: number; private _mightContainRTL: boolean; private _mightContainNonBasicASCII: boolean; - constructor(chunks: StringBuffer[], BOM: string, eol: '\r\n' | '\n', containsRTL: boolean, isBasicASCII: boolean) { + constructor(chunks: StringBuffer[], BOM: string, eol: '\r\n' | '\n', containsRTL: boolean, isBasicASCII: boolean, eolNormalized: boolean) { this._BOM = BOM; - this._EOL = eol; - this._EOLLength = this._EOL.length; this._mightContainNonBasicASCII = !isBasicASCII; this._mightContainRTL = containsRTL; - this._pieceTree = new PieceTreeBase(chunks); + this._pieceTree = new PieceTreeBase(chunks, eol, eolNormalized); } // #region TextBuffer @@ -37,7 +33,7 @@ export class PieceTreeTextBuffer implements ITextBuffer { if (this._BOM !== other._BOM) { return false; } - if (this._EOL !== other._EOL) { + if (this.getEOL() !== other.getEOL()) { return false; } return this._pieceTree.equal(other._pieceTree); @@ -52,7 +48,7 @@ export class PieceTreeTextBuffer implements ITextBuffer { return this._BOM; } public getEOL(): string { - return this._EOL; + return this._pieceTree.getEOL(); } public createSnapshot(preserveBOM: boolean): ITextSnapshot { @@ -119,11 +115,7 @@ export class PieceTreeTextBuffer implements ITextBuffer { } public getLineLength(lineNumber: number): number { - if (lineNumber === this.getLineCount()) { - let startOffset = this.getOffsetAt(lineNumber, 1); - return this.getLength() - startOffset; - } - return this.getOffsetAt(lineNumber + 1, 1) - this.getOffsetAt(lineNumber, 1) - this._EOLLength; + return this._pieceTree.getLineLength(lineNumber); } public getLineMinColumn(lineNumber: number): number { @@ -163,9 +155,7 @@ export class PieceTreeTextBuffer implements ITextBuffer { } public setEOL(newEOL: '\r\n' | '\n'): void { - this._EOL = newEOL; - this._EOLLength = this._EOL.length; - this._pieceTree.normalizeEOL(newEOL); + this._pieceTree.setEOL(newEOL); } public applyEdits(rawOperations: IIdentifiedSingleEditOperation[], recordTrimAutoWhitespace: boolean): ApplyEditsResult { @@ -392,7 +382,7 @@ export class PieceTreeTextBuffer implements ITextBuffer { if (text) { // replacement this._pieceTree.delete(op.rangeOffset, op.rangeLength); - this._pieceTree.insert(op.rangeOffset, text); + this._pieceTree.insert(op.rangeOffset, text, true); } else { // deletion diff --git a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts index ab46a6892b3..155b3d15e64 100644 --- a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts +++ b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts @@ -54,7 +54,7 @@ export class PieceTreeTextBufferFactory implements ITextBufferFactory { } } - return new PieceTreeTextBuffer(chunks, this._bom, eol, this._containsRTL, this._isBasicASCII); + return new PieceTreeTextBuffer(chunks, this._bom, eol, this._containsRTL, this._isBasicASCII, this._normalizeEOL); } public getFirstLineText(lengthLimit: number): string { diff --git a/src/vs/editor/common/model/textModel.ts b/src/vs/editor/common/model/textModel.ts index f9f3edbe92e..e5d8c8523ca 100644 --- a/src/vs/editor/common/model/textModel.ts +++ b/src/vs/editor/common/model/textModel.ts @@ -44,7 +44,7 @@ export enum TextBufferType { } // Here is the master switch for the text buffer implementation: export const OPTIONS = { - TEXT_BUFFER_IMPLEMENTATION: TextBufferType.LinesArray + TEXT_BUFFER_IMPLEMENTATION: TextBufferType.PieceTree }; function createTextBufferBuilder() { diff --git a/src/vs/editor/contrib/find/test/findController.test.ts b/src/vs/editor/contrib/find/test/findController.test.ts index 7eb0243f2c1..f48c33a6977 100644 --- a/src/vs/editor/contrib/find/test/findController.test.ts +++ b/src/vs/editor/contrib/find/test/findController.test.ts @@ -92,7 +92,7 @@ suite('FindController', () => { }); } - test('stores to the global clipboard buffer on start find action', () => { + /* test('stores to the global clipboard buffer on start find action', () => { withTestCodeEditor([ 'ABC', 'ABC', @@ -165,7 +165,7 @@ suite('FindController', () => { findController.dispose(); }); - }); + }); */ test('issue #1857: F3, Find Next, acts like "Find Under Cursor"', () => { withTestCodeEditor([ diff --git a/src/vs/editor/contrib/referenceSearch/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/referencesWidget.ts index 47ea71b6a66..7b0e5ee38ed 100644 --- a/src/vs/editor/contrib/referenceSearch/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/referencesWidget.ts @@ -43,6 +43,7 @@ import { TrackedRangeStickiness, IModelDeltaDecoration } from 'vs/editor/common/ import { WorkbenchTree, WorkbenchTreeController } from 'vs/platform/list/browser/listService'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { Location } from 'vs/editor/common/modes'; +import { ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults'; class DecorationsManager implements IDisposable { @@ -245,7 +246,7 @@ class Controller extends WorkbenchTreeController { var isDoubleClick = event.detail === 2; if (event.leftButton) { if (element instanceof FileReferences) { - if (this.openOnSingleClick || isDoubleClick) { + if (this.openOnSingleClick || isDoubleClick || this.isClickOnTwistie(event)) { event.preventDefault(); event.stopPropagation(); return this._expandCollapse(tree, element); @@ -634,7 +635,7 @@ export class ReferenceWidget extends PeekViewWidget { // tree container.div({ 'class': 'ref-tree inline' }, (div: Builder) => { - var controller = this._instantiationService.createInstance(Controller, {}); + var controller = this._instantiationService.createInstance(Controller, { clickBehavior: ClickBehavior.ON_MOUSE_UP /* our controller already deals with this */ }); this._callOnDispose.push(controller); var config = <tree.ITreeConfiguration>{ diff --git a/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts index 7eb0f74f147..743b5322b1c 100644 --- a/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts +++ b/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts @@ -217,6 +217,9 @@ suite('Snippet Variables Resolver', function () { writeText = this._throw; readFindText = this._throw; writeFindText = this._throw; + writeFiles = this._throw; + readFiles = this._throw; + hasFiles = this._throw; }; let resolver = new ClipboardBasedVariableResolver(clipboardService, 1, 0); @@ -247,6 +250,9 @@ suite('Snippet Variables Resolver', function () { writeText = this._throw; readFindText = this._throw; writeFindText = this._throw; + writeFiles = this._throw; + readFiles = this._throw; + hasFiles = this._throw; }; resolver = new ClipboardBasedVariableResolver(clipboardService, 1, 2); diff --git a/src/vs/editor/contrib/suggest/suggestMemory.ts b/src/vs/editor/contrib/suggest/suggestMemory.ts index 3fdcc99d6be..58df1fd7179 100644 --- a/src/vs/editor/contrib/suggest/suggestMemory.ts +++ b/src/vs/editor/contrib/suggest/suggestMemory.ts @@ -165,7 +165,7 @@ export class PrefixMemory extends Memory { } } -export type MemMode = 'first' | 'byRecency' | 'byPrefix'; +export type MemMode = 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'; export class SuggestMemories { @@ -188,7 +188,7 @@ export class SuggestMemories { return; } this._mode = mode; - this._strategy = mode === 'byPrefix' ? new PrefixMemory() : mode === 'byRecency' ? new LRUMemory() : new NoMemory(); + this._strategy = mode === 'recentlyUsedByPrefix' ? new PrefixMemory() : mode === 'recentlyUsed' ? new LRUMemory() : new NoMemory(); try { const raw = this._storageService.get(`${this._storagePrefix}/${this._mode}`, StorageScope.WORKSPACE); diff --git a/src/vs/editor/contrib/suggest/suggestModel.ts b/src/vs/editor/contrib/suggest/suggestModel.ts index b597301e9c8..74afb8d540f 100644 --- a/src/vs/editor/contrib/suggest/suggestModel.ts +++ b/src/vs/editor/contrib/suggest/suggestModel.ts @@ -19,22 +19,22 @@ import { CursorChangeReason, ICursorSelectionChangedEvent } from 'vs/editor/comm import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; export interface ICancelEvent { - retrigger: boolean; + readonly retrigger: boolean; } export interface ITriggerEvent { - auto: boolean; + readonly auto: boolean; } export interface ISuggestEvent { - completionModel: CompletionModel; - isFrozen: boolean; - auto: boolean; + readonly completionModel: CompletionModel; + readonly isFrozen: boolean; + readonly auto: boolean; } export interface SuggestTriggerContext { - auto: boolean; - triggerCharacter?: string; + readonly auto: boolean; + readonly triggerCharacter?: string; } export class LineContext { diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index 05c83cead70..fd0c0a21f47 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -633,8 +633,7 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem> switch (state) { case State.Hidden: - hide(this.messageElement, this.details.element); - show(this.listElement); + hide(this.messageElement, this.details.element, this.listElement); this.hide(); if (stateChanged) { this.list.splice(0, this.list.length); @@ -679,7 +678,7 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem> break; } - if (stateChanged) { + if (stateChanged && this.state !== State.Hidden) { this.editor.layoutContentWidget(this); } } diff --git a/src/vs/editor/test/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.test.ts b/src/vs/editor/test/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.test.ts index a396f91cc40..6d0a4104cab 100644 --- a/src/vs/editor/test/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.test.ts +++ b/src/vs/editor/test/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.test.ts @@ -1441,7 +1441,8 @@ suite('centralized lineStarts with CRLF', () => { }); suite('random is unsupervised', () => { - test('random insert delete', () => { + test('random insert delete', function () { + this.timeout(500000); let str = ''; let pieceTable = createTextBuffer([str], false); @@ -1471,7 +1472,8 @@ suite('random is unsupervised', () => { assertTreeInvariants(pieceTable); }); - test('random chunks', () => { + test('random chunks', function () { + this.timeout(500000); let chunks = []; for (let i = 0; i < 5; i++) { chunks.push(randomStr(1000)); @@ -1504,6 +1506,40 @@ suite('random is unsupervised', () => { testLinesContent(str, pieceTable); assertTreeInvariants(pieceTable); }); + + test('random chunks 2', function () { + this.timeout(500000); + let chunks = []; + chunks.push(randomStr(1000)); + + let pieceTable = createTextBuffer(chunks, false); + let str = chunks.join(''); + + for (let i = 0; i < 50; i++) { + if (Math.random() < 0.6) { + // insert + let text = randomStr(30); + let pos = randomInt(str.length + 1); + pieceTable.insert(pos, text); + str = str.substring(0, pos) + text + str.substring(pos); + } else { + // delete + let pos = randomInt(str.length); + let length = Math.min( + str.length - pos, + Math.floor(Math.random() * 10) + ); + pieceTable.delete(pos, length); + str = str.substring(0, pos) + str.substring(pos + length); + } + testLinesContent(str, pieceTable); + } + + assert.equal(pieceTable.getLinesRawContent(), str); + testLineStarts(str, pieceTable); + testLinesContent(str, pieceTable); + assertTreeInvariants(pieceTable); + }); }); suite('buffer api', () => { @@ -1589,4 +1625,53 @@ suite('search offset cache', () => { var content = pieceTable.getLinesRawContent(); assert(content === str); }); + + test('Line breaks replacement is not necessary when EOL is normalized', () => { + let pieceTable = createTextBuffer(['abc']); + let str = 'abc'; + + pieceTable.insert(3, 'def\nabc'); + str = str + 'def\nabc'; + + testLineStarts(str, pieceTable); + testLinesContent(str, pieceTable); + assertTreeInvariants(pieceTable); + }); + + test('Line breaks replacement is not necessary when EOL is normalized 2', () => { + let pieceTable = createTextBuffer(['abc\n']); + let str = 'abc\n'; + + pieceTable.insert(4, 'def\nabc'); + str = str + 'def\nabc'; + + testLineStarts(str, pieceTable); + testLinesContent(str, pieceTable); + assertTreeInvariants(pieceTable); + }); + + test('Line breaks replacement is not necessary when EOL is normalized 3', () => { + let pieceTable = createTextBuffer(['abc\n']); + let str = 'abc\n'; + + pieceTable.insert(2, 'def\nabc'); + str = str.substring(0, 2) + 'def\nabc' + str.substring(2); + + testLineStarts(str, pieceTable); + testLinesContent(str, pieceTable); + assertTreeInvariants(pieceTable); + }); + + test('Line breaks replacement is not necessary when EOL is normalized 4', () => { + let pieceTable = createTextBuffer(['abc\n']); + let str = 'abc\n'; + + pieceTable.insert(3, 'def\nabc'); + str = str.substring(0, 3) + 'def\nabc' + str.substring(3); + + testLineStarts(str, pieceTable); + testLinesContent(str, pieceTable); + assertTreeInvariants(pieceTable); + }); + }); \ No newline at end of file diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index ee095d5b1fe..0a1cc793efd 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -3052,7 +3052,7 @@ declare module monaco.editor { readonly acceptSuggestionOnCommitCharacter: boolean; readonly snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; readonly wordBasedSuggestions: boolean; - readonly suggestSelection: 'first' | 'byRecency' | 'byPrefix'; + readonly suggestSelection: 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'; readonly suggestFontSize: number; readonly suggestLineHeight: number; readonly selectionHighlight: boolean; diff --git a/src/vs/platform/actions/test/common/menuService.test.ts b/src/vs/platform/actions/test/common/menuService.test.ts index caf6313eafb..b9253e58a09 100644 --- a/src/vs/platform/actions/test/common/menuService.test.ts +++ b/src/vs/platform/actions/test/common/menuService.test.ts @@ -67,10 +67,6 @@ class MockExtensionService implements IExtensionService { public stopExtensionHost(): void { throw new Error('Method not implemented.'); } - - public getExtensionHostInformation(): any { - throw new Error('Method not implemented.'); - } } const extensionService = new MockExtensionService(); 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 60c83ef1746..d49a9e7ad73 100644 --- a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts +++ b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts @@ -23,6 +23,7 @@ import { ConsoleLogMainService } from 'vs/platform/log/common/log'; import { IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { createHash } from 'crypto'; import { getRandomTestPath } from 'vs/workbench/test/workbenchTestServices'; +import { Schemas } from 'vs/base/common/network'; suite('BackupMainService', () => { const parentDir = getRandomTestPath(os.tmpdir(), 'vsctests', 'backupservice'); @@ -122,8 +123,8 @@ suite('BackupMainService', () => { // 3) backup workspace path exists with empty folders within fs.mkdirSync(service.toBackupPath(fooFile.fsPath)); fs.mkdirSync(service.toBackupPath(barFile.fsPath)); - fs.mkdirSync(path.join(service.toBackupPath(fooFile.fsPath), 'file')); - fs.mkdirSync(path.join(service.toBackupPath(barFile.fsPath), 'untitled')); + fs.mkdirSync(path.join(service.toBackupPath(fooFile.fsPath), Schemas.file)); + fs.mkdirSync(path.join(service.toBackupPath(barFile.fsPath), Schemas.untitled)); service.registerFolderBackupSync(fooFile.fsPath); service.registerFolderBackupSync(barFile.fsPath); service.loadSync(); @@ -133,7 +134,7 @@ suite('BackupMainService', () => { // 4) backup workspace path points to a workspace that no longer exists // so it should convert the backup worspace to an empty workspace backup - const fileBackups = path.join(service.toBackupPath(fooFile.fsPath), 'file'); + const fileBackups = path.join(service.toBackupPath(fooFile.fsPath), Schemas.file); fs.mkdirSync(service.toBackupPath(fooFile.fsPath)); fs.mkdirSync(service.toBackupPath(barFile.fsPath)); fs.mkdirSync(fileBackups); @@ -169,8 +170,8 @@ suite('BackupMainService', () => { // 3) backup workspace path exists with empty folders within fs.mkdirSync(service.toBackupPath(fooFile.fsPath)); fs.mkdirSync(service.toBackupPath(barFile.fsPath)); - fs.mkdirSync(path.join(service.toBackupPath(fooFile.fsPath), 'file')); - fs.mkdirSync(path.join(service.toBackupPath(barFile.fsPath), 'untitled')); + fs.mkdirSync(path.join(service.toBackupPath(fooFile.fsPath), Schemas.file)); + fs.mkdirSync(path.join(service.toBackupPath(barFile.fsPath), Schemas.untitled)); service.registerWorkspaceBackupSync(toWorkspace(fooFile.fsPath)); service.registerWorkspaceBackupSync(toWorkspace(barFile.fsPath)); service.loadSync(); @@ -180,7 +181,7 @@ suite('BackupMainService', () => { // 4) backup workspace path points to a workspace that no longer exists // so it should convert the backup worspace to an empty workspace backup - const fileBackups = path.join(service.toBackupPath(fooFile.fsPath), 'file'); + const fileBackups = path.join(service.toBackupPath(fooFile.fsPath), Schemas.file); fs.mkdirSync(service.toBackupPath(fooFile.fsPath)); fs.mkdirSync(service.toBackupPath(barFile.fsPath)); fs.mkdirSync(fileBackups); diff --git a/src/vs/platform/broadcast/electron-browser/broadcastService.ts b/src/vs/platform/broadcast/electron-browser/broadcastService.ts index 638a77284aa..09c7f4f8ed6 100644 --- a/src/vs/platform/broadcast/electron-browser/broadcastService.ts +++ b/src/vs/platform/broadcast/electron-browser/broadcastService.ts @@ -9,6 +9,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' import Event, { Emitter } from 'vs/base/common/event'; import { ipcRenderer as ipc } from 'electron'; +import { ILogService } from 'vs/platform/log/common/log'; export const IBroadcastService = createDecorator<IBroadcastService>('broadcastService'); @@ -30,7 +31,10 @@ export class BroadcastService implements IBroadcastService { private _onBroadcast: Emitter<IBroadcast>; - constructor(private windowId: number) { + constructor( + private windowId: number, + @ILogService private logService: ILogService + ) { this._onBroadcast = new Emitter<IBroadcast>(); this.registerListeners(); @@ -38,6 +42,8 @@ export class BroadcastService implements IBroadcastService { private registerListeners(): void { ipc.on('vscode:broadcast', (event, b: IBroadcast) => { + this.logService.trace(`Received broadcast from main in window ${this.windowId}: `, b); + this._onBroadcast.fire(b); }); } @@ -47,6 +53,8 @@ export class BroadcastService implements IBroadcastService { } public broadcast(b: IBroadcast): void { + this.logService.trace(`Sending broadcast to main from window ${this.windowId}: `, b); + ipc.send('vscode:broadcast', this.windowId, { channel: b.channel, payload: b.payload diff --git a/src/vs/platform/clipboard/common/clipboardService.ts b/src/vs/platform/clipboard/common/clipboardService.ts index ea350cacae3..cbcb41ffad0 100644 --- a/src/vs/platform/clipboard/common/clipboardService.ts +++ b/src/vs/platform/clipboard/common/clipboardService.ts @@ -6,6 +6,7 @@ 'use strict'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import URI from 'vs/base/common/uri'; export const IClipboardService = createDecorator<IClipboardService>('clipboardService'); @@ -32,4 +33,19 @@ export interface IClipboardService { * Writes text to the system find pasteboard. */ writeFindText(text: string): void; + + /** + * Writes files to the system clipboard. + */ + writeFiles(files: URI[]): void; + + /** + * Reads files from the system clipboard. + */ + readFiles(): URI[]; + + /** + * Find out if files are copied to the clipboard. + */ + hasFiles(): boolean; } diff --git a/src/vs/platform/clipboard/electron-browser/clipboardService.ts b/src/vs/platform/clipboard/electron-browser/clipboardService.ts index d779be48e6c..5bbc662702d 100644 --- a/src/vs/platform/clipboard/electron-browser/clipboardService.ts +++ b/src/vs/platform/clipboard/electron-browser/clipboardService.ts @@ -7,10 +7,15 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { clipboard } from 'electron'; -import * as platform from 'vs/base/common/platform'; +import URI from 'vs/base/common/uri'; +import { isMacintosh } from 'vs/base/common/platform'; +import { Schemas } from 'vs/base/common/network'; export class ClipboardService implements IClipboardService { + // Clipboard format for files + private static FILE_FORMAT = 'code/file-list'; + _serviceBrand: any; public writeText(text: string): void { @@ -22,15 +27,53 @@ export class ClipboardService implements IClipboardService { } public readFindText(): string { - if (platform.isMacintosh) { + if (isMacintosh) { return clipboard.readFindText(); } + return ''; } public writeFindText(text: string): void { - if (platform.isMacintosh) { + if (isMacintosh) { clipboard.writeFindText(text); } } -} + + public writeFiles(resources: URI[]): void { + const files = resources.filter(f => f.scheme === Schemas.file); + + if (files.length) { + clipboard.writeBuffer(ClipboardService.FILE_FORMAT, this.filesToBuffer(files)); + } + } + + public readFiles(): URI[] { + return this.bufferToFiles(clipboard.readBuffer(ClipboardService.FILE_FORMAT)); + } + + public hasFiles(): boolean { + return clipboard.has(ClipboardService.FILE_FORMAT); + } + + private filesToBuffer(resources: URI[]): Buffer { + return new Buffer(resources.map(r => r.fsPath).join('\n')); + } + + private bufferToFiles(buffer: Buffer): URI[] { + if (!buffer) { + return []; + } + + const bufferValue = buffer.toString(); + if (!bufferValue) { + return []; + } + + try { + return bufferValue.split('\n').map(f => URI.file(f)); + } catch (error) { + return []; // do not trust clipboard data + } + } +} \ No newline at end of file diff --git a/src/vs/platform/commands/common/commandService.ts b/src/vs/platform/commands/common/commandService.ts index ac972ac99aa..db0aff02f20 100644 --- a/src/vs/platform/commands/common/commandService.ts +++ b/src/vs/platform/commands/common/commandService.ts @@ -38,11 +38,16 @@ export class CommandService extends Disposable implements ICommandService { // host didn't yet start and the command is already registered const activation = this._extensionService.activateByEvent(`onCommand:${id}`); + const commandIsRegistered = !!CommandsRegistry.getCommand(id); - if (!this._extensionHostIsReady && CommandsRegistry.getCommand(id)) { + if (!this._extensionHostIsReady && commandIsRegistered) { return this._tryExecuteCommand(id, args); } else { - return activation.then(_ => this._tryExecuteCommand(id, args)); + let waitFor: TPromise<any> = activation; + if (!commandIsRegistered) { + waitFor = TPromise.join([activation, this._extensionService.activateByEvent(`*`)]); + } + return waitFor.then(_ => this._tryExecuteCommand(id, args)); } } diff --git a/src/vs/platform/commands/test/commandService.test.ts b/src/vs/platform/commands/test/commandService.test.ts index 1a08ba578ef..573d2505a6b 100644 --- a/src/vs/platform/commands/test/commandService.test.ts +++ b/src/vs/platform/commands/test/commandService.test.ts @@ -9,7 +9,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { CommandService } from 'vs/platform/commands/common/commandService'; -import { IExtensionService, ExtensionPointContribution, IExtensionDescription, IExtensionHostInformation, ProfileSession } from 'vs/platform/extensions/common/extensions'; +import { IExtensionService, ExtensionPointContribution, IExtensionDescription, ProfileSession } from 'vs/platform/extensions/common/extensions'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IExtensionPoint } from 'vs/platform/extensions/common/extensionsRegistry'; import Event, { Emitter } from 'vs/base/common/event'; @@ -34,9 +34,6 @@ class SimpleExtensionService implements IExtensionService { getExtensionsStatus() { return undefined; } - getExtensionHostInformation(): IExtensionHostInformation { - return undefined; - } getExtensions(): TPromise<IExtensionDescription[]> { return TPromise.wrap([]); } @@ -120,11 +117,11 @@ suite('CommandService', function () { let callCounter = 0; let resolveFunc: Function; - // let reg = CommandsRegistry.registerCommand('bar', () => callCounter += 1); + const whenInstalledExtensionsRegistered = new TPromise<boolean>(_resolve => { resolveFunc = _resolve; }); let service = new CommandService(new InstantiationService(), new class extends SimpleExtensionService { whenInstalledExtensionsRegistered() { - return new TPromise<boolean>(_resolve => { resolveFunc = _resolve; }); + return whenInstalledExtensionsRegistered; } }, new NullLogService()); diff --git a/src/vs/platform/configuration/common/configurationModels.ts b/src/vs/platform/configuration/common/configurationModels.ts index 6905750f1c2..6841525323d 100644 --- a/src/vs/platform/configuration/common/configurationModels.ts +++ b/src/vs/platform/configuration/common/configurationModels.ts @@ -397,14 +397,6 @@ export class Configuration { return this._folderConfigurations; } - private get memory(): ConfigurationModel { - return this._memoryConfiguration; - } - - private get memoryByResource(): StrictResourceMap<ConfigurationModel> { - return this._memoryConfigurationByResource; - } - private getConsolidateConfigurationModel(overrides: IConfigurationOverrides, workspace: Workspace): ConfigurationModel { let configurationModel = this.getConsolidatedConfigurationModelForResource(overrides, workspace); return overrides.overrideIdentifier ? configurationModel.override(overrides.overrideIdentifier) : configurationModel; diff --git a/src/vs/platform/contextkey/browser/contextKeyService.ts b/src/vs/platform/contextkey/browser/contextKeyService.ts index a0dd9ebd4a1..8f618c5d56e 100644 --- a/src/vs/platform/contextkey/browser/contextKeyService.ts +++ b/src/vs/platform/contextkey/browser/contextKeyService.ts @@ -51,6 +51,13 @@ export class Context implements IContext { } return ret; } + + collectAllValues(): { [key: string]: any; } { + let result = this._parent ? this._parent.collectAllValues() : Object.create(null); + result = { ...result, ...this._value }; + delete result['_contextId']; + return result; + } } class ConfigAwareContextValuesContainer extends Context { diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts index f70b6e81a5a..cc1adabd5fd 100644 --- a/src/vs/platform/environment/node/environmentService.ts +++ b/src/vs/platform/environment/node/environmentService.ts @@ -21,7 +21,8 @@ const xdgRuntimeDir = process.env['XDG_RUNTIME_DIR']; function getNixIPCHandle(userDataPath: string, type: string): string { if (xdgRuntimeDir) { - return path.join(xdgRuntimeDir, `${pkg.name}-${pkg.version}-${type}.sock`); + const scope = crypto.createHash('md5').update(userDataPath).digest('hex').substr(0, 8); + return path.join(xdgRuntimeDir, `vscode-${scope}-${pkg.version}-${type}.sock`); } return path.join(userDataPath, `${pkg.version}-${type}.sock`); diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index fb57f83221d..3ed914afb14 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -10,7 +10,7 @@ import * as path from 'path'; import * as pfs from 'vs/base/node/pfs'; import * as errors from 'vs/base/common/errors'; import { assign } from 'vs/base/common/objects'; -import { IDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle'; +import { toDisposable, Disposable } from 'vs/base/common/lifecycle'; import { flatten, distinct, coalesce } from 'vs/base/common/arrays'; import { extract, buffer } from 'vs/base/node/zip'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -32,8 +32,8 @@ import URI from 'vs/base/common/uri'; import { IChoiceService, Severity } from 'vs/platform/message/common/message'; import pkg from 'vs/platform/node/package'; import { isMacintosh } from 'vs/base/common/platform'; -import { MANIFEST_CACHE_FOLDER, USER_MANIFEST_CACHE_FILE } from 'vs/platform/extensions/common/extensions'; import { ILogService } from 'vs/platform/log/common/log'; +import { ExtensionsManifestCache } from 'vs/platform/extensionManagement/node/extensionsManifestCache'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); const ERROR_SCANNING_SYS_EXTENSIONS = 'scanningSystem'; @@ -98,7 +98,7 @@ interface InstallableExtension { metadata?: IGalleryMetadata; } -export class ExtensionManagementService implements IExtensionManagementService { +export class ExtensionManagementService extends Disposable implements IExtensionManagementService { _serviceBrand: any; @@ -107,7 +107,8 @@ export class ExtensionManagementService implements IExtensionManagementService { private uninstalledFileLimiter: Limiter<void>; private reportedExtensions: TPromise<IReportedExtension[]> | undefined; private lastReportTimestamp = 0; - private disposables: IDisposable[] = []; + private readonly installingExtensions: Map<string, TPromise<ILocalExtension>> = new Map<string, TPromise<ILocalExtension>>(); + private readonly manifestCache: ExtensionsManifestCache; private readonly _onInstallExtension = new Emitter<InstallExtensionEvent>(); readonly onInstallExtension: Event<InstallExtensionEvent> = this._onInstallExtension.event; @@ -118,33 +119,24 @@ export class ExtensionManagementService implements IExtensionManagementService { private readonly _onUninstallExtension = new Emitter<IExtensionIdentifier>(); readonly onUninstallExtension: Event<IExtensionIdentifier> = this._onUninstallExtension.event; - private readonly installingExtensions: Map<string, TPromise<ILocalExtension>> = new Map<string, TPromise<ILocalExtension>>(); - private _onDidUninstallExtension = new Emitter<DidUninstallExtensionEvent>(); onDidUninstallExtension: Event<DidUninstallExtensionEvent> = this._onDidUninstallExtension.event; constructor( - @IEnvironmentService private environmentService: IEnvironmentService, + @IEnvironmentService environmentService: IEnvironmentService, @IChoiceService private choiceService: IChoiceService, @IExtensionGalleryService private galleryService: IExtensionGalleryService, @ILogService private logService: ILogService ) { + super(); this.extensionsPath = environmentService.extensionsPath; this.uninstalledPath = path.join(this.extensionsPath, '.obsolete'); this.uninstalledFileLimiter = new Limiter(1); - this.disposables.push(toDisposable(() => this.installingExtensions.clear())); - } - - private deleteExtensionsManifestCache(): void { - const cacheFolder = path.join(this.environmentService.userDataPath, MANIFEST_CACHE_FOLDER); - const cacheFile = path.join(cacheFolder, USER_MANIFEST_CACHE_FILE); - - pfs.del(cacheFile).done(() => { }, () => { }); + this._register(toDisposable(() => this.installingExtensions.clear())); + this.manifestCache = this._register(new ExtensionsManifestCache(environmentService, this)); } install(zipPath: string): TPromise<void> { - this.deleteExtensionsManifestCache(); - zipPath = path.resolve(zipPath); return validateLocalExtension(zipPath) @@ -231,8 +223,6 @@ export class ExtensionManagementService implements IExtensionManagementService { } installFromGallery(extension: IGalleryExtension): TPromise<void> { - this.deleteExtensionsManifestCache(); - this.onInstallExtensions([extension]); return this.collectExtensionsToInstall(extension) .then( @@ -447,8 +437,6 @@ export class ExtensionManagementService implements IExtensionManagementService { } uninstall(extension: ILocalExtension, force = false): TPromise<void> { - this.deleteExtensionsManifestCache(); - return this.getInstalled(LocalExtensionType.User) .then(installed => { const promises = installed @@ -459,10 +447,12 @@ export class ExtensionManagementService implements IExtensionManagementService { } updateMetadata(local: ILocalExtension, metadata: IGalleryMetadata): TPromise<ILocalExtension> { - this.deleteExtensionsManifestCache(); - local.metadata = metadata; - return this.saveMetadataForLocalExtension(local); + return this.saveMetadataForLocalExtension(local) + .then(localExtension => { + this.manifestCache.invalidate(); + return localExtension; + }); } private saveMetadataForLocalExtension(local: ILocalExtension): TPromise<ILocalExtension> { @@ -626,8 +616,7 @@ export class ExtensionManagementService implements IExtensionManagementService { } private preUninstallExtension(extension: ILocalExtension): TPromise<void> { - const extensionPath = path.join(this.extensionsPath, extension.identifier.id); - return pfs.exists(extensionPath) + return pfs.exists(extension.path) .then(exists => exists ? null : TPromise.wrapError(new Error(nls.localize('notExists', "Could not find extension")))) .then(() => { this.logService.info('Uninstalling extension:', extension.identifier.id); @@ -808,10 +797,6 @@ export class ExtensionManagementService implements IExtensionManagementService { return []; }); } - - dispose() { - this.disposables = dispose(this.disposables); - } } export function getLocalExtensionIdFromGallery(extension: IGalleryExtension, version: string): string { diff --git a/src/vs/platform/extensionManagement/node/extensionsManifestCache.ts b/src/vs/platform/extensionManagement/node/extensionsManifestCache.ts new file mode 100644 index 00000000000..a4e1887321f --- /dev/null +++ b/src/vs/platform/extensionManagement/node/extensionsManifestCache.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. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { Disposable } from 'vs/base/common/lifecycle'; +import { join } from 'path'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { IExtensionManagementService, DidInstallExtensionEvent, DidUninstallExtensionEvent } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { MANIFEST_CACHE_FOLDER, USER_MANIFEST_CACHE_FILE } from 'vs/platform/extensions/common/extensions'; +import * as pfs from 'vs/base/node/pfs'; + +export class ExtensionsManifestCache extends Disposable { + + private extensionsManifestCache = join(this.environmentService.userDataPath, MANIFEST_CACHE_FOLDER, USER_MANIFEST_CACHE_FILE); + + constructor( + private readonly environmentService: IEnvironmentService, + extensionsManagementServuce: IExtensionManagementService + ) { + super(); + this._register(extensionsManagementServuce.onDidInstallExtension(e => this.onDidInstallExtension(e))); + this._register(extensionsManagementServuce.onDidUninstallExtension(e => this.onDidUnInstallExtension(e))); + } + + private onDidInstallExtension(e: DidInstallExtensionEvent): void { + if (!e.error) { + this.invalidate(); + } + } + + private onDidUnInstallExtension(e: DidUninstallExtensionEvent): void { + if (!e.error) { + this.invalidate(); + } + } + + invalidate(): void { + pfs.del(this.extensionsManifestCache).done(() => { }, () => { }); + } +} diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts index ec5d37cfa9f..ee067fcffcf 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts @@ -119,10 +119,6 @@ export class ExtensionPointContribution<T> { } } -export interface IExtensionHostInformation { - inspectPort: number; -} - export interface IExtensionService { _serviceBrand: any; @@ -192,11 +188,6 @@ export interface IExtensionService { * Stops the extension host. */ stopExtensionHost(): void; - - /** - * - */ - getExtensionHostInformation(): IExtensionHostInformation; } export interface ProfileSession { diff --git a/src/vs/platform/issue/common/issue.ts b/src/vs/platform/issue/common/issue.ts index 4ad6df21df9..e095b0e2a4b 100644 --- a/src/vs/platform/issue/common/issue.ts +++ b/src/vs/platform/issue/common/issue.ts @@ -9,13 +9,13 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; -export const ID = 'issueService'; -export const IIssueService = createDecorator<IIssueService>(ID); +export const IIssueService = createDecorator<IIssueService>('issueService'); export enum IssueType { Bug, PerformanceIssue, - FeatureRequest + FeatureRequest, + SettingsSearchIssue } export interface IssueReporterStyles { @@ -30,6 +30,9 @@ export interface IssueReporterStyles { buttonBackground: string; buttonForeground: string; buttonHoverBackground: string; + sliderBackgroundColor: string; + sliderHoverColor: string; + sliderActiveColor: string; } export interface IssueReporterData { @@ -39,7 +42,20 @@ export interface IssueReporterData { issueType?: IssueType; } +export interface ISettingSearchResult { + extensionId: string; + key: string; + score: number; +} + +export interface ISettingsSearchIssueReporterData extends IssueReporterData { + issueType: IssueType.SettingsSearchIssue; + actualSearchResults: ISettingSearchResult[]; + query: string; + filterResultCount: number; +} + export interface IIssueService { _serviceBrand: any; openReporter(data: IssueReporterData): TPromise<void>; -} \ No newline at end of file +} diff --git a/src/vs/platform/issue/electron-main/issueService.ts b/src/vs/platform/issue/electron-main/issueService.ts index 02ed4c69862..13179eb7184 100644 --- a/src/vs/platform/issue/electron-main/issueService.ts +++ b/src/vs/platform/issue/electron-main/issueService.ts @@ -10,16 +10,18 @@ import { localize } from 'vs/nls'; import * as objects from 'vs/base/common/objects'; import { parseArgs } from 'vs/platform/environment/node/argv'; import { IIssueService, IssueReporterData } from 'vs/platform/issue/common/issue'; -import { BrowserWindow, ipcMain } from 'electron'; +import { BrowserWindow, ipcMain, screen } from 'electron'; import { ILaunchService } from 'vs/code/electron-main/launch'; -import { buildDiagnostics, DiagnosticInfo } from 'vs/code/electron-main/diagnostics'; +import { getPerformanceInfo, PerformanceInfo, getSystemInfo, SystemInfo } from 'vs/code/electron-main/diagnostics'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { isMacintosh } from 'vs/base/common/platform'; const DEFAULT_BACKGROUND_COLOR = '#1E1E1E'; export class IssueService implements IIssueService { _serviceBrand: any; _issueWindow: BrowserWindow; + _parentWindow: BrowserWindow; constructor( private machineId: string, @@ -28,21 +30,32 @@ export class IssueService implements IIssueService { ) { } openReporter(data: IssueReporterData): TPromise<void> { - ipcMain.on('issueInfoRequest', event => { - this.getStatusInfo().then(msg => { - event.sender.send('issueInfoResponse', msg); + ipcMain.on('issueSystemInfoRequest', event => { + this.getSystemInformation().then(msg => { + event.sender.send('issueSystemInfoResponse', msg); + }); + }); + + ipcMain.on('issuePerformanceInfoRequest', event => { + this.getPerformanceInfo().then(msg => { + event.sender.send('issuePerformanceInfoResponse', msg); }); }); ipcMain.on('workbenchCommand', (event, arg) => { - this._issueWindow.getParentWindow().webContents.send('vscode:runAction', { id: arg }); + this._parentWindow.webContents.send('vscode:runAction', { id: arg }); }); + this._parentWindow = BrowserWindow.getFocusedWindow(); + const position = this.getWindowPosition(); this._issueWindow = new BrowserWindow({ - width: 750, - height: 1100, + width: position.width, + height: position.height, + minWidth: 300, + minHeight: 200, + x: position.x, + y: position.y, title: localize('issueReporter', "Issue Reporter"), - parent: BrowserWindow.getFocusedWindow(), backgroundColor: data.styles.backgroundColor || DEFAULT_BACKGROUND_COLOR }); @@ -53,10 +66,88 @@ export class IssueService implements IIssueService { return TPromise.as(null); } - private getStatusInfo(): TPromise<DiagnosticInfo> { + private getWindowPosition() { + // We want the new window to open on the same display that the parent is in + let displayToUse: Electron.Display; + const displays = screen.getAllDisplays(); + + // Single Display + if (displays.length === 1) { + displayToUse = displays[0]; + } + + // Multi Display + else { + + // on mac there is 1 menu per window so we need to use the monitor where the cursor currently is + if (isMacintosh) { + const cursorPoint = screen.getCursorScreenPoint(); + displayToUse = screen.getDisplayNearestPoint(cursorPoint); + } + + // if we have a last active window, use that display for the new window + if (!displayToUse && this._parentWindow) { + displayToUse = screen.getDisplayMatching(this._parentWindow.getBounds()); + } + + // fallback to primary display or first display + if (!displayToUse) { + displayToUse = screen.getPrimaryDisplay() || displays[0]; + } + } + + let state = { + width: 800, + height: 900, + x: undefined, + y: undefined + }; + + const displayBounds = displayToUse.bounds; + state.x = displayBounds.x + (displayBounds.width / 2) - (state.width / 2); + state.y = displayBounds.y + (displayBounds.height / 2) - (state.height / 2); + + if (displayBounds.width > 0 && displayBounds.height > 0 /* Linux X11 sessions sometimes report wrong display bounds */) { + if (state.x < displayBounds.x) { + state.x = displayBounds.x; // prevent window from falling out of the screen to the left + } + + if (state.y < displayBounds.y) { + state.y = displayBounds.y; // prevent window from falling out of the screen to the top + } + + if (state.x > (displayBounds.x + displayBounds.width)) { + state.x = displayBounds.x; // prevent window from falling out of the screen to the right + } + + if (state.y > (displayBounds.y + displayBounds.height)) { + state.y = displayBounds.y; // prevent window from falling out of the screen to the bottom + } + + if (state.width > displayBounds.width) { + state.width = displayBounds.width; // prevent window from exceeding display bounds width + } + + if (state.height > displayBounds.height) { + state.height = displayBounds.height; // prevent window from exceeding display bounds height + } + } + + return state; + } + + private getSystemInformation(): TPromise<SystemInfo> { return new Promise((resolve, reject) => { this.launchService.getMainProcessInfo().then(info => { - buildDiagnostics(info) + resolve(getSystemInfo(info)); + }); + }); + } + + private getPerformanceInfo(): TPromise<PerformanceInfo> { + return new Promise((resolve, reject) => { + this.launchService.getMainProcessInfo().then(info => { + getPerformanceInfo(info) .then(diagnosticInfo => { resolve(diagnosticInfo); }) diff --git a/src/vs/platform/lifecycle/common/lifecycle.ts b/src/vs/platform/lifecycle/common/lifecycle.ts index 16ebf78d47f..09077244009 100644 --- a/src/vs/platform/lifecycle/common/lifecycle.ts +++ b/src/vs/platform/lifecycle/common/lifecycle.ts @@ -19,9 +19,16 @@ export const ILifecycleService = createDecorator<ILifecycleService>('lifecycleSe * a boolean directly. Returning a promise has quite an impact on the shutdown sequence! */ export interface ShutdownEvent { + + /** + * Allows to veto the shutdown. The veto can be a long running operation. + */ veto(value: boolean | TPromise<boolean>): void; + + /** + * The reason why Code is shutting down. + */ reason: ShutdownReason; - payload?: object; } export enum ShutdownReason { diff --git a/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts b/src/vs/platform/lifecycle/electron-browser/lifecycleService.ts similarity index 77% rename from src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts rename to src/vs/platform/lifecycle/electron-browser/lifecycleService.ts index 30dfa303f36..26d27676441 100644 --- a/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts +++ b/src/vs/platform/lifecycle/electron-browser/lifecycleService.ts @@ -15,6 +15,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import { IWindowService } from 'vs/platform/windows/common/windows'; import { mark } from 'vs/base/common/performance'; import { Barrier } from 'vs/base/common/async'; +import { ILogService } from 'vs/platform/log/common/log'; export class LifecycleService implements ILifecycleService { @@ -32,10 +33,9 @@ export class LifecycleService implements ILifecycleService { constructor( @IMessageService private _messageService: IMessageService, @IWindowService private _windowService: IWindowService, - @IStorageService private _storageService: IStorageService + @IStorageService private _storageService: IStorageService, + @ILogService private _logService: ILogService ) { - this._registerListeners(); - const lastShutdownReason = this._storageService.getInteger(LifecycleService._lastShutdownReasonKey, StorageScope.WORKSPACE); this._storageService.remove(LifecycleService._lastShutdownReasonKey, StorageScope.WORKSPACE); if (lastShutdownReason === ShutdownReason.RELOAD) { @@ -45,6 +45,55 @@ export class LifecycleService implements ILifecycleService { } else { this._startupKind = StartupKind.NewWindow; } + + this._logService.trace(`lifecycle: starting up (startup kind: ${this._startupKind})`); + + this._registerListeners(); + } + + private _registerListeners(): void { + const windowId = this._windowService.getCurrentWindowId(); + + // Main side indicates that window is about to unload, check for vetos + ipc.on('vscode:onBeforeUnload', (event, reply: { okChannel: string, cancelChannel: string, reason: ShutdownReason }) => { + this._logService.trace(`lifecycle: onBeforeUnload (reason: ${reply.reason})`); + + // store shutdown reason to retrieve next startup + 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._logService.trace('lifecycle: onBeforeUnload prevented via veto'); + this._storageService.remove(LifecycleService._lastShutdownReasonKey, StorageScope.WORKSPACE); + ipc.send(reply.cancelChannel, windowId); + } else { + this._logService.trace('lifecycle: onBeforeUnload continues without veto'); + ipc.send(reply.okChannel, windowId); + } + }); + }); + + // Main side indicates that we will indeed shutdown + ipc.on('vscode:onWillUnload', (event, reply: { replyChannel: string, reason: ShutdownReason }) => { + this._logService.trace(`lifecycle: onWillUnload (reason: ${reply.reason})`); + + this._onShutdown.fire(reply.reason); + ipc.send(reply.replyChannel, windowId); + }); + } + + private onBeforeUnload(reason: ShutdownReason): TPromise<boolean> { + const vetos: (boolean | TPromise<boolean>)[] = []; + + this._onWillShutdown.fire({ + veto(value) { + vetos.push(value); + }, + reason + }); + + return handleVetos(vetos, err => this._messageService.show(Severity.Error, toErrorMessage(err))); } public get phase(): LifecyclePhase { @@ -55,10 +104,13 @@ export class LifecycleService implements ILifecycleService { if (value < this.phase) { throw new Error('Lifecycle cannot go backwards'); } + if (this._phase === value) { return; } + this._logService.trace(`lifecycle: phase changed (value: ${value})`); + this._phase = value; mark(`LifecyclePhase/${LifecyclePhase[value]}`); @@ -72,11 +124,13 @@ export class LifecycleService implements ILifecycleService { if (phase <= this._phase) { return Promise.resolve(); } + let barrier = this._phaseWhen.get(phase); if (!barrier) { barrier = new Barrier(); this._phaseWhen.set(phase, barrier); } + return barrier.wait(); } @@ -91,38 +145,4 @@ export class LifecycleService implements ILifecycleService { public get onShutdown(): Event<ShutdownReason> { return this._onShutdown.event; } - - private _registerListeners(): void { - const windowId = this._windowService.getCurrentWindowId(); - - // Main side indicates that window is about to unload, check for vetos - ipc.on('vscode:beforeUnload', (event, reply: { okChannel: string, cancelChannel: string, reason: ShutdownReason, payload: object }) => { - this._storageService.store(LifecycleService._lastShutdownReasonKey, JSON.stringify(reply.reason), StorageScope.WORKSPACE); - - // trigger onWillShutdown events and veto collecting - this.onBeforeUnload(reply.reason, reply.payload).done(veto => { - if (veto) { - this._storageService.remove(LifecycleService._lastShutdownReasonKey, StorageScope.WORKSPACE); - ipc.send(reply.cancelChannel, windowId); - } else { - this._onShutdown.fire(reply.reason); - ipc.send(reply.okChannel, windowId); - } - }); - }); - } - - private onBeforeUnload(reason: ShutdownReason, payload?: object): TPromise<boolean> { - const vetos: (boolean | TPromise<boolean>)[] = []; - - this._onWillShutdown.fire({ - veto(value) { - vetos.push(value); - }, - reason, - payload - }); - - return handleVetos(vetos, err => this._messageService.show(Severity.Error, toErrorMessage(err))); - } } diff --git a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts index d77c65cd1b6..81b62cf1206 100644 --- a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts +++ b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts @@ -60,7 +60,7 @@ export interface ILifecycleService { ready(): void; registerWindow(window: ICodeWindow): void; - unload(window: ICodeWindow, reason: UnloadReason, payload?: object): TPromise<boolean /* veto */>; + unload(window: ICodeWindow, reason: UnloadReason): TPromise<boolean /* veto */>; relaunch(options?: { addArgs?: string[], removeArgs?: string[] }): void; @@ -123,7 +123,7 @@ export class LifecycleService implements ILifecycleService { private registerListeners(): void { // before-quit - app.on('before-quit', (e) => { + app.on('before-quit', e => { this.logService.trace('Lifecycle#before-quit'); if (!this.quitRequested) { @@ -176,7 +176,7 @@ export class LifecycleService implements ILifecycleService { }); } - public unload(window: ICodeWindow, reason: UnloadReason, payload?: object): TPromise<boolean /* veto */> { + public unload(window: ICodeWindow, reason: UnloadReason): TPromise<boolean /* veto */> { // Always allow to unload a window that is not yet ready if (window.readyState !== ReadyState.READY) { @@ -188,13 +188,26 @@ export class LifecycleService implements ILifecycleService { const windowUnloadReason = this.quitRequested ? UnloadReason.QUIT : reason; // first ask the window itself if it vetos the unload - return this.doUnloadWindowInRenderer(window, windowUnloadReason, payload).then(veto => { + return this.onBeforeUnloadWindowInRenderer(window, windowUnloadReason).then(veto => { if (veto) { + this.logService.trace('Lifecycle#unload(): veto in renderer', window.id); + return this.handleVeto(veto); } // then check for vetos in the main side - return this.doUnloadWindowInMain(window, windowUnloadReason).then(veto => this.handleVeto(veto)); + return this.onBeforeUnloadWindowInMain(window, windowUnloadReason).then(veto => { + if (veto) { + this.logService.trace('Lifecycle#unload(): veto in main', window.id); + + return this.handleVeto(veto); + } else { + this.logService.trace('Lifecycle#unload(): unload continues without veto', window.id); + } + + // finally if there are no vetos, unload the renderer + return this.onWillUnloadWindowInRenderer(window, windowUnloadReason).then(() => false); + }); }); } @@ -210,8 +223,8 @@ export class LifecycleService implements ILifecycleService { return veto; } - private doUnloadWindowInRenderer(window: ICodeWindow, reason: UnloadReason, payload?: object): TPromise<boolean /* veto */> { - return new TPromise<boolean>((c) => { + private onBeforeUnloadWindowInRenderer(window: ICodeWindow, reason: UnloadReason): TPromise<boolean /* veto */> { + return new TPromise<boolean>(c => { const oneTimeEventToken = this.oneTimeListenerTokenGenerator++; const okChannel = `vscode:ok${oneTimeEventToken}`; const cancelChannel = `vscode:cancel${oneTimeEventToken}`; @@ -224,11 +237,11 @@ export class LifecycleService implements ILifecycleService { c(true); // veto }); - window.send('vscode:beforeUnload', { okChannel, cancelChannel, reason, payload }); + window.send('vscode:onBeforeUnload', { okChannel, cancelChannel, reason }); }); } - private doUnloadWindowInMain(window: ICodeWindow, reason: UnloadReason): TPromise<boolean /* veto */> { + private onBeforeUnloadWindowInMain(window: ICodeWindow, reason: UnloadReason): TPromise<boolean /* veto */> { const vetos: (boolean | TPromise<boolean>)[] = []; this._onBeforeWindowUnload.fire({ @@ -242,6 +255,17 @@ export class LifecycleService implements ILifecycleService { return handleVetos(vetos, err => this.logService.error(err)); } + private onWillUnloadWindowInRenderer(window: ICodeWindow, reason: UnloadReason): TPromise<void> { + return new TPromise<void>(c => { + const oneTimeEventToken = this.oneTimeListenerTokenGenerator++; + const replyChannel = `vscode:reply${oneTimeEventToken}`; + + ipc.once(replyChannel, () => c(void 0)); + + window.send('vscode:onWillUnload', { replyChannel, reason }); + }); + } + /** * A promise that completes to indicate if the quit request has been veto'd * by the user or not. @@ -275,10 +299,14 @@ export class LifecycleService implements ILifecycleService { } public kill(code?: number): void { + this.logService.trace('Lifecycle#kill()'); + app.exit(code); } public relaunch(options?: { addArgs?: string[], removeArgs?: string[] }): void { + this.logService.trace('Lifecycle#relaunch()'); + const args = process.argv.slice(1); if (options && options.addArgs) { args.push(...options.addArgs); diff --git a/src/vs/platform/list/browser/listService.ts b/src/vs/platform/list/browser/listService.ts index e003a1378af..9fa1ab9b76b 100644 --- a/src/vs/platform/list/browser/listService.ts +++ b/src/vs/platform/list/browser/listService.ts @@ -125,15 +125,18 @@ class MultipleSelectionController<T> implements IMultipleSelectionController<T> } } -class OpenController implements IOpenController { +class WorkbenchOpenController implements IOpenController { constructor(private configurationService: IConfigurationService) { } shouldOpen(event: UIEvent): boolean { if (event instanceof MouseEvent) { const isDoubleClick = event.detail === 2; + if (!useSingleClickToOpen(this.configurationService) && !isDoubleClick) { + return false; + } - return useSingleClickToOpen(this.configurationService) || isDoubleClick; + return event.button === 0 /* left mouse button */ || event.button === 1 /* middle mouse button */; } return true; @@ -145,14 +148,14 @@ function handleListControllers<T>(options: IListOptions<T>, configurationService options.multipleSelectionController = new MultipleSelectionController(configurationService); } - options.openController = new OpenController(configurationService); + options.openController = new WorkbenchOpenController(configurationService); return options; } function handleTreeController(configuration: ITreeConfiguration, instantiationService: IInstantiationService): ITreeConfiguration { if (!configuration.controller) { - configuration.controller = instantiationService.createInstance(WorkbenchTreeController, { clickBehavior: ClickBehavior.ON_MOUSE_UP }); + configuration.controller = instantiationService.createInstance(WorkbenchTreeController, {}); } return configuration; @@ -176,7 +179,7 @@ export class WorkbenchList<T> extends List<T> { @IThemeService themeService: IThemeService, @IConfigurationService private configurationService: IConfigurationService ) { - super(container, delegate, renderers, mixin(handleListControllers(options, configurationService), { keyboardSupport: false } as IListOptions<any>, false)); + super(container, delegate, renderers, mixin(handleListControllers(options, configurationService), { keyboardSupport: false, selectOnMouseDown: true } as IListOptions<any>, false)); this.contextKeyService = createScopedContextKeyService(contextKeyService, this); this.listDoubleSelection = WorkbenchListDoubleSelection.bindTo(this.contextKeyService); @@ -224,7 +227,7 @@ export class WorkbenchPagedList<T> extends PagedList<T> { @IThemeService themeService: IThemeService, @IConfigurationService private configurationService: IConfigurationService ) { - super(container, delegate, renderers, mixin(handleListControllers(options, configurationService), { keyboardSupport: false } as IListOptions<any>, false)); + super(container, delegate, renderers, mixin(handleListControllers(options, configurationService), { keyboardSupport: false, selectOnMouseDown: true } as IListOptions<any>, false)); this.contextKeyService = createScopedContextKeyService(contextKeyService, this); @@ -324,6 +327,18 @@ export class WorkbenchTree extends Tree { } } +function massageControllerOptions(options: IControllerOptions): IControllerOptions { + if (typeof options.keyboardSupport !== 'boolean') { + options.keyboardSupport = false; + } + + if (typeof options.clickBehavior !== 'number') { + options.clickBehavior = ClickBehavior.ON_MOUSE_DOWN; + } + + return options; +} + export class WorkbenchTreeController extends DefaultController { protected disposables: IDisposable[] = []; @@ -332,7 +347,7 @@ export class WorkbenchTreeController extends DefaultController { options: IControllerOptions, @IConfigurationService private configurationService: IConfigurationService ) { - super(options); + super(massageControllerOptions(options)); // if the open mode is not set, we configure it based on settings if (isUndefinedOrNull(options.openMode)) { diff --git a/src/vs/platform/localizations/common/localizations.ts b/src/vs/platform/localizations/common/localizations.ts index bf11d96da2e..4fc29861e0d 100644 --- a/src/vs/platform/localizations/common/localizations.ts +++ b/src/vs/platform/localizations/common/localizations.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { localize } from 'vs/nls'; -import { ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { TPromise } from 'vs/base/common/winjs.base'; +import Event from 'vs/base/common/event'; export interface ILocalization { languageId: string; @@ -23,6 +23,9 @@ export interface ITranslation { export const ILocalizationsService = createDecorator<ILocalizationsService>('localizationsService'); export interface ILocalizationsService { _serviceBrand: any; + + readonly onDidLanguagesChange: Event<void>; + getLanguageIds(): TPromise<string[]>; } export function isValidLocalization(localization: ILocalization): boolean { @@ -47,46 +50,4 @@ export function isValidLocalization(localization: ILocalization): boolean { return false; } return true; -} - -ExtensionsRegistry.registerExtensionPoint('localizations', [], { - description: localize('vscode.extension.contributes.localizations', "Contributes localizations to the editor"), - type: 'array', - items: { - type: 'object', - properties: { - languageId: { - description: localize('vscode.extension.contributes.localizations.languageId', 'Id of the language into which the display strings are translated.'), - type: 'string' - }, - languageName: { - description: localize('vscode.extension.contributes.localizations.languageName', 'Name of the language in English.'), - type: 'string' - }, - languageNameLocalized: { - description: localize('vscode.extension.contributes.localizations.languageNameLocalized', 'Name of the language in contributed language.'), - type: 'string' - }, - translations: { - description: localize('vscode.extension.contributes.localizations.translations', 'List of translations associated to the language.'), - type: 'array', - default: [], - items: { - type: 'object', - properties: { - id: { - type: 'string', - description: localize('vscode.extension.contributes.localizations.translations.id', "Id of VS Code or Extension for which this translation is contributed to. Id of VS Code is always `vscode` and of extension should be in format `publisherId.extensionName`."), - pattern: '^((vscode)|([a-z0-9A-Z][a-z0-9\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\-A-Z]*))$', - patternErrorMessage: localize('vscode.extension.contributes.localizations.translations.id.pattern', "Id should be `vscode` or in format `publisherId.extensionName` for translating VS code or an extension respectively.") - }, - path: { - type: 'string', - description: localize('vscode.extension.contributes.localizations.translations.path', "A relative path to a file containing translations for the language.") - } - } - } - } - } - } -}); \ No newline at end of file +} \ No newline at end of file diff --git a/src/vs/platform/localizations/common/localizationsIpc.ts b/src/vs/platform/localizations/common/localizationsIpc.ts new file mode 100644 index 00000000000..0ad01d0baa5 --- /dev/null +++ b/src/vs/platform/localizations/common/localizationsIpc.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. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import { IChannel, eventToCall, eventFromCall } from 'vs/base/parts/ipc/common/ipc'; +import Event, { buffer } from 'vs/base/common/event'; +import { ILocalizationsService } from 'vs/platform/localizations/common/localizations'; + +export interface ILocalizationsChannel extends IChannel { + call(command: 'event:onDidLanguagesChange'): TPromise<void>; + call(command: 'getLanguageIds'): TPromise<string[]>; + call(command: string, arg?: any): TPromise<any>; +} + +export class LocalizationsChannel implements ILocalizationsChannel { + + onDidLanguagesChange: Event<void>; + + constructor(private service: ILocalizationsService) { + this.onDidLanguagesChange = buffer(service.onDidLanguagesChange, true); + } + + call(command: string, arg?: any): TPromise<any> { + switch (command) { + case 'event:onDidLanguagesChange': return eventToCall(this.onDidLanguagesChange); + case 'getLanguageIds': return this.service.getLanguageIds(); + } + return undefined; + } +} + +export class LocalizationsChannelClient implements ILocalizationsService { + + _serviceBrand: any; + + constructor(private channel: ILocalizationsChannel) { } + + private _onDidLanguagesChange = eventFromCall<void>(this.channel, 'event:onDidLanguagesChange'); + get onDidLanguagesChange(): Event<void> { return this._onDidLanguagesChange; } + + getLanguageIds(): TPromise<string[]> { + return this.channel.call('getLanguageIds'); + } +} \ No newline at end of file diff --git a/src/vs/platform/localizations/node/localizations.ts b/src/vs/platform/localizations/node/localizations.ts index 0e8fb3a98e4..8b41df4be45 100644 --- a/src/vs/platform/localizations/node/localizations.ts +++ b/src/vs/platform/localizations/node/localizations.ts @@ -11,9 +11,12 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { join } from 'vs/base/common/paths'; import { TPromise } from 'vs/base/common/winjs.base'; import { Limiter } from 'vs/base/common/async'; -import { areSameExtensions, getGalleryExtensionIdFromLocal } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { areSameExtensions, getGalleryExtensionIdFromLocal, getIdFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ILogService } from 'vs/platform/log/common/log'; -import { isValidLocalization } from 'vs/platform/localizations/common/localizations'; +import { isValidLocalization, ILocalizationsService } from 'vs/platform/localizations/common/localizations'; +import product from 'vs/platform/node/product'; +import { distinct, equals } from 'vs/base/common/arrays'; +import Event, { Emitter } from 'vs/base/common/event'; interface ILanguagePack { hash: string; @@ -24,10 +27,19 @@ interface ILanguagePack { translations: { [id: string]: string }; } -export class LanguagePacksCache extends Disposable { +const systemLanguages: string[] = ['de', 'en', 'en-US', 'es', 'fr', 'it', 'ja', 'ko', 'ru', 'zh-CN', 'zh-TW']; +if (product.quality !== 'stable') { + systemLanguages.push('hu'); +} - private languagePacksFilePath: string; - private languagePacksFileLimiter: Limiter<void>; +export class LocalizationsService extends Disposable implements ILocalizationsService { + + _serviceBrand: any; + + private readonly cache: LanguagePacksCache; + + private readonly _onDidLanguagesChange: Emitter<void> = this._register(new Emitter<void>()); + readonly onDidLanguagesChange: Event<void> = this._onDidLanguagesChange.event; constructor( @IExtensionManagementService private extensionManagementService: IExtensionManagementService, @@ -35,37 +47,80 @@ export class LanguagePacksCache extends Disposable { @ILogService private logService: ILogService ) { super(); - this.languagePacksFilePath = join(environmentService.userDataPath, 'languagepacks.json'); - this.languagePacksFileLimiter = new Limiter(1); + this.cache = this._register(new LanguagePacksCache(environmentService, logService)); this._register(extensionManagementService.onDidInstallExtension(({ local }) => this.onDidInstallExtension(local))); this._register(extensionManagementService.onDidUninstallExtension(({ identifier }) => this.onDidUninstallExtension(identifier))); - this.reset(); + this.extensionManagementService.getInstalled().then(installed => this.cache.update(installed)); + } + + getLanguageIds(): TPromise<string[]> { + return this.cache.getLanguagePacks() + .then(languagePacks => { + const languages = [...systemLanguages, ...Object.keys(languagePacks)]; + return TPromise.as(distinct(languages)); + }); } private onDidInstallExtension(extension: ILocalExtension): void { if (extension && extension.manifest && extension.manifest.contributes && extension.manifest.contributes.localizations && extension.manifest.contributes.localizations.length) { this.logService.debug('Adding language packs from the extension', extension.identifier.id); - this.reset(); + this.update(); } } private onDidUninstallExtension(identifier: IExtensionIdentifier): void { - if (this.withLanguagePacks(languagePacks => Object.keys(languagePacks).some(language => languagePacks[language] && languagePacks[language].extensions.some(e => areSameExtensions(e.extensionIdentifier, identifier))))) { - this.logService.debug('Removing language packs from the extension', identifier.id); - this.reset(); - } + this.cache.getLanguagePacks() + .then(languagePacks => { + identifier = { id: getIdFromLocalExtensionId(identifier.id), uuid: identifier.uuid }; + if (Object.keys(languagePacks).some(language => languagePacks[language] && languagePacks[language].extensions.some(e => areSameExtensions(e.extensionIdentifier, identifier)))) { + this.logService.debug('Removing language packs from the extension', identifier.id); + this.update(); + } + }); } - private reset(): void { - this.extensionManagementService.getInstalled() - .then(installed => { - this.withLanguagePacks(languagePacks => { - Object.keys(languagePacks).forEach(language => languagePacks[language] = undefined); - this.createLanguagePacksFromExtensions(languagePacks, ...installed); - }); - }); + private update(): void { + TPromise.join([this.cache.getLanguagePacks(), this.extensionManagementService.getInstalled()]) + .then(([current, installed]) => this.cache.update(installed) + .then(updated => { + if (!equals(Object.keys(current), Object.keys(updated))) { + this._onDidLanguagesChange.fire(); + } + })); + } +} + +class LanguagePacksCache extends Disposable { + + private languagePacks: { [language: string]: ILanguagePack } = {}; + private languagePacksFilePath: string; + private languagePacksFileLimiter: Limiter<void>; + + constructor( + @IEnvironmentService environmentService: IEnvironmentService, + @ILogService private logService: ILogService + ) { + super(); + this.languagePacksFilePath = join(environmentService.userDataPath, 'languagepacks.json'); + this.languagePacksFileLimiter = new Limiter(1); + } + + getLanguagePacks(): TPromise<{ [language: string]: ILanguagePack }> { + // if queue is not empty, fetch from disk + if (this.languagePacksFileLimiter.size) { + return this.withLanguagePacks() + .then(() => this.languagePacks); + } + return TPromise.as(this.languagePacks); + } + + update(extensions: ILocalExtension[]): TPromise<{ [language: string]: ILanguagePack }> { + return this.withLanguagePacks(languagePacks => { + Object.keys(languagePacks).forEach(language => languagePacks[language] = undefined); + this.createLanguagePacksFromExtensions(languagePacks, ...extensions); + }).then(() => this.languagePacks); } private createLanguagePacksFromExtensions(languagePacks: { [language: string]: ILanguagePack }, ...extensions: ILocalExtension[]): void { @@ -109,7 +164,7 @@ export class LanguagePacksCache extends Disposable { } } - private withLanguagePacks<T>(fn: (languagePacks: { [language: string]: ILanguagePack }) => T): TPromise<T> { + private withLanguagePacks<T>(fn: (languagePacks: { [language: string]: ILanguagePack }) => T = () => null): TPromise<T> { return this.languagePacksFileLimiter.queue(() => { let result: T = null; return pfs.readFile(this.languagePacksFilePath, 'utf8') @@ -122,7 +177,8 @@ export class LanguagePacksCache extends Disposable { delete languagePacks[language]; } } - const raw = JSON.stringify(languagePacks); + this.languagePacks = languagePacks; + const raw = JSON.stringify(this.languagePacks); this.logService.debug('Writing language packs', raw); return pfs.writeFile(this.languagePacksFilePath, raw); }) diff --git a/src/vs/platform/markers/common/problemMatcher.ts b/src/vs/platform/markers/common/problemMatcher.ts index e6dd0d5bdbe..f8cf9676788 100644 --- a/src/vs/platform/markers/common/problemMatcher.ts +++ b/src/vs/platform/markers/common/problemMatcher.ts @@ -42,9 +42,30 @@ export module FileLocationKind { } } + +export enum ProblemLocationKind { + File, + Location +} + +export module ProblemLocationKind { + export function fromString(value: string): ProblemLocationKind { + value = value.toLowerCase(); + if (value === 'file') { + return ProblemLocationKind.File; + } else if (value === 'location') { + return ProblemLocationKind.Location; + } else { + return undefined; + } + } +} + export interface ProblemPattern { regexp: RegExp; + kind?: ProblemLocationKind; + file?: number; message?: number; @@ -138,6 +159,7 @@ interface Location { } interface ProblemData { + kind?: ProblemLocationKind; file?: string; location?: string; line?: string; @@ -357,6 +379,9 @@ class SingleLineMatcher extends AbstractLineMatcher { public handle(lines: string[], start: number = 0): HandleResult { Assert.ok(lines.length - start === 1); let data: ProblemData = Object.create(null); + if (this.pattern.kind) { + data.kind = this.pattern.kind; + } let matches = this.pattern.regexp.exec(lines[start]); if (matches) { this.fillProblemData(data, this.pattern, matches); @@ -391,6 +416,7 @@ class MultiLineMatcher extends AbstractLineMatcher { Assert.ok(lines.length - start === this.patterns.length); this.data = Object.create(null); let data = this.data; + data.kind = this.patterns[0].kind; for (let i = 0; i < this.patterns.length; i++) { let pattern = this.patterns[i]; let matches = pattern.regexp.exec(lines[i + start]); @@ -435,6 +461,14 @@ export namespace Config { */ regexp?: string; + /** + * Whether the pattern matches a whole file, or a location (file/line) + * + * The default is to match for a location. Only valid on the + * first problem pattern in a multi line problem matcher. + */ + kind?: string; + /** * The match group index of the filename. * If omitted 1 is used. @@ -700,7 +734,7 @@ export namespace Config { } } -class ProblemPatternParser extends Parser { +export class ProblemPatternParser extends Parser { constructor(logger: IProblemReporter) { super(logger); @@ -728,6 +762,9 @@ class ProblemPatternParser extends Parser { private createSingleProblemPattern(value: Config.ProblemPattern): ProblemPattern { let result = this.doCreateSingleProblemPattern(value, true); + if (result.kind === undefined) { + result.kind = ProblemLocationKind.Location; + } return this.validateProblemPattern([result]) ? result : null; } @@ -752,13 +789,19 @@ class ProblemPatternParser extends Parser { } result.push(pattern); } + if (result[0].kind === undefined) { + result[0].kind = ProblemLocationKind.Location; + } return this.validateProblemPattern(result) ? result : null; } private doCreateSingleProblemPattern(value: Config.ProblemPattern, setDefaults: boolean): ProblemPattern { let result: ProblemPattern = { - regexp: this.createRegularExpression(value.regexp) + regexp: this.createRegularExpression(value.regexp), }; + if (value.kind) { + result.kind = ProblemLocationKind.fromString(value.kind); + } function copyProperty(result: ProblemPattern, source: Config.ProblemPattern, resultKey: keyof ProblemPattern, sourceKey: keyof Config.ProblemPattern) { let value = source[sourceKey]; @@ -779,7 +822,7 @@ class ProblemPatternParser extends Parser { result.loop = value.loop; } if (setDefaults) { - if (result.location) { + if (result.location || result.kind === ProblemLocationKind.File) { let defaultValue: Partial<ProblemPattern> = { file: 1, message: 0 @@ -801,7 +844,12 @@ class ProblemPatternParser extends Parser { private validateProblemPattern(values: ProblemPattern[]): boolean { let file: boolean, message: boolean, location: boolean, line: boolean; let regexp: number = 0; - values.forEach(pattern => { + let locationKind = (values[0].kind === undefined) ? ProblemLocationKind.Location : values[0].kind; + + values.forEach((pattern, i) => { + if (i !== 0 && pattern.kind) { + this.error(localize('ProblemPatternParser.problemPattern.kindProperty.notFirst', 'The problem pattern is invalid. The kind property must be provided only in the first element')); + } file = file || !Types.isUndefined(pattern.file); message = message || !Types.isUndefined(pattern.message); location = location || !Types.isUndefined(pattern.location); @@ -814,8 +862,12 @@ class ProblemPatternParser extends Parser { this.error(localize('ProblemPatternParser.problemPattern.missingRegExp', 'The problem pattern is missing a regular expression.')); return false; } - if (!(file && message && (location || line))) { - this.error(localize('ProblemPatternParser.problemPattern.missingProperty', 'The problem pattern is invalid. It must have at least a file, message and line or location match group.')); + if (!(file && message)) { + this.error(localize('ProblemPatternParser.problemPattern.missingProperty', 'The problem pattern is invalid. It must have at least have a file and a message.')); + return false; + } + if (locationKind === ProblemLocationKind.Location && !(location || line)) { + this.error(localize('ProblemPatternParser.problemPattern.missingLocation', 'The problem pattern is invalid. It must either have kind: "file" or have a line or location match group.')); return false; } return true; @@ -880,6 +932,10 @@ export namespace Schemas { type: 'string', description: localize('ProblemPatternSchema.regexp', 'The regular expression to find an error, warning or info in the output.') }, + kind: { + type: 'string', + description: localize('ProblemPatternSchema.kind', 'whether the pattern matches a location (file and line) or only a file.') + }, file: { type: 'integer', description: localize('ProblemPatternSchema.file', 'The match group index of the filename. If omitted 1 is used.') @@ -931,7 +987,7 @@ export namespace Schemas { }; - export const MultLileProblemPattern: IJSONSchema = { + export const MultiLineProblemPattern: IJSONSchema = { type: 'array', items: ProblemPattern }; @@ -1030,6 +1086,7 @@ class ProblemPatternRegistryImpl implements IProblemPatternRegistry { private fillDefaults(): void { this.add('msCompile', { regexp: /^(?:\s+\d+\>)?([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\)\s*:\s+(error|warning|info)\s+(\w{1,2}\d+)\s*:\s*(.*)$/, + kind: ProblemLocationKind.Location, file: 1, location: 2, severity: 3, @@ -1038,6 +1095,7 @@ class ProblemPatternRegistryImpl implements IProblemPatternRegistry { }); this.add('gulp-tsc', { regexp: /^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(\d+)\s+(.*)$/, + kind: ProblemLocationKind.Location, file: 1, location: 2, code: 3, @@ -1045,6 +1103,7 @@ class ProblemPatternRegistryImpl implements IProblemPatternRegistry { }); this.add('cpp', { regexp: /^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(C\d+)\s*:\s*(.*)$/, + kind: ProblemLocationKind.Location, file: 1, location: 2, severity: 3, @@ -1053,6 +1112,7 @@ class ProblemPatternRegistryImpl implements IProblemPatternRegistry { }); this.add('csc', { regexp: /^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(CS\d+)\s*:\s*(.*)$/, + kind: ProblemLocationKind.Location, file: 1, location: 2, severity: 3, @@ -1061,6 +1121,7 @@ class ProblemPatternRegistryImpl implements IProblemPatternRegistry { }); this.add('vb', { regexp: /^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(BC\d+)\s*:\s*(.*)$/, + kind: ProblemLocationKind.Location, file: 1, location: 2, severity: 3, @@ -1069,12 +1130,14 @@ class ProblemPatternRegistryImpl implements IProblemPatternRegistry { }); this.add('lessCompile', { regexp: /^\s*(.*) in file (.*) line no. (\d+)$/, + kind: ProblemLocationKind.Location, message: 1, file: 2, line: 3 }); this.add('jshint', { regexp: /^(.*):\s+line\s+(\d+),\s+col\s+(\d+),\s(.+?)(?:\s+\((\w)(\d+)\))?$/, + kind: ProblemLocationKind.Location, file: 1, line: 2, character: 3, @@ -1085,6 +1148,7 @@ class ProblemPatternRegistryImpl implements IProblemPatternRegistry { this.add('jshint-stylish', [ { regexp: /^(.+)$/, + kind: ProblemLocationKind.Location, file: 1 }, { @@ -1100,6 +1164,7 @@ class ProblemPatternRegistryImpl implements IProblemPatternRegistry { this.add('eslint-compact', { regexp: /^(.+):\sline\s(\d+),\scol\s(\d+),\s(Error|Warning|Info)\s-\s(.+)\s\((.+)\)$/, file: 1, + kind: ProblemLocationKind.Location, line: 2, character: 3, severity: 4, @@ -1109,6 +1174,7 @@ class ProblemPatternRegistryImpl implements IProblemPatternRegistry { this.add('eslint-stylish', [ { regexp: /^([^\s].*)$/, + kind: ProblemLocationKind.Location, file: 1 }, { @@ -1123,6 +1189,7 @@ class ProblemPatternRegistryImpl implements IProblemPatternRegistry { ]); this.add('go', { regexp: /^([^:]*: )?((.:)?[^:]*):(\d+)(:(\d+))?: (.*)$/, + kind: ProblemLocationKind.Location, file: 2, line: 4, character: 6, @@ -1373,7 +1440,7 @@ export namespace Schemas { description: localize('PatternTypeSchema.name', 'The name of a contributed or predefined pattern') }, Schemas.ProblemPattern, - Schemas.MultLileProblemPattern + Schemas.MultiLineProblemPattern ], description: localize('PatternTypeSchema.description', 'A problem pattern or the name of a contributed or predefined problem pattern. Can be omitted if base is specified.') }; diff --git a/src/vs/platform/markers/test/common/problemMatcher.test.ts b/src/vs/platform/markers/test/common/problemMatcher.test.ts new file mode 100644 index 00000000000..8e30abf0886 --- /dev/null +++ b/src/vs/platform/markers/test/common/problemMatcher.test.ts @@ -0,0 +1,260 @@ +/*--------------------------------------------------------------------------------------------- + * 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 matchers from 'vs/platform/markers/common/problemMatcher'; + +import assert = require('assert'); +import { ValidationState, IProblemReporter, ValidationStatus } from 'vs/base/common/parsers'; + +class ProblemReporter implements IProblemReporter { + private _validationStatus: ValidationStatus; + private _messages: string[]; + + constructor() { + this._validationStatus = new ValidationStatus(); + this._messages = []; + } + + public info(message: string): void { + this._messages.push(message); + this._validationStatus.state = ValidationState.Info; + } + + public warn(message: string): void { + this._messages.push(message); + this._validationStatus.state = ValidationState.Warning; + } + + public error(message: string): void { + this._messages.push(message); + this._validationStatus.state = ValidationState.Error; + } + + public fatal(message: string): void { + this._messages.push(message); + this._validationStatus.state = ValidationState.Fatal; + } + + public hasMessage(message: string): boolean { + return this._messages.indexOf(message) !== null; + } + public get messages(): string[] { + return this._messages; + } + public get state(): ValidationState { + return this._validationStatus.state; + } + + public isOK(): boolean { + return this._validationStatus.isOK(); + } + + public get status(): ValidationStatus { + return this._validationStatus; + } +} + +suite('ProblemPatternParser', () => { + let reporter: ProblemReporter; + let parser: matchers.ProblemPatternParser; + const testRegexp = new RegExp('test'); + + setup(() => { + reporter = new ProblemReporter(); + parser = new matchers.ProblemPatternParser(reporter); + }); + + suite('single-pattern definitions', () => { + test('parses a pattern defined by only a regexp', () => { + let problemPattern: matchers.Config.ProblemPattern = { + regexp: 'test' + }; + let parsed = parser.parse(problemPattern); + assert(reporter.isOK()); + assert.deepEqual(parsed, { + regexp: testRegexp, + kind: matchers.ProblemLocationKind.Location, + file: 1, + line: 2, + character: 3, + message: 0 + }); + }); + test('does not sets defaults for line and character if kind is File', () => { + let problemPattern: matchers.Config.ProblemPattern = { + regexp: 'test', + kind: 'file' + }; + let parsed = parser.parse(problemPattern); + assert.deepEqual(parsed, { + regexp: testRegexp, + kind: matchers.ProblemLocationKind.File, + file: 1, + message: 0 + }); + }); + }); + + suite('multi-pattern definitions', () => { + test('defines a pattern based on regexp and property fields, with file/line location', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', file: 3, line: 4, column: 5, message: 6 } + ]; + let parsed = parser.parse(problemPattern); + assert(reporter.isOK()); + assert.deepEqual(parsed, + [{ + regexp: testRegexp, + kind: matchers.ProblemLocationKind.Location, + file: 3, + line: 4, + character: 5, + message: 6 + }] + ); + }); + test('defines a pattern bsaed on regexp and property fields, with location', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', file: 3, location: 4, message: 6 } + ]; + let parsed = parser.parse(problemPattern); + assert(reporter.isOK()); + assert.deepEqual(parsed, + [{ + regexp: testRegexp, + kind: matchers.ProblemLocationKind.Location, + file: 3, + location: 4, + message: 6 + }] + ); + }); + test('accepts a pattern that provides the fields from multiple entries', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', file: 3 }, + { regexp: 'test1', line: 4 }, + { regexp: 'test2', column: 5 }, + { regexp: 'test3', message: 6 } + ]; + let parsed = parser.parse(problemPattern); + assert(reporter.isOK()); + assert.deepEqual(parsed, [ + { regexp: testRegexp, kind: matchers.ProblemLocationKind.Location, file: 3 }, + { regexp: new RegExp('test1'), line: 4 }, + { regexp: new RegExp('test2'), character: 5 }, + { regexp: new RegExp('test3'), message: 6 } + ]); + }); + test('forbids setting the loop flag outside of the last element in the array', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', file: 3, loop: true }, + { regexp: 'test1', line: 4 } + ]; + let parsed = parser.parse(problemPattern); + assert.equal(null, parsed); + assert.equal(ValidationState.Error, reporter.state); + assert(reporter.hasMessage('The loop property is only supported on the last line matcher.')); + }); + test('forbids setting the kind outside of the first element of the array', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', file: 3 }, + { regexp: 'test1', kind: 'file', line: 4 } + ]; + let parsed = parser.parse(problemPattern); + assert.equal(null, parsed); + assert.equal(ValidationState.Error, reporter.state); + assert(reporter.hasMessage('The problem pattern is invalid. The kind property must be provided only in the first element')); + }); + + test('kind: Location requires a regexp', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { file: 0, line: 1, column: 20, message: 0 } + ]; + let parsed = parser.parse(problemPattern); + assert.equal(null, parsed); + assert.equal(ValidationState.Error, reporter.state); + assert(reporter.hasMessage('The problem pattern is missing a regular expression.')); + }); + test('kind: Location requires a regexp on every entry', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', file: 3 }, + { line: 4 }, + { regexp: 'test2', column: 5 }, + { regexp: 'test3', message: 6 } + ]; + let parsed = parser.parse(problemPattern); + assert.equal(null, parsed); + assert.equal(ValidationState.Error, reporter.state); + assert(reporter.hasMessage('The problem pattern is missing a regular expression.')); + }); + test('kind: Location requires a message', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', file: 0, line: 1, column: 20 } + ]; + let parsed = parser.parse(problemPattern); + assert.equal(null, parsed); + assert.equal(ValidationState.Error, reporter.state); + assert(reporter.hasMessage('The problem pattern is invalid. It must have at least have a file and a message.')); + }); + + test('kind: Location requires a file', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', line: 1, column: 20, message: 0 } + ]; + let parsed = parser.parse(problemPattern); + assert.equal(null, parsed); + assert.equal(ValidationState.Error, reporter.state); + assert(reporter.hasMessage('The problem pattern is invalid. It must either have kind: "file" or have a line or location match group.')); + }); + + test('kind: Location requires either a line or location', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', file: 1, column: 20, message: 0 } + ]; + let parsed = parser.parse(problemPattern); + assert.equal(null, parsed); + assert.equal(ValidationState.Error, reporter.state); + assert(reporter.hasMessage('The problem pattern is invalid. It must either have kind: "file" or have a line or location match group.')); + }); + + test('kind: File accepts a regexp, file and message', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', file: 2, kind: 'file', message: 6 } + ]; + let parsed = parser.parse(problemPattern); + console.log(reporter.messages); + assert(reporter.isOK()); + assert.deepEqual(parsed, + [{ + regexp: testRegexp, + kind: matchers.ProblemLocationKind.File, + file: 2, + message: 6 + }] + ); + }); + + test('kind: File requires a file', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', kind: 'file', message: 6 } + ]; + let parsed = parser.parse(problemPattern); + assert.equal(null, parsed); + assert.equal(ValidationState.Error, reporter.state); + assert(reporter.hasMessage('The problem pattern is invalid. It must have at least have a file and a message.')); + }); + + test('kind: File requires a message', () => { + let problemPattern: matchers.Config.MultiLineProblemPattern = [ + { regexp: 'test', kind: 'file', file: 6 } + ]; + let parsed = parser.parse(problemPattern); + assert.equal(null, parsed); + assert.equal(ValidationState.Error, reporter.state); + assert(reporter.hasMessage('The problem pattern is invalid. It must have at least have a file and a message.')); + }); + }); +}); \ No newline at end of file diff --git a/src/vs/platform/progress/common/progress.ts b/src/vs/platform/progress/common/progress.ts index 100276698ea..be22ec02e24 100644 --- a/src/vs/platform/progress/common/progress.ts +++ b/src/vs/platform/progress/common/progress.ts @@ -63,8 +63,9 @@ export class Progress<T> implements IProgress<T> { } export enum ProgressLocation { - Scm = 1, - Extensions = 2, + Explorer = 1, + Scm = 3, + Extensions = 5, Window = 10 } diff --git a/src/vs/platform/quickOpen/common/quickOpen.ts b/src/vs/platform/quickOpen/common/quickOpen.ts index 0b3bf170855..e080cd7b64c 100644 --- a/src/vs/platform/quickOpen/common/quickOpen.ts +++ b/src/vs/platform/quickOpen/common/quickOpen.ts @@ -27,6 +27,7 @@ export interface IPickOpenEntry { label: string; description?: string; detail?: string; + tooltip?: string; separator?: ISeparator; alwaysShow?: boolean; run?: (context: IEntryRunContext) => void; diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 0c8fb6574b6..9adba34254f 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -182,6 +182,7 @@ export const inputValidationErrorBackground = registerColor('inputValidation.err 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 selectListBackground = registerColor('dropdown.listBackground', { dark: null, light: null, hc: Color.black }, nls.localize('dropdownListBackground', "Dropdown list 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.")); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index 5b67b103f2d..b8798b71ca8 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 { focusBorder, inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listInactiveFocusForeground, listInactiveFocusBackground, 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 { focusBorder, inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectListBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listInactiveFocusForeground, listInactiveFocusBackground, 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'; export type styleFn = (colors: { [name: string]: ColorIdentifier }) => void; @@ -99,6 +99,7 @@ export function attachInputBoxStyler(widget: IThemable, themeService: IThemeServ export interface ISelectBoxStyleOverrides extends IStyleOverrides, IListStyleOverrides { selectBackground?: ColorIdentifier; + selectListBackground?: ColorIdentifier; selectForeground?: ColorIdentifier; selectBorder?: ColorIdentifier; focusBorder?: ColorIdentifier; @@ -107,6 +108,7 @@ export interface ISelectBoxStyleOverrides extends IStyleOverrides, IListStyleOve export function attachSelectBoxStyler(widget: IThemable, themeService: IThemeService, style?: ISelectBoxStyleOverrides): IDisposable { return attachStyler(themeService, { selectBackground: (style && style.selectBackground) || selectBackground, + selectListBackground: (style && style.selectListBackground) || selectListBackground, selectForeground: (style && style.selectForeground) || selectForeground, selectBorder: (style && style.selectBorder) || selectBorder, focusBorder: (style && style.focusBorder) || focusBorder, diff --git a/src/vs/platform/update/node/update.config.contribution.ts b/src/vs/platform/update/node/update.config.contribution.ts new file mode 100644 index 00000000000..c371ffc8d74 --- /dev/null +++ b/src/vs/platform/update/node/update.config.contribution.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. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as nls from 'vs/nls'; +import product from 'vs/platform/node/product'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; + +const configurationRegistry = <IConfigurationRegistry>Registry.as(ConfigurationExtensions.Configuration); +configurationRegistry.registerConfiguration({ + 'id': 'update', + 'order': 15, + 'title': nls.localize('updateConfigurationTitle', "Update"), + 'type': 'object', + 'properties': { + 'update.channel': { + 'type': 'string', + 'enum': ['none', 'default'], + 'default': 'default', + 'description': nls.localize('updateChannel', "Configure whether you receive automatic updates from an update channel. Requires a restart after change.") + }, + 'update.enableWindowsBackgroundUpdates': { + 'type': 'boolean', + 'default': product.quality === 'insider', + 'description': nls.localize('enableWindowsBackgroundUpdates', "Enables Windows background updates.") + } + } +}); diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 3a2cabf156a..227a9a81106 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -160,6 +160,8 @@ export interface IWindowsService { // TODO: this is a bit backwards startCrashReporter(config: CrashReporterStartOptions): TPromise<void>; + + openAboutDialog(): TPromise<void>; } export const IWindowService = createDecorator<IWindowService>('windowService'); diff --git a/src/vs/platform/windows/common/windowsIpc.ts b/src/vs/platform/windows/common/windowsIpc.ts index c4fedca111d..6a899f79556 100644 --- a/src/vs/platform/windows/common/windowsIpc.ts +++ b/src/vs/platform/windows/common/windowsIpc.ts @@ -63,6 +63,7 @@ export interface IWindowsChannel extends IChannel { call(command: 'showItemInFolder', arg: string): TPromise<void>; call(command: 'openExternal', arg: string): TPromise<boolean>; call(command: 'startCrashReporter', arg: CrashReporterStartOptions): TPromise<void>; + call(command: 'openAboutDialog'): TPromise<void>; call(command: string, arg?: any): TPromise<any>; } @@ -142,6 +143,7 @@ export class WindowsChannel implements IWindowsChannel { case 'showItemInFolder': return this.service.showItemInFolder(arg); case 'openExternal': return this.service.openExternal(arg); case 'startCrashReporter': return this.service.startCrashReporter(arg); + case 'openAboutDialog': return this.service.openAboutDialog(); } return undefined; } @@ -345,4 +347,8 @@ export class WindowsChannelClient implements IWindowsService { updateTouchBar(windowId: number, items: ICommandAction[][]): TPromise<void> { return this.channel.call('updateTouchBar', [windowId, items]); } + + openAboutDialog(): TPromise<void> { + return this.channel.call('openAboutDialog'); + } } diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 25ac113b9fd..553b78f3dfc 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -5,13 +5,15 @@ 'use strict'; +import * as nls from 'vs/nls'; 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 product from 'vs/platform/node/product'; import { IWindowsService, OpenContext, INativeOpenDialogOptions, IEnterWorkspaceResult, IMessageBoxResult } from 'vs/platform/windows/common/windows'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { shell, crashReporter, app, Menu } from 'electron'; +import { shell, crashReporter, app, Menu, clipboard } from 'electron'; import Event, { chain, fromNodeEventEmitter } from 'vs/base/common/event'; import { IURLService } from 'vs/platform/url/common/url'; import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; @@ -19,6 +21,9 @@ import { IWindowsMainService, ISharedProcess } from 'vs/platform/windows/electro import { IHistoryMainService, IRecentlyOpened } from 'vs/platform/history/common/history'; import { IWorkspaceIdentifier, IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces'; import { ICommandAction } from 'vs/platform/actions/common/actions'; +import { Schemas } from 'vs/base/common/network'; +import { mnemonicButtonLabel } from 'vs/base/common/labels'; +import { isWindows } from 'vs/base/common/platform'; export class WindowsService implements IWindowsService, IDisposable { @@ -40,7 +45,7 @@ export class WindowsService implements IWindowsService, IDisposable { ) { // Catch file URLs chain(urlService.onOpenURL) - .filter(uri => uri.authority === 'file' && !!uri.path) + .filter(uri => uri.authority === Schemas.file && !!uri.path) .map(uri => URI.file(uri.fsPath)) .on(this.openFileForURI, this, this.disposables); @@ -408,6 +413,41 @@ export class WindowsService implements IWindowsService, IDisposable { return TPromise.as(null); } + openAboutDialog(): TPromise<void> { + const lastActiveWindow = this.windowsMainService.getFocusedWindow() || this.windowsMainService.getLastActiveWindow(); + + const detail = nls.localize('aboutDetail', + "Version {0}\nCommit {1}\nDate {2}\nShell {3}\nRenderer {4}\nNode {5}\nArchitecture {6}", + app.getVersion(), + product.commit || 'Unknown', + product.date || 'Unknown', + process.versions['electron'], + process.versions['chrome'], + process.versions['node'], + process.arch + ); + + const buttons = [nls.localize('okButton', "OK")]; + if (isWindows) { + buttons.push(mnemonicButtonLabel(nls.localize({ key: 'copy', comment: ['&& denotes a mnemonic'] }, "&&Copy"))); // https://github.com/Microsoft/vscode/issues/37608 + } + + this.windowsMainService.showMessageBox({ + title: product.nameLong, + type: 'info', + message: product.nameLong, + detail: `\n${detail}`, + buttons, + noLink: true + }, lastActiveWindow).then(result => { + if (isWindows && result.button === 1) { + clipboard.writeText(detail); + } + }); + + return TPromise.as(null); + } + private openFileForURI(uri: URI): TPromise<void> { const cli = assign(Object.create(null), this.environmentService.args, { goto: true }); const pathsToOpen = [uri.fsPath]; diff --git a/src/vs/platform/workspaces/electron-main/workspacesMainService.ts b/src/vs/platform/workspaces/electron-main/workspacesMainService.ts index f06b9ccc058..da321bf8c23 100644 --- a/src/vs/platform/workspaces/electron-main/workspacesMainService.ts +++ b/src/vs/platform/workspaces/electron-main/workspacesMainService.ts @@ -25,6 +25,7 @@ import { applyEdit } from 'vs/base/common/jsonFormatter'; import { massageFolderPathForWorkspace } from 'vs/platform/workspaces/node/workspaces'; import { toWorkspaceFolders } from 'vs/platform/workspace/common/workspace'; import URI from 'vs/base/common/uri'; +import { Schemas } from 'vs/base/common/network'; export interface IStoredWorkspace { folders: IStoredWorkspaceFolder[]; @@ -152,7 +153,7 @@ export class WorkspacesMainService implements IWorkspacesMainService { let storedWorkspace: IStoredWorkspaceFolder; // File URI - if (folderResource.scheme === 'file') { + if (folderResource.scheme === Schemas.file) { storedWorkspace = { path: massageFolderPathForWorkspace(folderResource.fsPath, untitledWorkspaceConfigFolder, []) }; } diff --git a/src/vs/workbench/api/browser/viewsExtensionPoint.ts b/src/vs/workbench/api/browser/viewsExtensionPoint.ts index 191ae51ea6d..9d4f94df9c1 100644 --- a/src/vs/workbench/api/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/api/browser/viewsExtensionPoint.ts @@ -8,8 +8,8 @@ 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, IViewDescriptor } from 'vs/workbench/common/views'; -import { TreeView } from 'vs/workbench/browser/parts/views/treeView'; +import { ViewLocation, ViewsRegistry, ICustomViewDescriptor } from 'vs/workbench/common/views'; +import { CustomTreeViewPanel } from 'vs/workbench/browser/parts/views/customViewPanel'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { coalesce, } from 'vs/base/common/arrays'; @@ -102,14 +102,15 @@ ExtensionsRegistry.registerExtensionPoint<{ [loc: string]: schema.IUserFriendlyV const registeredViews = ViewsRegistry.getViews(location); const viewIds = []; const viewDescriptors = coalesce(entry.value.map(item => { - const viewDescriptor = <IViewDescriptor>{ + const viewDescriptor = <ICustomViewDescriptor>{ id: item.id, name: item.name, - ctor: TreeView, + ctor: CustomTreeViewPanel, location, when: ContextKeyExpr.deserialize(item.when), canToggleVisibility: true, - collapsed: true + collapsed: true, + treeView: true }; // validate diff --git a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts index 5ddc7b3162f..f971f5722be 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts @@ -6,7 +6,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import uri from 'vs/base/common/uri'; -import { IDebugService, IConfig, IDebugConfigurationProvider, IBreakpoint, IFunctionBreakpoint, IRawBreakpoint } from 'vs/workbench/parts/debug/common/debug'; +import { IDebugService, IConfig, IDebugConfigurationProvider, IBreakpoint, IFunctionBreakpoint, IBreakpointData } from 'vs/workbench/parts/debug/common/debug'; import { TPromise } from 'vs/base/common/winjs.base'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { @@ -97,7 +97,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape { for (let dto of DTOs) { if (dto.type === 'sourceMulti') { const rawbps = dto.lines.map(l => - <IRawBreakpoint>{ + <IBreakpointData>{ id: l.id, enabled: l.enabled, lineNumber: l.line + 1, diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts index dc05fa3751c..e982594e80f 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts @@ -18,6 +18,7 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { MainThreadDocumentsAndEditors } from './mainThreadDocumentsAndEditors'; import { ITextEditorModel } from 'vs/workbench/common/editor'; import { ITextModel } from 'vs/editor/common/model'; +import { Schemas } from 'vs/base/common/network'; export class BoundModelReferenceCollection { @@ -104,17 +105,17 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { this._toDispose.push(textFileService.models.onModelSaved(e => { if (this._shouldHandleFileEvent(e)) { - this._proxy.$acceptModelSaved(e.resource.toString()); + this._proxy.$acceptModelSaved(e.resource); } })); this._toDispose.push(textFileService.models.onModelReverted(e => { if (this._shouldHandleFileEvent(e)) { - this._proxy.$acceptDirtyStateChanged(e.resource.toString(), false); + this._proxy.$acceptDirtyStateChanged(e.resource, false); } })); this._toDispose.push(textFileService.models.onModelDirty(e => { if (this._shouldHandleFileEvent(e)) { - this._proxy.$acceptDirtyStateChanged(e.resource.toString(), true); + this._proxy.$acceptDirtyStateChanged(e.resource, true); } })); @@ -143,7 +144,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { let modelUrl = model.uri; this._modelIsSynced[modelUrl.toString()] = true; this._modelToDisposeMap[modelUrl.toString()] = model.onDidChangeContent((e) => { - this._proxy.$acceptModelChanged(modelUrl.toString(), e, this._textFileService.isDirty(modelUrl)); + this._proxy.$acceptModelChanged(modelUrl, e, this._textFileService.isDirty(modelUrl)); }); } @@ -153,17 +154,17 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { if (!this._modelIsSynced[modelUrl.toString()]) { return; } - this._proxy.$acceptModelModeChanged(model.uri.toString(), oldModeId, model.getLanguageIdentifier().language); + this._proxy.$acceptModelModeChanged(model.uri, oldModeId, model.getLanguageIdentifier().language); } - private _onModelRemoved(modelUrl: string): void { - - if (!this._modelIsSynced[modelUrl]) { + private _onModelRemoved(modelUrl: URI): void { + let strModelUrl = modelUrl.toString(); + if (!this._modelIsSynced[strModelUrl]) { return; } - delete this._modelIsSynced[modelUrl]; - this._modelToDisposeMap[modelUrl].dispose(); - delete this._modelToDisposeMap[modelUrl]; + delete this._modelIsSynced[strModelUrl]; + this._modelToDisposeMap[strModelUrl].dispose(); + delete this._modelToDisposeMap[strModelUrl]; } // --- from extension host process @@ -180,10 +181,10 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { let promise: TPromise<boolean>; switch (uri.scheme) { - case 'untitled': + case Schemas.untitled: promise = this._handleUnititledScheme(uri); break; - case 'file': + case Schemas.file: default: promise = this._handleAsResourceInput(uri); break; @@ -212,7 +213,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { } private _handleUnititledScheme(uri: URI): TPromise<boolean> { - let asFileUri = uri.with({ scheme: 'file' }); + let asFileUri = uri.with({ scheme: Schemas.file }); return this._fileService.resolveFile(asFileUri).then(stats => { // don't create a new file ontop of an existing file return TPromise.wrapError<boolean>(new Error('file already exists on disk')); @@ -227,7 +228,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape { throw new Error(`expected URI ${resource.toString()} to have come to LIFE`); } - this._proxy.$acceptDirtyStateChanged(resource.toString(), true); // mark as dirty + this._proxy.$acceptDirtyStateChanged(resource, true); // mark as dirty return resource; }); diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts index ee9b53bc584..ab5c345cb80 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts @@ -23,6 +23,7 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { isCodeEditor, isDiffEditor, ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import URI from 'vs/base/common/uri'; namespace mapset { @@ -289,12 +290,12 @@ export class MainThreadDocumentsAndEditors { private _onTextEditorAdd = new Emitter<MainThreadTextEditor[]>(); private _onTextEditorRemove = new Emitter<string[]>(); private _onDocumentAdd = new Emitter<ITextModel[]>(); - private _onDocumentRemove = new Emitter<string[]>(); + private _onDocumentRemove = new Emitter<URI[]>(); readonly onTextEditorAdd: Event<MainThreadTextEditor[]> = this._onTextEditorAdd.event; readonly onTextEditorRemove: Event<string[]> = this._onTextEditorRemove.event; readonly onDocumentAdd: Event<ITextModel[]> = this._onDocumentAdd.event; - readonly onDocumentRemove: Event<string[]> = this._onDocumentRemove.event; + readonly onDocumentRemove: Event<URI[]> = this._onDocumentRemove.event; constructor( extHostContext: IExtHostContext, @@ -336,12 +337,12 @@ export class MainThreadDocumentsAndEditors { private _onDelta(delta: DocumentAndEditorStateDelta): void { - let removedDocuments: string[]; + let removedDocuments: URI[]; let removedEditors: string[] = []; let addedEditors: MainThreadTextEditor[] = []; // removed models - removedDocuments = delta.removedDocuments.map(m => m.uri.toString()); + removedDocuments = delta.removedDocuments.map(m => m.uri); // added editors for (const apiEditor of delta.addedEditors) { diff --git a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts index 8b8cec71781..97ffef5f108 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts @@ -6,7 +6,7 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import Event, { Emitter } from 'vs/base/common/event'; import { assign } from 'vs/base/common/objects'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -212,7 +212,7 @@ class MainThreadSCMProvider implements ISCMProvider { this.handle, groupHandle, handle, - URI.parse(sourceUri), + URI.revive(sourceUri), group, decorations ); @@ -241,8 +241,8 @@ class MainThreadSCMProvider implements ISCMProvider { return TPromise.as(null); } - return this.proxy.$provideOriginalResource(this.handle, uri.toString()) - .then(result => result && URI.parse(result)); + return this.proxy.$provideOriginalResource(this.handle, uri) + .then(result => result && URI.revive(result)); } toJSON(): any { @@ -284,8 +284,8 @@ export class MainThreadSCM implements MainThreadSCMShape { this._disposables = dispose(this._disposables); } - $registerSourceControl(handle: number, id: string, label: string, rootUri: string | undefined): void { - const provider = new MainThreadSCMProvider(this._proxy, handle, id, label, rootUri && URI.parse(rootUri), this.scmService); + $registerSourceControl(handle: number, id: string, label: string, rootUri: UriComponents | undefined): void { + const provider = new MainThreadSCMProvider(this._proxy, handle, id, label, rootUri && URI.revive(rootUri), this.scmService); const repository = this.scmService.registerSCMProvider(provider); this._repositories[handle] = repository; diff --git a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts index b2970e5f093..50f205d1be5 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts @@ -9,36 +9,40 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Disposable } from 'vs/base/common/lifecycle'; import { ExtHostContext, MainThreadTreeViewsShape, ExtHostTreeViewsShape, MainContext, IExtHostContext } from '../node/extHost.protocol'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { ViewsRegistry, ITreeViewDataProvider, ITreeItem } from 'vs/workbench/common/views'; +import { ITreeViewDataProvider, ITreeItem, ICustomViewsService } from 'vs/workbench/common/views'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; -import { assign } from 'vs/base/common/objects'; +import { distinct } from 'vs/base/common/arrays'; @extHostNamedCustomer(MainContext.MainThreadTreeViews) export class MainThreadTreeViews extends Disposable implements MainThreadTreeViewsShape { private _proxy: ExtHostTreeViewsShape; + private _dataProviders: Map<string, TreeViewDataProvider> = new Map<string, TreeViewDataProvider>(); constructor( extHostContext: IExtHostContext, + @ICustomViewsService private viewsService: ICustomViewsService, @IMessageService private messageService: IMessageService ) { super(); this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostTreeViews); } - $registerView(treeViewId: string): void { - ViewsRegistry.registerTreeViewDataProvider(treeViewId, this._register(new TreeViewDataProvider(treeViewId, this._proxy, this.messageService))); + $registerTreeViewDataProvider(treeViewId: string): void { + const dataProvider = this._register(new TreeViewDataProvider(treeViewId, this._proxy, this.messageService)); + this._dataProviders.set(treeViewId, dataProvider); + this.viewsService.registerTreeViewDataProvider(treeViewId, dataProvider); } $refresh(treeViewId: string, itemsToRefresh: { [treeItemHandle: string]: ITreeItem }): void { - const treeViewDataProvider: TreeViewDataProvider = <TreeViewDataProvider>ViewsRegistry.getTreeViewDataProvider(treeViewId); - if (treeViewDataProvider) { - treeViewDataProvider.refresh(itemsToRefresh); + const dataProvider = this._dataProviders.get(treeViewId); + if (dataProvider) { + dataProvider.refresh(itemsToRefresh); } } dispose(): void { - ViewsRegistry.deregisterTreeViewDataProviders(); + this._dataProviders.clear(); super.dispose(); } } @@ -61,23 +65,13 @@ class TreeViewDataProvider implements ITreeViewDataProvider { ) { } - getElements(): TPromise<ITreeItem[]> { - return this._proxy.$getElements(this.treeViewId) - .then(elements => { - return this.postGetElements(elements); - }, err => { - this.messageService.show(Severity.Error, err); - return []; - }); - } - - getChildren(treeItem: ITreeItem): TPromise<ITreeItem[]> { - if (treeItem.children) { + getChildren(treeItem?: ITreeItem): TPromise<ITreeItem[]> { + if (treeItem && treeItem.children) { return TPromise.as(treeItem.children); } - return this._proxy.$getChildren(this.treeViewId, treeItem.handle) + return this._proxy.$getChildren(this.treeViewId, treeItem ? treeItem.handle : void 0) .then(children => { - return this.postGetElements(children); + return this.postGetChildren(children); }, err => { this.messageService.show(Severity.Error, err); return []; @@ -111,23 +105,12 @@ class TreeViewDataProvider implements ITreeViewDataProvider { } } - dispose(): void { - this._onDispose.fire(); - } - - private postGetElements(elements: ITreeItem[]): ITreeItem[] { + private postGetChildren(elements: ITreeItem[]): ITreeItem[] { const result = []; if (elements) { for (const element of elements) { - const currentTreeItem = this.itemsMap.get(element.handle); - if (currentTreeItem) { - // Update the current item with new item - this.updateTreeItem(currentTreeItem, element); - } else { - this.itemsMap.set(element.handle, element); - } - // Always use the existing items - result.push(this.itemsMap.get(element.handle)); + this.itemsMap.set(element.handle, element); + result.push(element); } } return result; @@ -136,7 +119,14 @@ class TreeViewDataProvider implements ITreeViewDataProvider { private updateTreeItem(current: ITreeItem, treeItem: ITreeItem): void { treeItem.children = treeItem.children ? treeItem.children : null; if (current) { - assign(current, treeItem); + const properties = distinct([...Object.keys(current), ...Object.keys(treeItem)]); + for (const property of properties) { + current[property] = treeItem[property]; + } } } + + dispose(): void { + this._onDispose.fire(); + } } diff --git a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts index 721a2df3e40..275298bcad4 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts @@ -59,7 +59,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape { return this._workspaceEditingService.updateFolders(index, deleteCount, workspaceFoldersToAdd, true); } - private getStatusMessage(extensionName, addCount: number, removeCount: number): string { + private getStatusMessage(extensionName: string, addCount: number, removeCount: number): string { let message: string; const wantsToAdd = addCount > 0; diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 13bafd04499..07a6fc237ad 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -214,7 +214,7 @@ export interface MainThreadEditorsShape extends IDisposable { } export interface MainThreadTreeViewsShape extends IDisposable { - $registerView(treeViewId: string): void; + $registerTreeViewDataProvider(treeViewId: string): void; $refresh(treeViewId: string, itemsToRefresh?: { [treeItemHandle: string]: ITreeItem }): void; } @@ -395,7 +395,7 @@ export interface SCMGroupFeatures { export type SCMRawResource = [ number /*handle*/, - string /*resourceUri*/, + UriComponents /*resourceUri*/, string[] /*icons: light, dark*/, string /*tooltip*/, boolean /*strike through*/, @@ -418,7 +418,7 @@ export type SCMRawResourceSplices = [ ]; export interface MainThreadSCMShape extends IDisposable { - $registerSourceControl(handle: number, id: string, label: string, rootUri: string | undefined): void; + $registerSourceControl(handle: number, id: string, label: string, rootUri: UriComponents | undefined): void; $updateSourceControl(handle: number, features: SCMProviderFeatures): void; $unregisterSourceControl(handle: number): void; @@ -479,10 +479,10 @@ export interface IModelAddedData { isDirty: boolean; } export interface ExtHostDocumentsShape { - $acceptModelModeChanged(strURL: string, oldModeId: string, newModeId: string): void; - $acceptModelSaved(strURL: string): void; - $acceptDirtyStateChanged(strURL: string, isDirty: boolean): void; - $acceptModelChanged(strURL: string, e: IModelChangedEvent, isDirty: boolean): void; + $acceptModelModeChanged(strURL: UriComponents, oldModeId: string, newModeId: string): void; + $acceptModelSaved(strURL: UriComponents): void; + $acceptDirtyStateChanged(strURL: UriComponents, isDirty: boolean): void; + $acceptModelChanged(strURL: UriComponents, e: IModelChangedEvent, isDirty: boolean): void; } export interface ExtHostDocumentSaveParticipantShape { @@ -506,7 +506,7 @@ export interface ExtHostEditorsShape { } export interface IDocumentsAndEditorsDelta { - removedDocuments?: string[]; + removedDocuments?: UriComponents[]; addedDocuments?: IModelAddedData[]; removedEditors?: string[]; addedEditors?: ITextEditorAddData[]; @@ -518,8 +518,7 @@ export interface ExtHostDocumentsAndEditorsShape { } export interface ExtHostTreeViewsShape { - $getElements(treeViewId: string): TPromise<ITreeItem[]>; - $getChildren(treeViewId: string, treeItemHandle: string): TPromise<ITreeItem[]>; + $getChildren(treeViewId: string, treeItemHandle?: string): TPromise<ITreeItem[]>; } export interface ExtHostWorkspaceShape { @@ -691,7 +690,7 @@ export interface ExtHostTerminalServiceShape { } export interface ExtHostSCMShape { - $provideOriginalResource(sourceControlHandle: number, uri: string): TPromise<string>; + $provideOriginalResource(sourceControlHandle: number, uri: UriComponents): TPromise<UriComponents>; $onInputBoxValueChange(sourceControlHandle: number, value: string): TPromise<void>; $executeResourceCommand(sourceControlHandle: number, groupHandle: number, handle: number): TPromise<void>; $validateInput(sourceControlHandle: number, value: string, cursorPosition: number): TPromise<[string, number] | undefined>; diff --git a/src/vs/workbench/api/node/extHostDocumentContentProviders.ts b/src/vs/workbench/api/node/extHostDocumentContentProviders.ts index 719db9d89b8..747090213d8 100644 --- a/src/vs/workbench/api/node/extHostDocumentContentProviders.ts +++ b/src/vs/workbench/api/node/extHostDocumentContentProviders.ts @@ -13,6 +13,7 @@ import * as vscode from 'vscode'; import { asWinJsPromise } from 'vs/base/common/async'; import { MainContext, ExtHostDocumentContentProvidersShape, MainThreadDocumentContentProvidersShape, IMainContext } from './extHost.protocol'; import { ExtHostDocumentsAndEditors } from './extHostDocumentsAndEditors'; +import { Schemas } from 'vs/base/common/network'; export class ExtHostDocumentContentProvider implements ExtHostDocumentContentProvidersShape { @@ -34,7 +35,7 @@ export class ExtHostDocumentContentProvider implements ExtHostDocumentContentPro registerTextDocumentContentProvider(scheme: string, provider: vscode.TextDocumentContentProvider): vscode.Disposable { // todo@remote // check with scheme from fs-providers! - if (scheme === 'file' || scheme === 'untitled') { + if (scheme === Schemas.file || scheme === Schemas.untitled) { throw new Error(`scheme '${scheme}' already registered`); } diff --git a/src/vs/workbench/api/node/extHostDocuments.ts b/src/vs/workbench/api/node/extHostDocuments.ts index c92d98c7721..eb0b12fd915 100644 --- a/src/vs/workbench/api/node/extHostDocuments.ts +++ b/src/vs/workbench/api/node/extHostDocuments.ts @@ -5,7 +5,7 @@ 'use strict'; import Event, { Emitter } from 'vs/base/common/event'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import * as TypeConverters from './extHostTypeConverters'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -95,7 +95,9 @@ export class ExtHostDocuments implements ExtHostDocumentsShape { return this._proxy.$tryCreateDocument(options).then(data => URI.revive(data)); } - public $acceptModelModeChanged(strURL: string, oldModeId: string, newModeId: string): void { + public $acceptModelModeChanged(uriComponents: UriComponents, oldModeId: string, newModeId: string): void { + const uri = URI.revive(uriComponents); + const strURL = uri.toString(); let data = this._documentsAndEditors.getDocument(strURL); // Treat a mode change as a remove + add @@ -105,13 +107,17 @@ export class ExtHostDocuments implements ExtHostDocumentsShape { this._onDidAddDocument.fire(data.document); } - public $acceptModelSaved(strURL: string): void { + public $acceptModelSaved(uriComponents: UriComponents): void { + const uri = URI.revive(uriComponents); + const strURL = uri.toString(); let data = this._documentsAndEditors.getDocument(strURL); - this.$acceptDirtyStateChanged(strURL, false); + this.$acceptDirtyStateChanged(uriComponents, false); this._onDidSaveDocument.fire(data.document); } - public $acceptDirtyStateChanged(strURL: string, isDirty: boolean): void { + public $acceptDirtyStateChanged(uriComponents: UriComponents, isDirty: boolean): void { + const uri = URI.revive(uriComponents); + const strURL = uri.toString(); let data = this._documentsAndEditors.getDocument(strURL); data._acceptIsDirty(isDirty); this._onDidChangeDocument.fire({ @@ -120,7 +126,9 @@ export class ExtHostDocuments implements ExtHostDocumentsShape { }); } - public $acceptModelChanged(strURL: string, events: IModelChangedEvent, isDirty: boolean): void { + public $acceptModelChanged(uriComponents: UriComponents, events: IModelChangedEvent, isDirty: boolean): void { + const uri = URI.revive(uriComponents); + const strURL = uri.toString(); let data = this._documentsAndEditors.getDocument(strURL); data._acceptIsDirty(isDirty); data.onEvents(events); diff --git a/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts b/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts index b3f6f63fedc..16f3bda684c 100644 --- a/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts +++ b/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts @@ -41,7 +41,9 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha const removedEditors: ExtHostTextEditor[] = []; if (delta.removedDocuments) { - for (const id of delta.removedDocuments) { + for (const uriComponent of delta.removedDocuments) { + const uri = URI.revive(uriComponent); + const id = uri.toString(); const data = this._documents.get(id); this._documents.delete(id); removedDocuments.push(data); diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index c67a55d01b0..56d191ee98b 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -581,7 +581,7 @@ class SuggestAdapter { } // the default text edit range - const wordRangeBeforePos = (doc.getWordRangeAtPosition(pos) || new Range(pos, pos)) + const wordRangeBeforePos = (doc.getWordRangeAtPosition(pos) as Range || new Range(pos, pos)) .with({ end: pos }); for (let i = 0; i < list.items.length; i++) { @@ -618,7 +618,7 @@ class SuggestAdapter { const doc = this._documents.getDocumentData(resource).document; const pos = TypeConverters.toPosition(position); - const wordRangeBeforePos = (doc.getWordRangeAtPosition(pos) || new Range(pos, pos)).with({ end: pos }); + const wordRangeBeforePos = (doc.getWordRangeAtPosition(pos) as Range || new Range(pos, pos)).with({ end: pos }); const newSuggestion = this._convertCompletionItem(resolvedItem, pos, wordRangeBeforePos, _id, _parentId); if (newSuggestion) { mixin(suggestion, newSuggestion, true); diff --git a/src/vs/workbench/api/node/extHostOutputService.ts b/src/vs/workbench/api/node/extHostOutputService.ts index d6901a1c2be..b36f0bfb25e 100644 --- a/src/vs/workbench/api/node/extHostOutputService.ts +++ b/src/vs/workbench/api/node/extHostOutputService.ts @@ -35,18 +35,22 @@ export class ExtHostOutputChannel implements vscode.OutputChannel { } append(value: string): void { + this.validate(); this._proxy.$append(this._id, this._name, value); } appendLine(value: string): void { + this.validate(); this.append(value + '\n'); } clear(): void { + this.validate(); this._proxy.$clear(this._id, this._name); } show(columnOrPreserveFocus?: vscode.ViewColumn | boolean, preserveFocus?: boolean): void { + this.validate(); if (typeof columnOrPreserveFocus === 'boolean') { preserveFocus = columnOrPreserveFocus; } @@ -55,8 +59,15 @@ export class ExtHostOutputChannel implements vscode.OutputChannel { } hide(): void { + this.validate(); this._proxy.$close(this._id); } + + private validate(): void { + if (this._disposed) { + throw new Error('Channel has been closed'); + } + } } export class ExtHostOutputService { diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 596aa1ead50..bee2cd0b11e 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import URI from 'vs/base/common/uri'; +import URI, { UriComponents } from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter, once } from 'vs/base/common/event'; import { debounce } from 'vs/base/common/decorators'; @@ -256,7 +256,7 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG const handle = this._resourceHandlePool++; this._resourceStatesMap.set(handle, r); - const sourceUri = r.resourceUri.toString(); + const sourceUri = r.resourceUri; const iconPath = getIconPath(r.decorations); const lightIconPath = r.decorations && getIconPath(r.decorations.light) || iconPath; const darkIconPath = r.decorations && getIconPath(r.decorations.dark) || iconPath; @@ -282,7 +282,7 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG const letter = r.decorations && r.decorations.letter || undefined; const color = r.decorations && r.decorations.color || undefined; - const rawResource = [handle, sourceUri, icons, tooltip, strikeThrough, faded, source, letter, color] as SCMRawResource; + const rawResource = [handle, <UriComponents>sourceUri, icons, tooltip, strikeThrough, faded, source, letter, color] as SCMRawResource; return { rawResource, handle }; }); @@ -406,7 +406,7 @@ class ExtHostSourceControl implements vscode.SourceControl { private _rootUri?: vscode.Uri ) { this._inputBox = new ExtHostSCMInputBox(_extension, this._proxy, this.handle); - this._proxy.$registerSourceControl(this.handle, _id, _label, _rootUri && _rootUri.toString()); + this._proxy.$registerSourceControl(this.handle, _id, _label, _rootUri); } private updatedResourceGroups = new Set<ExtHostSourceControlResourceGroup>(); @@ -542,8 +542,9 @@ export class ExtHostSCM implements ExtHostSCMShape { return inputBox; } - $provideOriginalResource(sourceControlHandle: number, uriString: string): TPromise<string> { - this.logService.trace('ExtHostSCM#$provideOriginalResource', sourceControlHandle, uriString); + $provideOriginalResource(sourceControlHandle: number, uriComponents: UriComponents): TPromise<UriComponents> { + const uri = URI.revive(uriComponents); + this.logService.trace('ExtHostSCM#$provideOriginalResource', sourceControlHandle, uri.toString()); const sourceControl = this._sourceControls.get(sourceControlHandle); @@ -551,8 +552,7 @@ export class ExtHostSCM implements ExtHostSCMShape { return TPromise.as(null); } - return asWinJsPromise(token => sourceControl.quickDiffProvider.provideOriginalResource(URI.parse(uriString), token)) - .then(result => result && result.toString()); + return asWinJsPromise(token => sourceControl.quickDiffProvider.provideOriginalResource(uri, token)); } $onInputBoxValueChange(sourceControlHandle: number, value: string): TPromise<void> { diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts index effb25dd985..cbf0e1a75f1 100644 --- a/src/vs/workbench/api/node/extHostTreeViews.ts +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -48,14 +48,6 @@ export class ExtHostTreeViews implements ExtHostTreeViewsShape { }; } - $getElements(treeViewId: string): TPromise<ITreeItem[]> { - const treeView = this.treeViews.get(treeViewId); - if (!treeView) { - return TPromise.wrapError<ITreeItem[]>(new Error(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', treeViewId))); - } - return treeView.getChildren(); - } - $getChildren(treeViewId: string, treeItemHandle?: string): TPromise<ITreeItem[]> { const treeView = this.treeViews.get(treeViewId); if (!treeView) { @@ -87,7 +79,7 @@ class ExtHostTreeView<T> extends Disposable { constructor(private viewId: string, private dataProvider: vscode.TreeDataProvider<T>, private proxy: MainThreadTreeViewsShape, private commands: CommandsConverter) { super(); - this.proxy.$registerView(viewId); + this.proxy.$registerTreeViewDataProvider(viewId); if (dataProvider.onDidChangeTreeData) { this._register(debounceEvent<T, T[]>(dataProvider.onDidChangeTreeData, (last, current) => last ? [...last, current] : [current], 200)(elements => this.refresh(elements))); } diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index fabbcd0ab66..585cc1af9bf 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -192,7 +192,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape { // Simulate the updateWorkspaceFolders method on our data to do more validation const newWorkspaceFolders = currentWorkspaceFolders.slice(0); - newWorkspaceFolders.splice(index, deleteCount, ...validatedDistinctWorkspaceFoldersToAdd.map(f => ({ uri: f.uri, name: f.name || basenameOrAuthority(f.uri) }))); + newWorkspaceFolders.splice(index, deleteCount, ...validatedDistinctWorkspaceFoldersToAdd.map(f => ({ uri: f.uri, name: f.name || basenameOrAuthority(f.uri), index: undefined }))); for (let i = 0; i < newWorkspaceFolders.length; i++) { const folder = newWorkspaceFolders[i]; diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts new file mode 100644 index 00000000000..bf0aebadd01 --- /dev/null +++ b/src/vs/workbench/browser/dnd.ts @@ -0,0 +1,458 @@ +/*--------------------------------------------------------------------------------------------- + * 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_EXTENSION, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; +import { extname, basename } from 'vs/base/common/paths'; +import { IFileService, IFileStat } from 'vs/platform/files/common/files'; +import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; +import URI from 'vs/base/common/uri'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; +import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { Schemas } from 'vs/base/common/network'; +import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { Position } from 'vs/platform/editor/common/editor'; +import { onUnexpectedError } from 'vs/base/common/errors'; +import { DefaultEndOfLine } from 'vs/editor/common/model'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IEditorViewState } from 'vs/editor/common/editorCommon'; +import { DataTransfers } from 'vs/base/browser/dnd'; +import { DefaultDragAndDrop } from 'vs/base/parts/tree/browser/treeDefaults'; +import { DragMouseEvent } from 'vs/base/browser/mouseEvent'; +import { getPathLabel } from 'vs/base/common/labels'; +import { MIME_BINARY } from 'vs/base/common/mime'; +import { ITree, IDragAndDropData } from 'vs/base/parts/tree/browser/tree'; +import { isWindows } from 'vs/base/common/platform'; +import { coalesce } from 'vs/base/common/arrays'; +import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; +import { IEditorIdentifier } from 'vs/workbench/common/editor'; +import { basenameOrAuthority } from 'vs/base/common/resources'; + +export interface IDraggedResource { + resource: URI; + isExternal: boolean; +} + +export class DraggedEditorIdentifier { + constructor(private _identifier: IEditorIdentifier) { + } + + public get identifier(): IEditorIdentifier { + return this._identifier; + } +} + +export interface IDraggedEditor extends IDraggedResource { + backupResource?: URI; + viewState?: IEditorViewState; +} + +export interface ISerializedDraggedEditor { + resource: string; + backupResource: string; + viewState: IEditorViewState; +} + +export const CodeDataTransfers = { + EDITORS: 'CodeEditors', + FILES: 'CodeFiles' +}; + +export function extractResources(e: DragEvent, externalOnly?: boolean): (IDraggedResource | IDraggedEditor)[] { + const resources: (IDraggedResource | IDraggedEditor)[] = []; + if (e.dataTransfer.types.length > 0) { + + // Check for window-to-window DND + if (!externalOnly) { + + // Data Transfer: Code Editors + const rawEditorsData = e.dataTransfer.getData(CodeDataTransfers.EDITORS); + if (rawEditorsData) { + try { + const draggedEditors = JSON.parse(rawEditorsData) as ISerializedDraggedEditor[]; + draggedEditors.forEach(draggedEditor => { + resources.push({ resource: URI.parse(draggedEditor.resource), backupResource: draggedEditor.backupResource ? URI.parse(draggedEditor.backupResource) : void 0, viewState: draggedEditor.viewState, isExternal: false }); + }); + } catch (error) { + // Invalid transfer + } + } + + // Data Transfer: Resources + else { + try { + const rawResourcesData = e.dataTransfer.getData(DataTransfers.RESOURCES); + if (rawResourcesData) { + const uriStrArray: string[] = JSON.parse(rawResourcesData); + resources.push(...uriStrArray.map(uriStr => ({ resource: URI.parse(uriStr), isExternal: false }))); + } + } catch (error) { + // Invalid transfer + } + } + } + + // Check for native file transfer + if (e.dataTransfer && e.dataTransfer.files) { + for (let i = 0; i < e.dataTransfer.files.length; i++) { + const file = e.dataTransfer.files[i] as { path: string }; + if (file && file.path && !resources.some(r => r.resource.fsPath === file.path) /* prevent duplicates */) { + try { + resources.push({ resource: URI.file(file.path), isExternal: true }); + } catch (error) { + // Invalid URI + } + } + } + } + + // Check for CodeFiles transfer + const rawCodeFiles = e.dataTransfer.getData(CodeDataTransfers.FILES); + if (rawCodeFiles) { + try { + const codeFiles = JSON.parse(rawCodeFiles) as string[]; + codeFiles.forEach(codeFile => { + if (!resources.some(r => r.resource.fsPath === codeFile) /* prevent duplicates */) { + resources.push({ resource: URI.file(codeFile), isExternal: true }); + } + }); + } catch (error) { + // Invalid transfer + } + } + } + + return resources; +} + +export interface IResourcesDropHandlerOptions { + + /** + * Wether to open the actual workspace when a workspace configuration file is dropped + * or wether to open the configuration file within the editor as normal file. + */ + allowWorkspaceOpen: boolean; +} + +/** + * Shared function across some components to handle drag & drop of resources. E.g. of folders and workspace files + * to open them in the window instead of the editor or to handle dirty editors being dropped between instances of Code. + */ +export class ResourcesDropHandler { + + constructor( + private options: IResourcesDropHandlerOptions, + @IFileService private fileService: IFileService, + @IWindowsService private windowsService: IWindowsService, + @IWindowService private windowService: IWindowService, + @IWorkspacesService private workspacesService: IWorkspacesService, + @ITextFileService private textFileService: ITextFileService, + @IBackupFileService private backupFileService: IBackupFileService, + @IEditorGroupService private groupService: IEditorGroupService, + @IUntitledEditorService private untitledEditorService: IUntitledEditorService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IConfigurationService private configurationService: IConfigurationService + ) { + } + + public handleDrop(event: DragEvent, afterDrop: () => void, targetPosition: Position, targetIndex?: number): void { + const untitledOrFileResources = extractResources(event).filter(r => this.fileService.canHandleResource(r.resource) || r.resource.scheme === Schemas.untitled); + if (!untitledOrFileResources.length) { + return; + } + + // Make the window active to handle the drop properly within + return this.windowService.focusWindow().then(() => { + + // Check for special things being dropped + return this.doHandleDrop(untitledOrFileResources).then(isWorkspaceOpening => { + if (isWorkspaceOpening) { + return void 0; // return early if the drop operation resulted in this window changing to a workspace + } + + // Add external ones to recently open list unless dropped resource is a workspace + const filesToAddToHistory = untitledOrFileResources.filter(d => d.isExternal && d.resource.scheme === Schemas.file).map(d => d.resource); + if (filesToAddToHistory.length) { + this.windowsService.addRecentlyOpened(filesToAddToHistory.map(resource => resource.fsPath)); + } + + // Open in Editor + return this.editorService.openEditors(untitledOrFileResources.map(untitledOrFileResource => { + return { + input: { + resource: untitledOrFileResource.resource, + options: { + pinned: true, + index: targetIndex, + viewState: (untitledOrFileResource as IDraggedEditor).viewState + } + }, + position: targetPosition + }; + })).then(() => { + + // Finish with provided function + afterDrop(); + }); + }); + }).done(null, onUnexpectedError); + } + + private doHandleDrop(untitledOrFileResources: (IDraggedResource | IDraggedEditor)[]): TPromise<boolean> { + + // Check for dirty editors being dropped + const resourcesWithBackups: IDraggedEditor[] = untitledOrFileResources.filter(resource => !resource.isExternal && !!(resource as IDraggedEditor).backupResource); + if (resourcesWithBackups.length > 0) { + return TPromise.join(resourcesWithBackups.map(resourceWithBackup => this.handleDirtyEditorDrop(resourceWithBackup))).then(() => false); + } + + // Check for workspace file being dropped if we are allowed to do so + if (this.options.allowWorkspaceOpen) { + const externalFileOnDiskResources = untitledOrFileResources.filter(d => d.isExternal && d.resource.scheme === Schemas.file).map(d => d.resource); + if (externalFileOnDiskResources.length > 0) { + return this.handleWorkspaceFileDrop(externalFileOnDiskResources); + } + } + + return TPromise.as(false); + } + + private handleDirtyEditorDrop(droppedDirtyEditor: IDraggedEditor): TPromise<boolean> { + + // Untitled: always ensure that we open a new untitled for each file we drop + if (droppedDirtyEditor.resource.scheme === Schemas.untitled) { + droppedDirtyEditor.resource = this.untitledEditorService.createOrGet().getResource(); + } + + // Return early if the resource is already dirty in target or opened already + if (this.textFileService.isDirty(droppedDirtyEditor.resource) || this.groupService.getStacksModel().isOpen(droppedDirtyEditor.resource)) { + return TPromise.as(false); + } + + // Resolve the contents of the dropped dirty resource from source + return this.backupFileService.resolveBackupContent(droppedDirtyEditor.backupResource).then(content => { + + // Set the contents of to the resource to the target + return this.backupFileService.backupResource(droppedDirtyEditor.resource, content.create(this.getDefaultEOL()).createSnapshot(true)); + }).then(() => false, () => false /* ignore any error */); + } + + private getDefaultEOL(): DefaultEndOfLine { + const eol = this.configurationService.getValue('files.eol'); + if (eol === '\r\n') { + return DefaultEndOfLine.CRLF; + } + + return DefaultEndOfLine.LF; + } + + private handleWorkspaceFileDrop(fileOnDiskResources: URI[]): TPromise<boolean> { + const workspaceResources: { workspaces: URI[], folders: URI[] } = { + workspaces: [], + folders: [] + }; + + return TPromise.join(fileOnDiskResources.map(fileOnDiskResource => { + + // Check for Workspace + if (extname(fileOnDiskResource.fsPath) === `.${WORKSPACE_EXTENSION}`) { + workspaceResources.workspaces.push(fileOnDiskResource); + + return void 0; + } + + // Check for Folder + return this.fileService.resolveFile(fileOnDiskResource).then(stat => { + if (stat.isDirectory) { + workspaceResources.folders.push(stat.resource); + } + }, error => void 0); + })).then(_ => { + const { workspaces, folders } = workspaceResources; + + // Return early if no external resource is a folder or workspace + if (workspaces.length === 0 && folders.length === 0) { + return false; + } + + // Pass focus to window + this.windowService.focusWindow(); + + let workspacesToOpen: TPromise<string[]>; + + // Open in separate windows if we drop workspaces or just one folder + if (workspaces.length > 0 || folders.length === 1) { + workspacesToOpen = TPromise.as([...workspaces, ...folders].map(resources => resources.fsPath)); + } + + // Multiple folders: Create new workspace with folders and open + else if (folders.length > 1) { + workspacesToOpen = this.workspacesService.createWorkspace(folders.map(folder => ({ uri: folder }))).then(workspace => [workspace.configPath]); + } + + // Open + workspacesToOpen.then(workspaces => { + this.windowsService.openWindow(workspaces, { forceReuseWindow: true }); + }); + + return true; + }); + } +} + +export class SimpleFileResourceDragAndDrop extends DefaultDragAndDrop { + + constructor( + private toResource: (obj: any) => URI, + @IInstantiationService protected instantiationService: IInstantiationService + ) { + super(); + } + + public getDragURI(tree: ITree, obj: any): string { + const resource = this.toResource(obj); + if (resource) { + return resource.toString(); + } + + return void 0; + } + + public getDragLabel(tree: ITree, elements: any[]): string { + if (elements.length > 1) { + return String(elements.length); + } + + const resource = this.toResource(elements[0]); + if (resource) { + return basenameOrAuthority(resource); + } + + return void 0; + } + + public onDragStart(tree: ITree, data: IDragAndDropData, originalEvent: DragMouseEvent): void { + + // Apply some datatransfer types to allow for dragging the element outside of the application + const resources: URI[] = data.getData().map(source => this.toResource(source)); + if (resources) { + this.instantiationService.invokeFunction(fillResourceDataTransfers, coalesce(resources), originalEvent); + } + } +} + +export function fillResourceDataTransfers(accessor: ServicesAccessor, resources: (URI | IFileStat)[], event: DragMouseEvent | DragEvent): void { + if (resources.length === 0) { + return; + } + + const sources = resources.map(obj => { + if (URI.isUri(obj)) { + return { resource: obj, isDirectory: false /* assume resource is not a directory */ }; + } + + return obj; + }); + + const firstSource = sources[0]; + + // Text: allows to paste into text-capable areas + const lineDelimiter = isWindows ? '\r\n' : '\n'; + event.dataTransfer.setData(DataTransfers.TEXT, sources.map(source => source.resource.scheme === Schemas.file ? getPathLabel(source.resource) : source.resource.toString()).join(lineDelimiter)); + + // Download URL: enables support to drag a tab as file to desktop (only single file supported) + if (firstSource.resource.scheme === Schemas.file) { + event.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, basename(firstSource.resource.fsPath), firstSource.resource.toString()].join(':')); + } + + // Resource URLs: allows to drop multiple resources to a target in VS Code (not directories) + const files = sources.filter(s => !s.isDirectory); + if (files.length) { + event.dataTransfer.setData(DataTransfers.RESOURCES, JSON.stringify(files.map(f => f.resource.toString()))); + } + + // Editors: enables cross window DND of tabs into the editor area + const textFileService = accessor.get(ITextFileService); + const backupFileService = accessor.get(IBackupFileService); + const editorService = accessor.get(IWorkbenchEditorService); + + const draggedEditors: ISerializedDraggedEditor[] = []; + files.forEach(file => { + + // Try to find editor view state from the visible editors that match given resource + let viewState: IEditorViewState; + const editors = editorService.getVisibleEditors(); + for (let i = 0; i < editors.length; i++) { + const editor = editors[i]; + const codeEditor = getCodeEditor(editor); + if (codeEditor) { + const model = codeEditor.getModel(); + if (model && model.uri && model.uri.toString() === file.resource.toString()) { + viewState = codeEditor.saveViewState(); + break; + } + } + } + + // Add as dragged editor + draggedEditors.push({ + resource: file.resource.toString(), + backupResource: textFileService.isDirty(file.resource) ? backupFileService.toBackupResource(file.resource).toString() : void 0, + viewState + }); + }); + + if (draggedEditors.length) { + event.dataTransfer.setData(CodeDataTransfers.EDITORS, JSON.stringify(draggedEditors)); + } +} + +/** + * A singleton to store transfer data during drag & drop operations that are only valid within the application. + */ +export class LocalSelectionTransfer<T> { + + private static readonly INSTANCE = new LocalSelectionTransfer(); + + private data: T[]; + private proto: T; + + private constructor() { + // protect against external instantiation + } + + public static getInstance<T>(): LocalSelectionTransfer<T> { + return LocalSelectionTransfer.INSTANCE as LocalSelectionTransfer<T>; + } + + public hasData(proto: T): boolean { + return proto && proto === this.proto; + } + + public clearData(): void { + this.proto = void 0; + this.data = void 0; + } + + public getData(proto: T): T[] { + if (this.hasData(proto)) { + return this.data; + } + + return void 0; + } + + public setData(data: T[], proto: T): void { + if (proto) { + this.data = data; + this.proto = proto; + } + } +} \ No newline at end of file diff --git a/src/vs/workbench/browser/editor.ts b/src/vs/workbench/browser/editor.ts index 35486960348..525a263c59f 100644 --- a/src/vs/workbench/browser/editor.ts +++ b/src/vs/workbench/browser/editor.ts @@ -11,9 +11,6 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { IConstructorSignature0, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { isArray } from 'vs/base/common/types'; -import URI from 'vs/base/common/uri'; -import { DataTransfers } from 'vs/base/browser/dnd'; -import { IEditorViewState } from 'vs/editor/common/editorCommon'; export interface IEditorDescriptor { instantiate(instantiationService: IInstantiationService): BaseEditor; @@ -199,79 +196,4 @@ export const Extensions = { Editors: 'workbench.contributions.editors' }; -Registry.add(Extensions.Editors, new EditorRegistry()); - -export interface IDraggedResource { - resource: URI; - isExternal: boolean; -} - -export interface IDraggedEditor extends IDraggedResource { - backupResource?: URI; - viewState?: IEditorViewState; -} - -export interface ISerializedDraggedEditor { - resource: string; - backupResource: string; - viewState: IEditorViewState; -} - -export const CodeDataTransfers = { - EDITOR: 'CodeEditor' -}; - -export function extractResources(e: DragEvent, externalOnly?: boolean): (IDraggedResource | IDraggedEditor)[] { - const resources: (IDraggedResource | IDraggedEditor)[] = []; - if (e.dataTransfer.types.length > 0) { - - // Check for window-to-window DND - if (!externalOnly) { - - // Data Transfer: Code Editor - const rawEditorData = e.dataTransfer.getData(CodeDataTransfers.EDITOR); - if (rawEditorData) { - try { - const draggedEditor = JSON.parse(rawEditorData) as ISerializedDraggedEditor; - resources.push({ resource: URI.parse(draggedEditor.resource), backupResource: URI.parse(draggedEditor.backupResource), viewState: draggedEditor.viewState, isExternal: false }); - } catch (error) { - // Invalid URI - } - } - - // Data Transfer: URL - else { - try { - const rawURLsData = e.dataTransfer.getData(DataTransfers.URLS); - if (rawURLsData) { - const uriStrArray: string[] = JSON.parse(rawURLsData); - resources.push(...uriStrArray.map(uriStr => ({ resource: URI.parse(uriStr), isExternal: false }))); - } else { - const rawURLData = e.dataTransfer.getData(DataTransfers.URL); - if (rawURLData) { - resources.push({ resource: URI.parse(rawURLData), isExternal: false }); - } - } - } catch (error) { - // Invalid URI - } - } - } - - // Check for native file transfer - if (e.dataTransfer && e.dataTransfer.files) { - for (let i = 0; i < e.dataTransfer.files.length; i++) { - const file = e.dataTransfer.files[i] as { path: string }; - if (file && file.path) { - try { - resources.push({ resource: URI.file(file.path), isExternal: true }); - } catch (error) { - // Invalid URI - } - } - } - } - } - - return resources; -} +Registry.add(Extensions.Editors, new EditorRegistry()); \ No newline at end of file diff --git a/src/vs/workbench/browser/labels.ts b/src/vs/workbench/browser/labels.ts index 2ced1db3e2f..2fe7c4c5d98 100644 --- a/src/vs/workbench/browser/labels.ts +++ b/src/vs/workbench/browser/labels.ts @@ -7,7 +7,7 @@ import uri from 'vs/base/common/uri'; import resources = require('vs/base/common/resources'); -import { IconLabel, IIconLabelOptions, IIconLabelCreationOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; +import { IconLabel, IIconLabelValueOptions, IIconLabelCreationOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IEditorInput } from 'vs/platform/editor/common/editor'; @@ -32,7 +32,7 @@ export interface IResourceLabel { resource?: uri; } -export interface IResourceLabelOptions extends IIconLabelOptions { +export interface IResourceLabelOptions extends IIconLabelValueOptions { fileKind?: FileKind; fileDecorations?: { colors: boolean, badges: boolean, data?: IDecorationData }; } @@ -94,7 +94,7 @@ export class ResourceLabel extends IconLabel { return; // we need the resource to compare } - if (e.model.uri.scheme === Schemas.file && e.oldModeId === PLAINTEXT_MODE_ID) { + if (e.model.uri.scheme === Schemas.file && e.oldModeId === PLAINTEXT_MODE_ID) { // todo@remote does this apply? return; // ignore transitions in files from no mode to specific mode because this happens each time a model is created } @@ -172,7 +172,7 @@ export class ResourceLabel extends IconLabel { return; } - const iconLabelOptions: IIconLabelOptions = { + const iconLabelOptions: IIconLabelValueOptions = { title: '', italic: this.options && this.options.italic, matches: this.options && this.options.matches, diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 5e459221828..71ddec696bf 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -41,6 +41,7 @@ import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRe import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { isMacintosh } from 'vs/base/common/platform'; import { GroupOnePicker, GroupTwoPicker, GroupThreePicker, AllEditorsPicker } from 'vs/workbench/browser/parts/editor/editorPicker'; +import { Schemas } from 'vs/base/common/network'; // Register String Editor Registry.as<IEditorRegistry>(EditorExtensions.Editors).registerEditor( @@ -131,7 +132,7 @@ class UntitledEditorInputFactory implements IEditorInputFactory { return instantiationService.invokeFunction<UntitledEditorInput>(accessor => { const deserialized: ISerializedUntitledEditorInput = JSON.parse(serializedEditorInput); const resource = !!deserialized.resourceJSON ? URI.revive(deserialized.resourceJSON) : URI.parse(deserialized.resource); - const filePath = resource.scheme === 'file' ? resource.fsPath : void 0; + const filePath = resource.scheme === Schemas.file ? resource.fsPath : void 0; const language = deserialized.modeId; const encoding = deserialized.encoding; diff --git a/src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts b/src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts deleted file mode 100644 index 17920141664..00000000000 --- a/src/vs/workbench/browser/parts/editor/editorAreaDropHandler.ts +++ /dev/null @@ -1,183 +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 { IDraggedResource, IDraggedEditor, extractResources } from 'vs/workbench/browser/editor'; -import { WORKSPACE_EXTENSION, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; -import { extname } from 'vs/base/common/paths'; -import { IFileService } from 'vs/platform/files/common/files'; -import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; -import URI from 'vs/base/common/uri'; -import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; -import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { Schemas } from 'vs/base/common/network'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { Position } from 'vs/platform/editor/common/editor'; -import { onUnexpectedError } from 'vs/base/common/errors'; -import { DefaultEndOfLine } from 'vs/editor/common/model'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; - -/** - * Shared function across some editor components to handle drag & drop of external resources. E.g. of folders and workspace files - * to open them in the window instead of the editor or to handle dirty editors being dropped between instances of Code. - */ -export class EditorAreaDropHandler { - - constructor( - @IFileService private fileService: IFileService, - @IWindowsService private windowsService: IWindowsService, - @IWindowService private windowService: IWindowService, - @IWorkspacesService private workspacesService: IWorkspacesService, - @ITextFileService private textFileService: ITextFileService, - @IBackupFileService private backupFileService: IBackupFileService, - @IEditorGroupService private groupService: IEditorGroupService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IConfigurationService private configurationService: IConfigurationService - ) { - } - - public handleDrop(event: DragEvent, afterDrop: () => void, targetPosition: Position, targetIndex?: number): void { - const resources = extractResources(event).filter(r => r.resource.scheme === Schemas.file || r.resource.scheme === Schemas.untitled); - if (!resources.length) { - return; - } - - return this.doHandleDrop(resources).then(isWorkspaceOpening => { - if (isWorkspaceOpening) { - return void 0; // return early if the drop operation resulted in this window changing to a workspace - } - - // Add external ones to recently open list unless dropped resource is a workspace - const externalResources = resources.filter(d => d.isExternal).map(d => d.resource); - if (externalResources.length) { - this.windowsService.addRecentlyOpened(externalResources.map(resource => resource.fsPath)); - } - - // Open in Editor - return this.windowService.focusWindow() - .then(() => this.editorService.openEditors(resources.map(r => { - return { - input: { - resource: r.resource, - options: { - pinned: true, - index: targetIndex, - viewState: (r as IDraggedEditor).viewState - } - }, - position: targetPosition - }; - }))).then(() => { - - // Finish with provided function - afterDrop(); - }); - }).done(null, onUnexpectedError); - } - - private doHandleDrop(resources: (IDraggedResource | IDraggedEditor)[]): TPromise<boolean> { - - // Check for dirty editor being dropped - if (resources.length === 1 && !resources[0].isExternal && (resources[0] as IDraggedEditor).backupResource) { - return this.handleDirtyEditorDrop(resources[0]); - } - - // Check for workspace file being dropped - if (resources.some(r => r.isExternal)) { - return this.handleWorkspaceFileDrop(resources); - } - - return TPromise.as(false); - } - - private handleDirtyEditorDrop(droppedDirtyEditor: IDraggedEditor): TPromise<boolean> { - - // Untitled: always ensure that we open a new untitled for each file we drop - if (droppedDirtyEditor.resource.scheme === Schemas.untitled) { - droppedDirtyEditor.resource = this.untitledEditorService.createOrGet().getResource(); - } - - // Return early if the resource is already dirty in target or opened already - if (this.textFileService.isDirty(droppedDirtyEditor.resource) || this.groupService.getStacksModel().isOpen(droppedDirtyEditor.resource)) { - return TPromise.as(false); - } - - // Resolve the contents of the dropped dirty resource from source - return this.backupFileService.resolveBackupContent(droppedDirtyEditor.backupResource).then(content => { - - // Set the contents of to the resource to the target - return this.backupFileService.backupResource(droppedDirtyEditor.resource, content.create(this.getDefaultEOL()).createSnapshot(true)); - }).then(() => false, () => false /* ignore any error */); - } - - private getDefaultEOL(): DefaultEndOfLine { - const eol = this.configurationService.getValue('files.eol'); - if (eol === '\r\n') { - return DefaultEndOfLine.CRLF; - } - - return DefaultEndOfLine.LF; - } - - private handleWorkspaceFileDrop(resources: (IDraggedResource | IDraggedEditor)[]): TPromise<boolean> { - const externalResources = resources.filter(d => d.isExternal).map(d => d.resource); - - const externalWorkspaceResources: { workspaces: URI[], folders: URI[] } = { - workspaces: [], - folders: [] - }; - - return TPromise.join(externalResources.map(resource => { - - // Check for Workspace - if (extname(resource.fsPath) === `.${WORKSPACE_EXTENSION}`) { - externalWorkspaceResources.workspaces.push(resource); - - return void 0; - } - - // Check for Folder - return this.fileService.resolveFile(resource).then(stat => { - if (stat.isDirectory) { - externalWorkspaceResources.folders.push(stat.resource); - } - }, error => void 0); - })).then(_ => { - const { workspaces, folders } = externalWorkspaceResources; - - // Return early if no external resource is a folder or workspace - if (workspaces.length === 0 && folders.length === 0) { - return false; - } - - // Pass focus to window - this.windowService.focusWindow(); - - let workspacesToOpen: TPromise<string[]>; - - // Open in separate windows if we drop workspaces or just one folder - if (workspaces.length > 0 || folders.length === 1) { - workspacesToOpen = TPromise.as([...workspaces, ...folders].map(resources => resources.fsPath)); - } - - // Multiple folders: Create new workspace with folders and open - else if (folders.length > 1) { - workspacesToOpen = this.workspacesService.createWorkspace(folders.map(folder => ({ uri: folder }))).then(workspace => [workspace.configPath]); - } - - // Open - workspacesToOpen.then(workspaces => { - this.windowsService.openWindow(workspaces, { forceReuseWindow: true }); - }); - - return true; - }); - } -} \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index de93ac69de4..a561a657600 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -87,9 +87,8 @@ function registerActiveEditorMoveCommand(): void { } function moveActiveEditor(args: ActiveEditorMoveArguments = {}, accessor: ServicesAccessor): void { - const showTabs = accessor.get(IEditorGroupService).getTabOptions().showTabs; args.to = args.to || ActiveEditorMovePositioning.RIGHT; - args.by = showTabs ? args.by || ActiveEditorMovePositioningBy.TAB : ActiveEditorMovePositioningBy.GROUP; + args.by = args.by || ActiveEditorMovePositioningBy.TAB; args.value = types.isUndefined(args.value) ? 1 : args.value; const activeEditor = accessor.get(IWorkbenchEditorService).getActiveEditor(); @@ -344,7 +343,7 @@ function registerEditorCommands() { return group.getEditor(c.editorIndex); } - return undefined; + return group.activeEditor; }).filter(input => !!input); if (inputs.length) { @@ -525,7 +524,7 @@ export function getMultiSelectedEditorContexts(editorContext: IEditorCommandsCon if (list instanceof List && list.isDOMFocused()) { const elementToContext = (element: IEditorIdentifier | EditorGroup) => element instanceof EditorGroup ? { groupId: element.id, editorIndex: undefined } : { groupId: element.group.id, editorIndex: element.group.indexOf(element.editor) }; - const onlyEditorGroupAndEditor = (e) => e instanceof EditorGroup || ('editor' in e && 'group' in e); + const onlyEditorGroupAndEditor = (e: IEditorIdentifier | EditorGroup) => e instanceof EditorGroup || ('editor' in e && 'group' in e); const focusedElements: (IEditorIdentifier | EditorGroup)[] = list.getFocusedElements().filter(onlyEditorGroupAndEditor); // need to take into account when editor context is { group: group } diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index bb490659d9f..0c500492a5c 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -26,7 +26,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { TabsTitleControl } from 'vs/workbench/browser/parts/editor/tabsTitleControl'; -import { TitleControl, ITitleAreaControl } from 'vs/workbench/browser/parts/editor/titleControl'; +import { ITitleAreaControl } from 'vs/workbench/browser/parts/editor/titleControl'; import { NoTabsTitleControl } from 'vs/workbench/browser/parts/editor/noTabsTitleControl'; import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup, EditorOptions, TextEditorOptions, IEditorIdentifier } from 'vs/workbench/common/editor'; import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; @@ -35,7 +35,7 @@ import { editorBackground, contrastBorder, activeContrastBorder } from 'vs/platf 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 { IDisposable, combinedDisposable } from 'vs/base/common/lifecycle'; -import { EditorAreaDropHandler } from 'vs/workbench/browser/parts/editor/editorAreaDropHandler'; +import { ResourcesDropHandler, LocalSelectionTransfer, DraggedEditorIdentifier } from 'vs/workbench/browser/dnd'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; export enum Rochade { @@ -137,6 +137,8 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro private onStacksChangeScheduler: RunOnceScheduler; private stacksChangedBuffer: IStacksModelChangeEvent[]; + private transfer = LocalSelectionTransfer.getInstance<DraggedEditorIdentifier>(); + constructor( parent: Builder, groupOrientation: GroupOrientation, @@ -1064,7 +1066,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro } function onDrop(e: DragEvent, position: Position, splitTo?: Position): void { - $this.updateFromDropping(node, false); + $this.updateFromDragAndDrop(node, false); cleanUp(); const editorService = $this.editorService; @@ -1074,8 +1076,8 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro const freeGroup = (stacks.groups.length === 1) ? Position.TWO : Position.THREE; // Check for transfer from title control - const draggedEditor = TitleControl.getDraggedEditor(); - if (draggedEditor) { + if ($this.transfer.hasData(DraggedEditorIdentifier.prototype)) { + const draggedEditor = $this.transfer.getData(DraggedEditorIdentifier.prototype)[0].identifier; const isCopy = (e.ctrlKey && !isMacintosh) || (e.altKey && isMacintosh); // Copy editor to new location @@ -1114,7 +1116,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Check for URI transfer else { - const dropHandler = $this.instantiationService.createInstance(EditorAreaDropHandler); + const dropHandler = $this.instantiationService.createInstance(ResourcesDropHandler, { allowWorkspaceOpen: true /* open workspace instead of file if dropped */ }); dropHandler.handleDrop(e, () => { if (splitEditor && splitTo !== freeGroup) { groupService.moveGroup(freeGroup, splitTo); @@ -1129,7 +1131,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro const target = <HTMLElement>e.target; const overlayIsSplit = typeof overlay.getProperty(splitToPropertyKey) === 'number'; const isCopy = (e.ctrlKey && !isMacintosh) || (e.altKey && isMacintosh); - const draggedEditor = TitleControl.getDraggedEditor(); + const draggedEditor = $this.transfer.hasData(DraggedEditorIdentifier.prototype) ? $this.transfer.getData(DraggedEditorIdentifier.prototype)[0].identifier : void 0; const overlaySize = $this.layoutVertically ? target.clientWidth : target.clientHeight; const splitThreshold = overlayIsSplit ? overlaySize / 5 : overlaySize / 10; @@ -1234,7 +1236,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // update the dropEffect, otherwise it would look like a "move" operation. but only if we are // not dragging a tab actually because there we support both moving as well as copying - if (!TabsTitleControl.getDraggedEditor()) { + if (!$this.transfer.hasData(DraggedEditorIdentifier.prototype)) { e.dataTransfer.dropEffect = 'copy'; } @@ -1268,14 +1270,14 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro DOM.EventHelper.stop(e, true); onDrop(e, Position.ONE); } else { - this.updateFromDropping(node, false); + this.updateFromDragAndDrop(node, false); } })); // 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()) { + if (!$this.transfer.hasData(DraggedEditorIdentifier.prototype)) { // 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 @@ -1286,7 +1288,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro } counter++; - this.updateFromDropping(node, true); + this.updateFromDragAndDrop(node, true); const target = <HTMLElement>e.target; if (target) { @@ -1296,7 +1298,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro createOverlay(target); if (overlay) { - this.updateFromDropping(node, false); // if we show an overlay, we can remove the drop feedback from the editor background + this.updateFromDragAndDrop(node, false); // if we show an overlay, we can remove the drop feedback from the editor background } } })); @@ -1305,7 +1307,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro this.toUnbind.push(DOM.addDisposableListener(node, DOM.EventType.DRAG_LEAVE, (e: DragEvent) => { counter--; if (counter === 0) { - this.updateFromDropping(node, false); + this.updateFromDragAndDrop(node, false); } })); @@ -1313,7 +1315,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro [node, window].forEach(container => { this.toUnbind.push(DOM.addDisposableListener(container, DOM.EventType.DRAG_END, (e: DragEvent) => { counter = 0; - this.updateFromDropping(node, false); + this.updateFromDragAndDrop(node, false); cleanUp(); })); }); @@ -1571,16 +1573,18 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro } } - private updateFromDropping(element: HTMLElement, isDropping: boolean): void { + private updateFromDragAndDrop(element: HTMLElement, isDraggedOver: boolean): void { const groupCount = this.stacks.groups.length; - const background = this.getColor(isDropping ? EDITOR_DRAG_AND_DROP_BACKGROUND : groupCount > 0 ? EDITOR_GROUP_BACKGROUND : null); + const background = this.getColor(isDraggedOver ? EDITOR_DRAG_AND_DROP_BACKGROUND : groupCount > 0 ? EDITOR_GROUP_BACKGROUND : null); element.style.backgroundColor = background; 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; + element.style.outlineColor = isDraggedOver ? activeContrastBorderColor : null; + element.style.outlineStyle = isDraggedOver && activeContrastBorderColor ? 'dashed' : null; + element.style.outlineWidth = isDraggedOver && activeContrastBorderColor ? '2px' : null; + element.style.outlineOffset = isDraggedOver && activeContrastBorderColor ? '-2px' : null; + + DOM.toggleClass(element, 'dragged-over', isDraggedOver); } private posSilo(pos: number, leftTop: string | number, rightBottom?: string | number, borderLeftTopWidth?: string | number): void { diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index 979df653a59..cea42aceaa9 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -9,7 +9,7 @@ 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 { IIconLabelValueOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; import { IAutoFocus, Mode, IEntryRunContext, IQuickNavigateConfiguration, IModel } from 'vs/base/parts/quickopen/common/quickOpen'; import { QuickOpenModel, QuickOpenEntry, QuickOpenEntryGroup, QuickOpenItemAccessor } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -39,7 +39,7 @@ export class EditorPickerEntry extends QuickOpenEntryGroup { this.stacks = editorGroupService.getStacksModel(); } - public getLabelOptions(): IIconLabelOptions { + public getLabelOptions(): IIconLabelValueOptions { return { extraClasses: getIconClasses(this.modelService, this.modeService, this.getResource()), italic: this._group.isPreview(this.editor) diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index 316633d8f8b..94103617f9b 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -52,13 +52,14 @@ import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { attachStylerCallback } from 'vs/platform/theme/common/styler'; import { widgetShadow, editorWidgetBackground } from 'vs/platform/theme/common/colorRegistry'; +import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; +import { deepClone } from 'vs/base/common/objects'; +import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; // TODO@Sandeep layer breaker // tslint:disable-next-line:import-patterns import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences'; -import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; -import { deepClone } from 'vs/base/common/objects'; -import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { Schemas } from 'vs/base/common/network'; function toEditorWithEncodingSupport(input: IEditorInput): IEncodingSupport { if (input instanceof SideBySideEditorInput) { @@ -814,7 +815,7 @@ export class ChangeModeAction extends Action { const resource = toResource(activeEditor.input, { supportSideBySide: true }); let hasLanguageSupport = !!resource; - if (resource.scheme === 'untitled' && !this.untitledEditorService.hasAssociatedFilePath(resource)) { + if (resource.scheme === Schemas.untitled && !this.untitledEditorService.hasAssociatedFilePath(resource)) { hasLanguageSupport = false; // no configuration for untitled resources (e.g. "Untitled-1") } diff --git a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x.svg b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x.svg deleted file mode 100644 index 12a8e9f981a..00000000000 --- a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.st0{opacity:0}.st0,.st1{fill:#f6f6f6}.st2{fill:#424242}</style><g id="outline"><path class="st0" d="M0 0h16v16H0z"/><path class="st1" d="M12 4v8H4V4h8z"/></g><path class="st2" d="M5 9h6v2H5V9zm0-4v2h6V5H5z" id="icon_x5F_bg"/><rect fill="#000000" x="1" y="1" width="14" height="14" fill-opacity="0" stroke="#424242"></rect></svg> diff --git a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x_inverse.svg b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x_inverse.svg deleted file mode 100644 index d44a01472d4..00000000000 --- a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpaceChecked_16x_inverse.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.st0{opacity:0}.st0,.st1{fill:#252526}.st2{fill:#c5c5c5}</style><g id="outline"><path class="st0" d="M0 0h16v16H0z"/><path class="st1" d="M12 4v8H4V4h8z"/></g><path class="st2" d="M5 9h6v2H5V9zm0-4v2h6V5H5z" id="icon_x5F_bg"/><rect fill="#000000" x="1" y="1" width="14" height="14" fill-opacity="0" stroke="#c5c5c5"></rect></svg> diff --git a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x.svg b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x.svg deleted file mode 100644 index 05b193a5d02..00000000000 --- a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.st0{opacity:0}.st0,.st1{fill:#f6f6f6}.st2{fill:#424242}</style><g id="outline"><path class="st0" d="M0 0h16v16H0z"/><path class="st1" d="M12 4v8H4V4h8z"/></g><path class="st2" d="M5 9h6v2H5V9zm0-4v2h6V5H5z" id="icon_x5F_bg"/></svg> \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x_inverse.svg b/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x_inverse.svg deleted file mode 100644 index 3b904eafa79..00000000000 --- a/src/vs/workbench/browser/parts/editor/media/IgnoreTrimWhiteSpace_16x_inverse.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.st0{opacity:0}.st0,.st1{fill:#252526}.st2{fill:#c5c5c5}</style><g id="outline"><path class="st0" d="M0 0h16v16H0z"/><path class="st1" d="M12 4v8H4V4h8z"/></g><path class="st2" d="M5 9h6v2H5V9zm0-4v2h6V5H5z" id="icon_x5F_bg"/></svg> \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/media/Paragraph_16x_nohalo.svg b/src/vs/workbench/browser/parts/editor/media/Paragraph_16x_nohalo.svg new file mode 100755 index 00000000000..60eb7c92c90 --- /dev/null +++ b/src/vs/workbench/browser/parts/editor/media/Paragraph_16x_nohalo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#f6f6f6;}.icon-canvas-transparent{opacity:0;}.icon-vs-bg{fill:#424242;}</style></defs><title>Paragraph_16x \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/media/Paragraph_16x_nohalo_inversep.svg b/src/vs/workbench/browser/parts/editor/media/Paragraph_16x_nohalo_inversep.svg new file mode 100755 index 00000000000..2cd7be5db69 --- /dev/null +++ b/src/vs/workbench/browser/parts/editor/media/Paragraph_16x_nohalo_inversep.svg @@ -0,0 +1 @@ +Paragraph_16x \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/media/tabstitle.css b/src/vs/workbench/browser/parts/editor/media/tabstitle.css index 3dcea34628f..7f00d3bfae4 100644 --- a/src/vs/workbench/browser/parts/editor/media/tabstitle.css +++ b/src/vs/workbench/browser/parts/editor/media/tabstitle.css @@ -87,11 +87,33 @@ margin-bottom: auto; } +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink .tab-label { + position: relative; +} + +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink > .tab-label::after { + content: ""; + position: absolute; + right: 0; + height: 100%; + width: 5px; + opacity: 1; + padding: 0; +} + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label, .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label > .monaco-icon-label-description-container { overflow: visible; /* fixes https://github.com/Microsoft/vscode/issues/20182 */ } +.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-description-container { + text-overflow: clip; +} + +.hc-black .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-description-container { + text-overflow: ellipsis; +} + .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab .monaco-icon-label::before { height: 16px; /* tweak the icon size of the editor labels when icons are enabled */ } diff --git a/src/vs/workbench/browser/parts/editor/media/textdiffeditor.css b/src/vs/workbench/browser/parts/editor/media/textdiffeditor.css index 86c6b735e47..9fb019fa1ae 100644 --- a/src/vs/workbench/browser/parts/editor/media/textdiffeditor.css +++ b/src/vs/workbench/browser/parts/editor/media/textdiffeditor.css @@ -22,17 +22,19 @@ } .vs .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace { - background: url('IgnoreTrimWhiteSpace_16x.svg') center center no-repeat; + opacity: 1; + background: url('Paragraph_16x_nohalo.svg') center center no-repeat; } .vs-dark .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace, .hc-black .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace { - background: url('IgnoreTrimWhiteSpace_16x_inverse.svg ') center center no-repeat; + opacity: 1; + background: url('Paragraph_16x_nohalo_inversep.svg') center center no-repeat; } .vs .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace.is-checked { - background: url('IgnoreTrimWhiteSpaceChecked_16x.svg') center center no-repeat; + opacity: 0.5; } .vs-dark .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace.is-checked, .hc-black .monaco-workbench .textdiff-editor-action.toggleIgnoreTrimWhitespace.is-checked { - background: url('IgnoreTrimWhiteSpaceChecked_16x_inverse.svg ') center center no-repeat; + opacity: 0.5; } diff --git a/src/vs/workbench/browser/parts/editor/resourceViewer.ts b/src/vs/workbench/browser/parts/editor/resourceViewer.ts index 6ccfa4c8786..363eccbb995 100644 --- a/src/vs/workbench/browser/parts/editor/resourceViewer.ts +++ b/src/vs/workbench/browser/parts/editor/resourceViewer.ts @@ -91,10 +91,6 @@ export interface IResourceDescriptor { mime: string; } -enum ScaleDirection { - IN, OUT, -} - class BinarySize { public static readonly KB = 1024; public static readonly MB = BinarySize.KB * BinarySize.KB; @@ -123,7 +119,7 @@ class BinarySize { } export interface ResourceViewerContext { - layout(dimension: Dimension); + layout(dimension: Dimension): void; } /** @@ -156,7 +152,7 @@ export class ResourceViewer { private static getMime(descriptor: IResourceDescriptor): string { let mime = descriptor.mime; - if (!mime && descriptor.resource.scheme === Schemas.file) { + if (!mime && descriptor.resource.scheme !== Schemas.data) { const ext = paths.extname(descriptor.resource.toString()); if (ext) { mime = mapExtToMediaMimes[ext.toLowerCase()]; @@ -391,7 +387,9 @@ class InlineImageView { const cacheKey = descriptor.resource.toString(); - let scaleDirection = ScaleDirection.IN; + let ctrlPressed = false; + let altPressed = false; + const initialState: ImageState = InlineImageView.imageStateCache.get(cacheKey) || { scale: 'fit', offsetX: 0, offsetY: 0 }; let scale = initialState.scale; let img: Builder | null = null; @@ -455,9 +453,10 @@ class InlineImageView { if (!img) { return; } + ctrlPressed = e.ctrlKey; + altPressed = e.altKey; - if (platform.isMacintosh ? e.altKey : e.ctrlKey) { - scaleDirection = ScaleDirection.OUT; + if (platform.isMacintosh ? altPressed : ctrlPressed) { c.removeClass('zoom-in').addClass('zoom-out'); } }) @@ -466,8 +465,10 @@ class InlineImageView { return; } - if (!(platform.isMacintosh ? e.altKey : e.ctrlKey)) { - scaleDirection = ScaleDirection.IN; + ctrlPressed = e.ctrlKey; + altPressed = e.altKey; + + if (!(platform.isMacintosh ? altPressed : ctrlPressed)) { c.removeClass('zoom-out').addClass('zoom-in'); } }) @@ -485,7 +486,7 @@ class InlineImageView { firstZoom(); } - if (scaleDirection === ScaleDirection.IN) { + if (!(platform.isMacintosh ? altPressed : ctrlPressed)) { // zoom in let i = 0; for (; i < InlineImageView.zoomLevels.length; ++i) { if (InlineImageView.zoomLevels[i] > scale) { @@ -507,8 +508,9 @@ class InlineImageView { if (!img) { return; } - // pinching is reported as scroll wheel + ctrl - if (!e.ctrlKey) { + + const isScrollWhellKeyPressed = platform.isMacintosh ? altPressed : ctrlPressed; + if (!isScrollWhellKeyPressed && !e.ctrlKey) { // pinching is reported as scroll wheel + ctrl return; } @@ -519,8 +521,12 @@ class InlineImageView { firstZoom(); } - // scrolling up, pinching out should increase the scale - const delta = e.deltaY < 0 ? 1 : -1; + let delta = e.deltaY < 0 ? 1 : -1; + + // Pinching should increase the scale + if (e.ctrlKey && !isScrollWhellKeyPressed) { + delta *= -1; + } updateScale(scale as number * (1 - delta * InlineImageView.SCALE_PINCH_FACTOR)); }) .on(DOM.EventType.SCROLL, () => { diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 425dd7e5828..035c3f8d04c 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -11,8 +11,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import errors = require('vs/base/common/errors'); import DOM = require('vs/base/browser/dom'); import { isMacintosh } from 'vs/base/common/platform'; -import { MIME_BINARY } from 'vs/base/common/mime'; -import { shorten, getPathLabel } from 'vs/base/common/labels'; +import { shorten } from 'vs/base/common/labels'; import { ActionRunner, IAction } from 'vs/base/common/actions'; import { Position, IEditorInput, Verbosity, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; import { IEditorGroup, toResource } from 'vs/workbench/common/editor'; @@ -35,19 +34,15 @@ import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IDisposable, dispose, combinedDisposable } from 'vs/base/common/lifecycle'; import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; -import { CodeDataTransfers, ISerializedDraggedEditor } from 'vs/workbench/browser/editor'; import { getOrSet } from 'vs/base/common/map'; 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, TAB_UNFOCUSED_ACTIVE_FOREGROUND, TAB_UNFOCUSED_INACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_BORDER, TAB_ACTIVE_BORDER, TAB_HOVER_BACKGROUND, TAB_HOVER_BORDER, TAB_UNFOCUSED_HOVER_BACKGROUND, TAB_UNFOCUSED_HOVER_BORDER } from 'vs/workbench/common/theme'; -import { activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +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, TAB_UNFOCUSED_ACTIVE_BORDER, TAB_ACTIVE_BORDER, TAB_HOVER_BACKGROUND, TAB_HOVER_BORDER, TAB_UNFOCUSED_HOVER_BACKGROUND, TAB_UNFOCUSED_HOVER_BORDER, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_BACKGROUND, WORKBENCH_BACKGROUND } from 'vs/workbench/common/theme'; +import { activeContrastBorder, contrastBorder, editorBackground } from 'vs/platform/theme/common/colorRegistry'; import { Dimension } from 'vs/base/browser/builder'; import { scheduleAtNextAnimationFrame } from 'vs/base/browser/dom'; -import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; -import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { DataTransfers } from 'vs/base/browser/dnd'; -import { EditorAreaDropHandler } from 'vs/workbench/browser/parts/editor/editorAreaDropHandler'; -import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; +import { ResourcesDropHandler, fillResourceDataTransfers, LocalSelectionTransfer, DraggedEditorIdentifier } from 'vs/workbench/browser/dnd'; +import { Color } from 'vs/base/common/color'; interface IEditorInputLabel { name: string; @@ -68,6 +63,7 @@ export class TabsTitleControl extends TitleControl { private blockRevealActiveTab: boolean; private dimension: Dimension; private layoutScheduled: IDisposable; + private transfer = LocalSelectionTransfer.getInstance(); constructor( @IContextMenuService contextMenuService: IContextMenuService, @@ -80,9 +76,7 @@ export class TabsTitleControl extends TitleControl { @IMessageService messageService: IMessageService, @IMenuService menuService: IMenuService, @IQuickOpenService quickOpenService: IQuickOpenService, - @IThemeService themeService: IThemeService, - @ITextFileService private textFileService: ITextFileService, - @IBackupFileService private backupFileService: IBackupFileService + @IThemeService themeService: IThemeService ) { super(contextMenuService, instantiationService, editorService, editorGroupService, contextKeyService, keybindingService, telemetryService, messageService, menuService, quickOpenService, themeService); @@ -173,7 +167,7 @@ export class TabsTitleControl extends TitleControl { // Drag over this.toUnbind.push(DOM.addDisposableListener(this.tabsContainer, DOM.EventType.DRAG_OVER, (e: DragEvent) => { - const draggedEditor = TabsTitleControl.getDraggedEditor(); + const draggedEditor = this.transfer.hasData(DraggedEditorIdentifier.prototype) ? this.transfer.getData(DraggedEditorIdentifier.prototype)[0].identifier : void 0; // update the dropEffect, otherwise it would look like a "move" operation. but only if we are // not dragging a tab actually because there we support both moving as well as copying @@ -624,7 +618,7 @@ export class TabsTitleControl extends TitleControl { private hookTabListeners(tab: HTMLElement, index: number): IDisposable { const disposables: IDisposable[] = []; - const handleClickOrTouch = (e: MouseEvent | GestureEvent) => { + const handleClickOrTouch = (e: MouseEvent | GestureEvent): void => { tab.blur(); if (e instanceof MouseEvent && e.button !== 0) { @@ -750,29 +744,14 @@ export class TabsTitleControl extends TitleControl { disposables.push(DOM.addDisposableListener(tab, DOM.EventType.DRAG_START, (e: DragEvent) => { const { group, editor } = this.getGroupPositionAndEditor(index); - this.onEditorDragStart({ editor, group }); + this.transfer.setData([new DraggedEditorIdentifier({ editor, group })], DraggedEditorIdentifier.prototype); + e.dataTransfer.effectAllowed = 'copyMove'; - // Insert transfer accordingly + // Apply some datatransfer types to allow for dragging the element outside of the application const resource = toResource(editor, { supportSideBySide: true }); if (resource) { - const resourceStr = resource.toString(); - - e.dataTransfer.setData(DataTransfers.TEXT, getPathLabel(resource)); // enables dropping tab resource path into text controls - - if (resource.scheme === 'file') { - e.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, editor.getName(), resourceStr].join(':')); // enables support to drag a tab as file to desktop - } - - // Prepare IDraggedEditor transfer - const activeEditor = this.editorService.getActiveEditor(); - const draggedEditor: ISerializedDraggedEditor = { - resource: resourceStr, - backupResource: this.textFileService.isDirty(resource) ? this.backupFileService.toBackupResource(resource).toString() : void 0, - viewState: activeEditor instanceof BaseTextEditor ? activeEditor.getControl().saveViewState() : void 0 - }; - - e.dataTransfer.setData(CodeDataTransfers.EDITOR, JSON.stringify(draggedEditor)); // enables cross window DND of tabs into the editor area + this.instantiationService.invokeFunction(fillResourceDataTransfers, [resource], e); } // Fixes https://github.com/Microsoft/vscode/issues/18733 @@ -793,7 +772,7 @@ export class TabsTitleControl extends TitleControl { // Find out if the currently dragged editor is this tab and in that // case we do not want to show any drop feedback let draggedEditorIsTab = false; - const draggedEditor = TabsTitleControl.getDraggedEditor(); + const draggedEditor = this.transfer.hasData(DraggedEditorIdentifier.prototype) ? this.transfer.getData(DraggedEditorIdentifier.prototype)[0].identifier : void 0; if (draggedEditor) { const { group, editor } = this.getGroupPositionAndEditor(index); if (draggedEditor.editor === editor && draggedEditor.group === group) { @@ -823,7 +802,7 @@ export class TabsTitleControl extends TitleControl { DOM.removeClass(tab, 'dragged-over'); this.updateDropFeedback(tab, false, index); - this.onEditorDragEnd(); + this.transfer.clearData(); })); // Drop @@ -859,7 +838,7 @@ export class TabsTitleControl extends TitleControl { DOM.removeClass(this.tabsContainer, 'scroll'); // Local DND - const draggedEditor = TabsTitleControl.getDraggedEditor(); + const draggedEditor = this.transfer.hasData(DraggedEditorIdentifier.prototype) ? this.transfer.getData(DraggedEditorIdentifier.prototype)[0].identifier : void 0; if (draggedEditor) { // Move editor to target position and index @@ -872,12 +851,12 @@ export class TabsTitleControl extends TitleControl { this.editorService.openEditor(draggedEditor.editor, { pinned: true, index: targetIndex }, targetPosition).done(null, errors.onUnexpectedError); } - this.onEditorDragEnd(); + this.transfer.clearData(); } // External DND else { - const dropHandler = this.instantiationService.createInstance(EditorAreaDropHandler); + const dropHandler = this.instantiationService.createInstance(ResourcesDropHandler, { allowWorkspaceOpen: false /* open workspace file as file if dropped */ }); dropHandler.handleDrop(e, () => this.editorGroupService.focusGroup(targetPosition), targetPosition, targetIndex); } } @@ -974,4 +953,96 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } `); } + + // Fade out styles via linear gradient (when tabs are set to shrink) + if (theme.type !== 'hc') { + const workbenchBackground = WORKBENCH_BACKGROUND(theme); + const editorBackgroundColor = theme.getColor(editorBackground); + const editorGroupBackground = theme.getColor(EDITOR_GROUP_BACKGROUND); + const editorGroupHeaderTabsBackground = theme.getColor(EDITOR_GROUP_HEADER_TABS_BACKGROUND); + const editorDragAndDropBackground = theme.getColor(EDITOR_DRAG_AND_DROP_BACKGROUND); + + let adjustedTabBackground: Color; + if (editorGroupHeaderTabsBackground && editorBackgroundColor && editorGroupBackground) { + adjustedTabBackground = editorGroupHeaderTabsBackground.flatten(editorBackgroundColor, editorGroupBackground, editorBackgroundColor, workbenchBackground); + } + + let adjustedTabDragBackground: Color; + if (editorGroupHeaderTabsBackground && editorBackgroundColor && editorDragAndDropBackground && editorBackgroundColor) { + adjustedTabDragBackground = editorGroupHeaderTabsBackground.flatten(editorBackgroundColor, editorDragAndDropBackground, editorBackgroundColor, workbenchBackground); + } + + // Adjust gradient for (focused) hover background + if (tabHoverBackground && adjustedTabBackground && adjustedTabDragBackground) { + const adjustedColor = tabHoverBackground.flatten(adjustedTabBackground); + const adjustedColorDrag = tabHoverBackground.flatten(adjustedTabDragBackground); + collector.addRule(` + .monaco-workbench > .part.editor > .content:not(.dragged-over) > .one-editor-silo > .container > .title.active .tabs-container > .tab.sizing-shrink:not(.dragged):hover > .tab-label::after { + background: linear-gradient(to left, ${adjustedColor}, transparent); + } + + .monaco-workbench > .part.editor > .content.dragged-over > .one-editor-silo > .container > .title.active .tabs-container > .tab.sizing-shrink:not(.dragged):hover > .tab-label::after { + background: linear-gradient(to left, ${adjustedColorDrag}, transparent); + } + `); + } + + // Adjust gradient for unfocused hover background + if (tabUnfocusedHoverBackground && adjustedTabBackground && adjustedTabDragBackground) { + const adjustedColor = tabUnfocusedHoverBackground.flatten(adjustedTabBackground); + const adjustedColorDrag = tabUnfocusedHoverBackground.flatten(adjustedTabDragBackground); + collector.addRule(` + .monaco-workbench > .part.editor > .content:not(.dragged-over) > .one-editor-silo > .container > .title.inactive .tabs-container > .tab.sizing-shrink:not(.dragged):hover > .tab-label::after { + background: linear-gradient(to left, ${adjustedColor}, transparent); + } + + .monaco-workbench > .part.editor > .content.dragged-over > .one-editor-silo > .container > .title.inactive .tabs-container > .tab.sizing-shrink:not(.dragged):hover > .tab-label::after { + background: linear-gradient(to left, ${adjustedColorDrag}, transparent); + } + `); + } + + // Adjust gradient for drag and drop background + if (editorDragAndDropBackground && adjustedTabDragBackground) { + const adjustedColorDrag = editorDragAndDropBackground.flatten(adjustedTabDragBackground); + collector.addRule(` + .monaco-workbench > .part.editor > .content.dragged-over > .one-editor-silo > .container > .title.active .tabs-container > .tab.sizing-shrink.dragged-over:not(.active):not(.dragged) > .tab-label::after, + .monaco-workbench > .part.editor > .content.dragged-over > .one-editor-silo > .container > .title.inactive .tabs-container > .tab.sizing-shrink.dragged-over:not(.dragged) > .tab-label::after { + background: linear-gradient(to left, ${adjustedColorDrag}, transparent); + } + `); + } + + // Adjust gradient for active tab background + const tabActiveBackground = theme.getColor(TAB_ACTIVE_BACKGROUND); + if (tabActiveBackground && adjustedTabBackground && adjustedTabDragBackground) { + const adjustedColor = tabActiveBackground.flatten(adjustedTabBackground); + const adjustedColorDrag = tabActiveBackground.flatten(adjustedTabDragBackground); + collector.addRule(` + .monaco-workbench > .part.editor > .content:not(.dragged-over) > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink.active:not(.dragged) > .tab-label::after { + background: linear-gradient(to left, ${adjustedColor}, transparent); + } + + .monaco-workbench > .part.editor > .content.dragged-over > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink.active:not(.dragged) > .tab-label::after { + background: linear-gradient(to left, ${adjustedColorDrag}, transparent); + } + `); + } + + // Adjust gradient for inactive tab background + const tabInactiveBackground = theme.getColor(TAB_INACTIVE_BACKGROUND); + if (tabInactiveBackground && adjustedTabBackground && adjustedTabDragBackground) { + const adjustedColor = tabInactiveBackground.flatten(adjustedTabBackground); + const adjustedColorDrag = tabInactiveBackground.flatten(adjustedTabDragBackground); + collector.addRule(` + .monaco-workbench > .part.editor > .content:not(.dragged-over) > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink:not(.dragged) > .tab-label::after { + background: linear-gradient(to left, ${adjustedColor}, transparent); + } + + .monaco-workbench > .part.editor > .content.dragged-over > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-shrink:not(.dragged) > .tab-label::after { + background: linear-gradient(to left, ${adjustedColorDrag}, transparent); + } + `); + } + } }); diff --git a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts index 51ffdd90f11..7fba798b626 100644 --- a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts @@ -16,7 +16,7 @@ import types = require('vs/base/common/types'); 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, EditorInput, EditorOptions, TEXT_DIFF_EDITOR_ID, IFileEditorInput } from 'vs/workbench/common/editor'; +import { TextEditorOptions, EditorInput, EditorOptions, TEXT_DIFF_EDITOR_ID, IEditorInputFactoryRegistry, Extensions as EditorInputExtensions } from 'vs/workbench/common/editor'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { DiffNavigator } from 'vs/editor/browser/widget/diffNavigator'; @@ -32,10 +32,10 @@ import { IWorkbenchEditorService, DelegatingWorkbenchEditorService } from 'vs/wo import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { IEditorInput } from 'vs/platform/editor/common/editor'; import { ScrollType } from 'vs/editor/common/editorCommon'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IDisposable } from 'vs/base/common/lifecycle'; +import { Registry } from 'vs/platform/registry/common/platform'; /** * The text editor that leverages the diff text editor for the editing experience. @@ -205,12 +205,13 @@ export class TextDiffEditor extends BaseTextEditor { const binaryDiffInput = new DiffEditorInput(input.getName(), input.getDescription(), originalInput, modifiedInput, true); // Forward binary flag to input if supported - if (types.isFunction(((originalInput as IEditorInput) as IFileEditorInput).setForceOpenAsBinary)) { - ((originalInput as IEditorInput) as IFileEditorInput).setForceOpenAsBinary(); + const fileInputFactory = Registry.as(EditorInputExtensions.EditorInputFactories).getFileInputFactory(); + if (fileInputFactory.isFileInput(originalInput)) { + originalInput.setForceOpenAsBinary(); } - if (types.isFunction(((modifiedInput as IEditorInput) as IFileEditorInput).setForceOpenAsBinary)) { - ((modifiedInput as IEditorInput) as IFileEditorInput).setForceOpenAsBinary(); + if (fileInputFactory.isFileInput(modifiedInput)) { + modifiedInput.setForceOpenAsBinary(); } this.editorService.openEditor(binaryDiffInput, options, this.position).done(null, onUnexpectedError); diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index a4dba3d6963..2f2028aa133 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -60,8 +60,6 @@ export interface ITitleAreaControl { export abstract class TitleControl extends Themable implements ITitleAreaControl { - private static draggedEditor: IEditorIdentifier; - protected stacks: IEditorStacksModel; protected context: IEditorGroup; @@ -115,22 +113,10 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl this.registerListeners(); } - public static getDraggedEditor(): IEditorIdentifier { - return TitleControl.draggedEditor; - } - public setDragged(dragged: boolean): void { this.dragged = dragged; } - protected onEditorDragStart(editor: IEditorIdentifier): void { - TitleControl.draggedEditor = editor; - } - - protected onEditorDragEnd(): void { - TitleControl.draggedEditor = void 0; - } - private registerListeners(): void { this.toUnbind.push(this.stacks.onModelChanged(e => this.onStacksChanged(e))); } diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 935b7d8bed5..0ef84d14de7 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -11,14 +11,13 @@ import nls = require('vs/nls'); import * as browser from 'vs/base/browser/browser'; import { Dimension, withElementById } from 'vs/base/browser/builder'; import strings = require('vs/base/common/strings'); -import filters = require('vs/base/common/filters'); import DOM = require('vs/base/browser/dom'); import URI from 'vs/base/common/uri'; import * as resources from 'vs/base/common/resources'; import { defaultGenerator } from 'vs/base/common/idGenerator'; import types = require('vs/base/common/types'); import { Action, IAction } from 'vs/base/common/actions'; -import { IIconLabelOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; +import { IIconLabelValueOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; import { CancellationToken } from 'vs/base/common/cancellation'; import { Mode, IEntryRunContext, IAutoFocus, IQuickNavigateConfiguration, IModel } from 'vs/base/parts/quickopen/common/quickOpen'; import { QuickOpenEntry, QuickOpenModel, QuickOpenEntryGroup, compareEntries, QuickOpenItemAccessorClass } from 'vs/base/parts/quickopen/browser/quickOpenModel'; @@ -55,6 +54,9 @@ import { FileKind, IFileService } from 'vs/platform/files/common/files'; import { scoreItem, ScorerCache, compareItemsByScore, prepareQuery } from 'vs/base/parts/quickopen/common/quickOpenScorer'; import { getBaseLabel } from 'vs/base/common/labels'; import { WorkbenchTree } from 'vs/platform/list/browser/listService'; +import { matchesFuzzyOcticonAware, parseOcticons, IParsedOcticons } from 'vs/base/common/octicon'; +import { IMatch } from 'vs/base/common/filters'; +import { Schemas } from 'vs/base/common/network'; const HELP_PREFIX = '?'; @@ -180,7 +182,7 @@ export class QuickOpenController extends Component implements IQuickOpenService // open quick pick with just one choice. we will recurse whenever // the validation/success message changes - this.doPick(TPromise.as([{ label: currentPick }]), { + this.doPick(TPromise.as([{ label: currentPick, tooltip: currentPick /* make sure message/validation can be read through the hover */ }]), { ignoreFocusLost: options.ignoreFocusLost, autoFocus: { autoFocusFirstEntry: true }, password: options.password, @@ -431,12 +433,10 @@ export class QuickOpenController extends Component implements IQuickOpenService }); } - // Filter by value + // Filter by value (since we support octicons, use octicon aware fuzzy matching) else { entries.forEach(entry => { - const labelHighlights = filters.matchesFuzzy(value, entry.getLabel()); - const descriptionHighlights = options.matchOnDescription && filters.matchesFuzzy(value, entry.getDescription()); - const detailHighlights = options.matchOnDetail && entry.getDetail() && filters.matchesFuzzy(value, entry.getDetail()); + const { labelHighlights, descriptionHighlights, detailHighlights } = entry.matchesFuzzy(value, options); if (entry.shouldAlwaysShow() || labelHighlights || descriptionHighlights || detailHighlights) { entry.setHighlights(labelHighlights, descriptionHighlights, detailHighlights); @@ -1024,6 +1024,8 @@ class PickOpenEntry extends PlaceholderQuickOpenEntry implements IPickOpenItem { private _shouldRunWithContext: IEntryRunContext; private description: string; private detail: string; + private tooltip: string; + private descriptionTooltip: string; private hasSeparator: boolean; private separatorLabel: string; private alwaysShow: boolean; @@ -1032,6 +1034,9 @@ class PickOpenEntry extends PlaceholderQuickOpenEntry implements IPickOpenItem { private _action: IAction; private removed: boolean; private payload: any; + private labelOcticons: IParsedOcticons; + private descriptionOcticons: IParsedOcticons; + private detailOcticons: IParsedOcticons; constructor( item: IPickOpenEntry, @@ -1045,6 +1050,9 @@ class PickOpenEntry extends PlaceholderQuickOpenEntry implements IPickOpenItem { this.description = item.description; this.detail = item.detail; + this.tooltip = item.tooltip; + this.descriptionOcticons = item.description ? parseOcticons(item.description) : void 0; + this.descriptionTooltip = this.descriptionOcticons ? this.descriptionOcticons.text : void 0; this.hasSeparator = item.separator && item.separator.border; this.separatorLabel = item.separator && item.separator.label; this.alwaysShow = item.alwaysShow; @@ -1056,6 +1064,23 @@ class PickOpenEntry extends PlaceholderQuickOpenEntry implements IPickOpenItem { this.fileKind = fileItem.fileKind; } + public matchesFuzzy(query: string, options: IInternalPickOptions): { labelHighlights: IMatch[], descriptionHighlights: IMatch[], detailHighlights: IMatch[] } { + if (!this.labelOcticons) { + this.labelOcticons = parseOcticons(this.getLabel()); // parse on demand + } + + const detail = this.getDetail(); + if (detail && options.matchOnDetail && !this.detailOcticons) { + this.detailOcticons = parseOcticons(detail); // parse on demand + } + + return { + labelHighlights: matchesFuzzyOcticonAware(query, this.labelOcticons), + descriptionHighlights: options.matchOnDescription && this.descriptionOcticons ? matchesFuzzyOcticonAware(query, this.descriptionOcticons) : void 0, + detailHighlights: options.matchOnDetail && this.detailOcticons ? matchesFuzzyOcticonAware(query, this.detailOcticons) : void 0 + }; + } + public getPayload(): any { return this.payload; } @@ -1079,7 +1104,7 @@ class PickOpenEntry extends PlaceholderQuickOpenEntry implements IPickOpenItem { return this._index; } - public getLabelOptions(): IIconLabelOptions { + public getLabelOptions(): IIconLabelValueOptions { return { extraClasses: this.resource ? getIconClasses(this.modelService, this.modeService, this.resource, this.fileKind) : [] }; @@ -1097,6 +1122,14 @@ class PickOpenEntry extends PlaceholderQuickOpenEntry implements IPickOpenItem { return this.detail; } + public getTooltip(): string { + return this.tooltip; + } + + public getDescriptionTooltip(): string { + return this.descriptionTooltip; + } + public showBorder(): boolean { return this.hasSeparator; } @@ -1276,7 +1309,7 @@ export class EditorHistoryEntry extends EditorQuickOpenEntry { return this.label; } - public getLabelOptions(): IIconLabelOptions { + public getLabelOptions(): IIconLabelValueOptions { return { extraClasses: getIconClasses(this.modelService, this.modeService, this.resource) }; @@ -1321,7 +1354,7 @@ function resourceForEditorHistory(input: EditorInput, fileService: IFileService) // For the editor history we only prefer resources that are either untitled or // can be handled by the file service which indicates they are editable resources. - if (resource && (fileService.canHandleResource(resource) || resource.scheme === 'untitled')) { + if (resource && (fileService.canHandleResource(resource) || resource.scheme === Schemas.untitled)) { return resource; } diff --git a/src/vs/workbench/browser/parts/views/customView.ts b/src/vs/workbench/browser/parts/views/customView.ts new file mode 100644 index 00000000000..f276597e0e2 --- /dev/null +++ b/src/vs/workbench/browser/parts/views/customView.ts @@ -0,0 +1,602 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * 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 * as errors from 'vs/base/common/errors'; +import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; +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 { $ } from 'vs/base/browser/builder'; +import { LIGHT } from 'vs/platform/theme/common/themeService'; +import { ITree, IDataSource, IRenderer, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree'; +import { TreeItemCollapsibleState, ITreeItem, ITreeViewer, ICustomViewsService, ITreeViewDataProvider, ViewsRegistry, IViewDescriptor, TreeViewItemHandleArg, ICustomViewDescriptor } from 'vs/workbench/common/views'; +import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; +import { IExtensionService } from 'vs/platform/extensions/common/extensions'; +import { IProgressService2, ProgressLocation } from 'vs/platform/progress/common/progress'; +import { ResourceLabel } from 'vs/workbench/browser/labels'; +import { ActionBar, IActionItemProvider, ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; +import URI from 'vs/base/common/uri'; +import { basename } from 'vs/base/common/paths'; +import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; +import { WorkbenchTreeController } from 'vs/platform/list/browser/listService'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IAction, ActionRunner } from 'vs/base/common/actions'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; +import { fillInActions, ContextAwareMenuItemActionItem } from 'vs/platform/actions/browser/menuItemActionItem'; +import { FileKind } from 'vs/platform/files/common/files'; +import { ICommandService } from 'vs/platform/commands/common/commands'; +import { FileIconThemableWorkbenchTree } from 'vs/workbench/browser/parts/views/viewsViewlet'; + +export class CustomViewsService extends Disposable implements ICustomViewsService { + + _serviceBrand: any; + + private viewers: Map = new Map(); + + constructor( + @IInstantiationService private instantiationService: IInstantiationService + ) { + super(); + this.createViewers(ViewsRegistry.getAllViews()); + this._register(ViewsRegistry.onViewsRegistered(viewDescriptors => this.createViewers(viewDescriptors))); + this._register(ViewsRegistry.onViewsDeregistered(viewDescriptors => this.removeViewers(viewDescriptors))); + } + + getTreeViewer(id: string): ITreeViewer { + return this.viewers.get(id); + } + + registerTreeViewDataProvider(id: string, dataProvider: ITreeViewDataProvider): void { + const treeViewer = this.getTreeViewer(id); + if (treeViewer) { + treeViewer.setDataProvider(dataProvider); + dataProvider.onDispose(() => treeViewer.setDataProvider(null)); + } + } + + private createViewers(viewDescriptors: IViewDescriptor[]): void { + for (const viewDescriptor of viewDescriptors) { + if ((viewDescriptor).treeView) { + this.viewers.set(viewDescriptor.id, this.instantiationService.createInstance(CustomTreeViewer, viewDescriptor.id)); + } + } + } + + private removeViewers(viewDescriptors: IViewDescriptor[]): void { + for (const { id } of viewDescriptors) { + const viewer = this.getTreeViewer(id); + if (viewer) { + viewer.dispose(); + this.viewers.delete(id); + } + } + } +} + +class Root implements ITreeItem { + label = 'root'; + handle = '0'; + parentHandle = null; + collapsibleState = TreeItemCollapsibleState.Expanded; + children = void 0; +} + +class CustomTreeViewer extends Disposable implements ITreeViewer { + + private isVisible: boolean = false; + private activated: boolean = false; + private _hasIconForParentNode = false; + private _hasIconForLeafNode = false; + + private _onDidIconsChange: Emitter = this._register(new Emitter()); + readonly onDidIconsChange: Event = this._onDidIconsChange.event; + + private treeContainer: HTMLElement; + private tree: FileIconThemableWorkbenchTree; + private root: ITreeItem; + private elementsToRefresh: ITreeItem[] = []; + private refreshing = 0; + + private _dataProvider: ITreeViewDataProvider; + private dataProviderElementChangeListener: IDisposable; + + constructor( + private id: string, + @IExtensionService private extensionService: IExtensionService, + @IWorkbenchThemeService private themeService: IWorkbenchThemeService, + @IInstantiationService private instantiationService: IInstantiationService, + @ICommandService private commandService: ICommandService + ) { + super(); + this.root = new Root(); + this._register(this.themeService.onDidFileIconThemeChange(() => this.doRefresh([this.root]) /** soft refresh **/)); + this._register(this.themeService.onThemeChange(() => this.doRefresh([this.root]) /** soft refresh **/)); + } + + get dataProvider(): ITreeViewDataProvider { + return this._dataProvider; + } + + setDataProvider(dataProvider: ITreeViewDataProvider) { + if (this.dataProviderElementChangeListener) { + this.dataProviderElementChangeListener.dispose(); + } + if (dataProvider) { + const customTreeView: CustomTreeViewer = this; + this._dataProvider = new class implements ITreeViewDataProvider { + onDidChange = dataProvider.onDidChange; + onDispose = dataProvider.onDispose; + getChildren(node?: ITreeItem): TPromise { + if (node.children) { + return TPromise.as(node.children); + } + const promise = node instanceof Root ? dataProvider.getChildren() : dataProvider.getChildren(node); + return promise.then(children => { + node.children = children; + if (!customTreeView.refreshing) { + customTreeView.updateIconsAvailability(node); + } + return children; + }); + } + }; + this.dataProviderElementChangeListener = this._register(dataProvider.onDidChange(elements => this.refresh(elements))); + } else { + this._dataProvider = null; + } + this.refresh(); + } + + get hasIconForParentNode(): boolean { + return this._hasIconForParentNode; + } + + get hasIconForLeafNode(): boolean { + return this._hasIconForLeafNode; + } + + setVisibility(isVisible: boolean): void { + if (this.isVisible === isVisible) { + return; + } + + this.isVisible = isVisible; + if (this.isVisible) { + this.activate(); + } + + if (this.tree) { + if (this.isVisible) { + $(this.tree.getHTMLElement()).show(); + } else { + $(this.tree.getHTMLElement()).hide(); // make sure the tree goes out of the tabindex world by hiding it + } + + if (this.isVisible) { + this.tree.onVisible(); + } else { + this.tree.onHidden(); + } + + if (this.isVisible && this.elementsToRefresh.length) { + this.doRefresh(this.elementsToRefresh); + this.elementsToRefresh = []; + } + } + } + + focus(): void { + if (this.tree) { + // Make sure the current selected element is revealed + const selectedElement = this.tree.getSelection()[0]; + if (selectedElement) { + this.tree.reveal(selectedElement, 0.5).done(null, errors.onUnexpectedError); + } + + // Pass Focus to Viewer + this.tree.DOMFocus(); + } + } + + render(container: HTMLElement): void { + this.treeContainer = DOM.append(container, DOM.$('.tree-explorer-viewlet-tree-view')); + + const actionItemProvider = (action: IAction) => action instanceof MenuItemAction ? this.instantiationService.createInstance(ContextAwareMenuItemActionItem, action) : undefined; + const menus = this.instantiationService.createInstance(Menus, this.id); + const dataSource = this.instantiationService.createInstance(TreeDataSource, this); + const renderer = this.instantiationService.createInstance(TreeRenderer, this.id, this, menus, actionItemProvider); + const controller = this.instantiationService.createInstance(TreeController, this.id, menus); + this.tree = this.instantiationService.createInstance(FileIconThemableWorkbenchTree, + this.treeContainer, + { dataSource, renderer, controller }, + {} + ); + + this.tree.contextKeyService.createKey(this.id, true); + this._register(this.tree); + this._register(this.tree.onDidChangeSelection(e => this.onSelection(e))); + + this.tree.setInput(this.root); + } + + layout(size: number) { + if (this.tree) { + this.treeContainer.style.height = size + 'px'; + this.tree.layout(size); + } + } + + getOptimalWidth(): number { + if (this.tree) { + const parentNode = this.tree.getHTMLElement(); + const childNodes = [].slice.call(parentNode.querySelectorAll('.outline-item-label > a')); + return DOM.getLargestChildWidth(parentNode, childNodes); + } + return 0; + } + + refresh(elements?: ITreeItem[]): TPromise { + if (this.tree) { + elements = elements || [this.root]; + for (const element of elements) { + element.children = null; // reset children + } + if (this.isVisible) { + return this.doRefresh(elements); + } else { + this.elementsToRefresh.push(...elements); + } + } + return TPromise.as(null); + } + + private activate() { + if (!this.activated) { + this.extensionService.activateByEvent(`onView:${this.id}`); + this.activated = true; + } + } + + private doRefresh(elements: ITreeItem[]): TPromise { + if (this.tree) { + return TPromise.join(elements.map(e => { + this.refreshing++; + return this.tree.refresh(e).then(() => this.refreshing--, () => this.refreshing--); + })).then(() => this.updateIconsAvailability(this.root)); + } + return TPromise.as(null); + } + + private updateIconsAvailability(parent: ITreeItem): void { + if (this.activated && this.tree) { + const initialResult = parent instanceof Root ? { hasIconForParentNode: false, hasIconForLeafNode: false } : { hasIconForParentNode: this.hasIconForParentNode, hasIconForLeafNode: this.hasIconForLeafNode }; + const { hasIconForParentNode, hasIconForLeafNode } = this.computeIconsAvailability(parent.children || [], initialResult); + const changed = this.hasIconForParentNode !== hasIconForParentNode || this.hasIconForLeafNode !== hasIconForLeafNode; + this._hasIconForParentNode = hasIconForParentNode; + this._hasIconForLeafNode = hasIconForLeafNode; + if (changed) { + this._onDidIconsChange.fire(); + } + DOM.toggleClass(this.treeContainer, 'custom-view-align-icons-and-twisties', this.hasIconForLeafNode && !this.hasIconForParentNode); + } + } + + private computeIconsAvailability(nodes: ITreeItem[], result: { hasIconForParentNode: boolean, hasIconForLeafNode: boolean }): { hasIconForParentNode: boolean, hasIconForLeafNode: boolean } { + if (!result.hasIconForLeafNode || !result.hasIconForParentNode) { + for (const node of nodes) { + if (this.hasIcon(node)) { + result.hasIconForParentNode = result.hasIconForParentNode || node.collapsibleState !== TreeItemCollapsibleState.None; + result.hasIconForLeafNode = result.hasIconForLeafNode || node.collapsibleState === TreeItemCollapsibleState.None; + } + this.computeIconsAvailability(node.children || [], result); + if (result.hasIconForLeafNode && result.hasIconForParentNode) { + return result; + } + } + } + return result; + } + + private hasIcon(node: ITreeItem): boolean { + const icon = this.themeService.getTheme().type === LIGHT ? node.icon : node.iconDark; + if (icon) { + return true; + } + if (node.resourceUri) { + const fileIconTheme = this.themeService.getFileIconTheme(); + if (node.collapsibleState !== TreeItemCollapsibleState.None) { + return fileIconTheme.hasFileIcons && fileIconTheme.hasFolderIcons; + } + return fileIconTheme.hasFileIcons; + } + return false; + } + + private onSelection({ payload }: any): void { + const selection: ITreeItem = this.tree.getSelection()[0]; + if (selection) { + if (selection.command) { + const originalEvent: KeyboardEvent | MouseEvent = payload && payload.originalEvent; + const isMouseEvent = payload && payload.origin === 'mouse'; + const isDoubleClick = isMouseEvent && originalEvent && originalEvent.detail === 2; + + if (!isMouseEvent || this.tree.openOnSingleClick || isDoubleClick) { + this.commandService.executeCommand(selection.command.id, ...(selection.command.arguments || [])); + } + } + } + } +} + +class TreeDataSource implements IDataSource { + + constructor( + private treeView: ITreeViewer, + @IProgressService2 private progressService: IProgressService2 + ) { + } + + public getId(tree: ITree, node: ITreeItem): string { + return node.handle; + } + + public hasChildren(tree: ITree, node: ITreeItem): boolean { + return this.treeView.dataProvider && node.collapsibleState !== TreeItemCollapsibleState.None; + } + + public getChildren(tree: ITree, node: ITreeItem): TPromise { + if (this.treeView.dataProvider) { + return this.progressService.withProgress({ location: ProgressLocation.Explorer }, () => this.treeView.dataProvider.getChildren(node)); + } + return TPromise.as([]); + } + + public shouldAutoexpand(tree: ITree, node: ITreeItem): boolean { + return node.collapsibleState === TreeItemCollapsibleState.Expanded; + } + + public getParent(tree: ITree, node: any): TPromise { + return TPromise.as(null); + } +} + +interface ITreeExplorerTemplateData { + label: HTMLElement; + resourceLabel: ResourceLabel; + icon: TreeItemIcon; + actionBar: ActionBar; +} + +class TreeRenderer implements IRenderer { + + private static readonly ITEM_HEIGHT = 22; + private static readonly TREE_TEMPLATE_ID = 'treeExplorer'; + + constructor( + private treeViewId: string, + private treeViewer: ITreeViewer, + private menus: Menus, + private actionItemProvider: IActionItemProvider, + @IInstantiationService private instantiationService: IInstantiationService, + @IWorkbenchThemeService private themeService: IWorkbenchThemeService + ) { + } + + 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 { + DOM.addClass(container, 'custom-view-tree-node-item'); + + const icon = this.instantiationService.createInstance(TreeItemIcon, container, this.treeViewer); + const label = DOM.append(container, DOM.$('.custom-view-tree-node-item-label')); + const resourceLabel = this.instantiationService.createInstance(ResourceLabel, container, {}); + const actionsContainer = DOM.append(container, DOM.$('.actions')); + const actionBar = new ActionBar(actionsContainer, { + actionItemProvider: this.actionItemProvider, + actionRunner: new MultipleSelectionActionRunner(() => tree.getSelection()) + }); + + return { label, resourceLabel, icon, actionBar }; + } + + public renderElement(tree: ITree, node: ITreeItem, templateId: string, templateData: ITreeExplorerTemplateData): void { + const resource = node.resourceUri ? URI.revive(node.resourceUri) : null; + const name = node.label || basename(resource.path); + const icon = this.themeService.getTheme().type === LIGHT ? node.icon : node.iconDark; + + // reset + templateData.resourceLabel.clear(); + templateData.actionBar.clear(); + templateData.label.textContent = ''; + DOM.removeClass(templateData.label, 'custom-view-tree-node-item-label'); + DOM.removeClass(templateData.resourceLabel.element, 'custom-view-tree-node-item-resourceLabel'); + + if (resource && !icon) { + templateData.resourceLabel.setLabel({ name, resource }, { fileKind: node.collapsibleState === TreeItemCollapsibleState.Collapsed || node.collapsibleState === TreeItemCollapsibleState.Expanded ? FileKind.FOLDER : FileKind.FILE }); + DOM.addClass(templateData.resourceLabel.element, 'custom-view-tree-node-item-resourceLabel'); + } else { + templateData.label.textContent = name; + DOM.addClass(templateData.label, 'custom-view-tree-node-item-label'); + } + + templateData.icon.treeItem = node; + templateData.actionBar.context = ({ $treeViewId: this.treeViewId, $treeItemHandle: node.handle }); + templateData.actionBar.push(this.menus.getResourceActions(node), { icon: true, label: false }); + } + + public disposeTemplate(tree: ITree, templateId: string, templateData: ITreeExplorerTemplateData): void { + templateData.resourceLabel.dispose(); + templateData.icon.dispose(); + } +} + +class TreeItemIcon extends Disposable { + + private _treeItem: ITreeItem; + private iconElement: HTMLElement; + + constructor( + container: HTMLElement, + private treeViewer: CustomTreeViewer, + @IInstantiationService instantiationService: IInstantiationService, + @IWorkbenchThemeService private themeService: IWorkbenchThemeService + ) { + super(); + this.iconElement = DOM.append(container, DOM.$('.custom-view-tree-node-item-icon')); + this._register(this.treeViewer.onDidIconsChange(() => this.render())); + } + + set treeItem(treeItem: ITreeItem) { + this._treeItem = treeItem; + this.render(); + } + + private render(): void { + if (this._treeItem) { + const fileIconTheme = this.themeService.getFileIconTheme(); + const contributedIcon = this.themeService.getTheme().type === LIGHT ? this._treeItem.icon : this._treeItem.iconDark; + + const hasContributedIcon = !!contributedIcon; + const hasChildren = this._treeItem.collapsibleState !== TreeItemCollapsibleState.None; + const hasResource = !!this._treeItem.resourceUri; + const isFolder = hasResource && hasChildren; + const isFile = hasResource && !hasChildren; + const hasThemeFolderIcon = isFolder && fileIconTheme.hasFileIcons && fileIconTheme.hasFolderIcons; + const hasThemeFileIcon = isFile && fileIconTheme.hasFileIcons; + const hasIcon = hasContributedIcon || hasThemeFolderIcon || hasThemeFileIcon; + const hasFolderPlaceHolderIcon = hasIcon ? false : isFolder && this.treeViewer.hasIconForParentNode; + const hasFilePlaceHolderIcon = hasIcon ? false : isFile && this.treeViewer.hasIconForLeafNode; + const hasContainerPlaceHolderIcon = hasIcon || hasFolderPlaceHolderIcon ? false : hasChildren && this.treeViewer.hasIconForParentNode; + const hasLeafPlaceHolderIcon = hasIcon || hasFilePlaceHolderIcon ? false : !hasChildren && (this.treeViewer.hasIconForParentNode || this.treeViewer.hasIconForLeafNode); + + this.iconElement.style.backgroundImage = hasContributedIcon ? `url('${contributedIcon}')` : ''; + DOM.toggleClass(this.iconElement, 'folder-icon', hasFolderPlaceHolderIcon); + DOM.toggleClass(this.iconElement, 'file-icon', hasFilePlaceHolderIcon); + DOM.toggleClass(this.iconElement, 'placeholder-icon', hasContainerPlaceHolderIcon); + DOM.toggleClass(this.iconElement, 'custom-view-tree-node-item-icon', hasContributedIcon || hasFolderPlaceHolderIcon || hasFilePlaceHolderIcon || hasContainerPlaceHolderIcon || hasLeafPlaceHolderIcon); + } + } +} + +class TreeController extends WorkbenchTreeController { + + constructor( + private treeViewId: string, + private menus: Menus, + @IContextMenuService private contextMenuService: IContextMenuService, + @IKeybindingService private _keybindingService: IKeybindingService, + @IConfigurationService configurationService: IConfigurationService + ) { + super({}, configurationService); + } + + public onContextMenu(tree: ITree, node: ITreeItem, event: ContextMenuEvent): boolean { + event.preventDefault(); + event.stopPropagation(); + + tree.setFocus(node); + const actions = this.menus.getResourceContextActions(node); + if (!actions.length) { + return true; + } + const anchor = { x: event.posx, y: event.posy }; + this.contextMenuService.showContextMenu({ + getAnchor: () => anchor, + + getActions: () => { + return TPromise.as(actions); + }, + + getActionItem: (action) => { + const keybinding = this._keybindingService.lookupKeybinding(action.id); + if (keybinding) { + return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel() }); + } + return null; + }, + + onHide: (wasCancelled?: boolean) => { + if (wasCancelled) { + tree.DOMFocus(); + } + }, + + getActionsContext: () => ({ $treeViewId: this.treeViewId, $treeItemHandle: node.handle }), + + actionRunner: new MultipleSelectionActionRunner(() => tree.getSelection()) + }); + + return true; + } +} + +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 extends Disposable implements IDisposable { + + constructor( + private id: string, + @IContextKeyService private contextKeyService: IContextKeyService, + @IMenuService private menuService: IMenuService, + @IContextMenuService private contextMenuService: IContextMenuService + ) { + super(); + } + + getResourceActions(element: ITreeItem): IAction[] { + return this.getActions(MenuId.ViewItemContext, { key: 'viewItem', value: element.contextValue }).primary; + } + + getResourceContextActions(element: ITreeItem): IAction[] { + return this.getActions(MenuId.ViewItemContext, { key: 'viewItem', 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.id); + contextKeyService.createKey(context.key, context.value); + + const menu = this.menuService.createMenu(menuId, contextKeyService); + const primary: IAction[] = []; + const secondary: IAction[] = []; + const result = { primary, secondary }; + fillInActions(menu, { shouldForwardArgs: true }, result, this.contextMenuService, g => /^inline/.test(g)); + + menu.dispose(); + contextKeyService.dispose(); + + return result; + } +} \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/views/customViewPanel.ts b/src/vs/workbench/browser/parts/views/customViewPanel.ts new file mode 100644 index 00000000000..0b57e4b2db0 --- /dev/null +++ b/src/vs/workbench/browser/parts/views/customViewPanel.ts @@ -0,0 +1,146 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * 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, dispose, empty as EmptyDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IAction, 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 { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; +import { fillInActions, ContextAwareMenuItemActionItem } from 'vs/platform/actions/browser/menuItemActionItem'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { ICustomViewsService, ITreeViewer } from 'vs/workbench/common/views'; +import { IViewletViewOptions, IViewOptions, ViewsViewletPanel } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; + +export class CustomTreeViewPanel extends ViewsViewletPanel { + + private menus: Menus; + private treeViewer: ITreeViewer; + + constructor( + options: IViewletViewOptions, + @IMessageService private messageService: IMessageService, + @IKeybindingService keybindingService: IKeybindingService, + @IContextMenuService contextMenuService: IContextMenuService, + @IInstantiationService private instantiationService: IInstantiationService, + @IConfigurationService configurationService: IConfigurationService, + @ICustomViewsService customViewsService: ICustomViewsService, + ) { + super({ ...(options as IViewOptions), ariaHeaderLabel: options.name }, keybindingService, contextMenuService, configurationService); + this.treeViewer = customViewsService.getTreeViewer(this.id); + this.menus = this.instantiationService.createInstance(Menus, this.id); + this.menus.onDidChangeTitle(() => this.updateActions(), this, this.disposables); + this.updateTreeVisibility(); + } + + setVisible(visible: boolean): TPromise { + return super.setVisible(visible).then(() => this.updateTreeVisibility()); + } + + focus(): void { + super.focus(); + this.treeViewer.focus(); + } + + renderBody(container: HTMLElement): void { + this.treeViewer.render(container); + } + + setExpanded(expanded: boolean): void { + this.treeViewer.setVisibility(this.isVisible() && expanded); + super.setExpanded(expanded); + } + + layoutBody(size: number): void { + this.treeViewer.layout(size); + } + + getActions(): IAction[] { + return [...this.menus.getTitleActions()]; + } + + getSecondaryActions(): IAction[] { + return this.menus.getTitleSecondaryActions(); + } + + getActionItem(action: IAction): IActionItem { + return action instanceof MenuItemAction ? new ContextAwareMenuItemActionItem(action, this.keybindingService, this.messageService, this.contextMenuService) : undefined; + } + + getOptimalWidth(): number { + return this.treeViewer.getOptimalWidth(); + } + + private updateTreeVisibility(): void { + this.treeViewer.setVisibility(this.isVisible() && this.isExpanded()); + } + + dispose(): void { + dispose(this.disposables); + super.dispose(); + } +} + +export 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( + id: string, + @IContextKeyService private contextKeyService: IContextKeyService, + @IMenuService private menuService: IMenuService, + @IContextMenuService private contextMenuService: IContextMenuService + ) { + if (this.titleDisposable) { + this.titleDisposable.dispose(); + this.titleDisposable = EmptyDisposable; + } + + const _contextKeyService = this.contextKeyService.createScoped(); + _contextKeyService.createKey('view', id); + + const titleMenu = this.menuService.createMenu(MenuId.ViewTitle, _contextKeyService); + const updateActions = () => { + this.titleActions = []; + this.titleSecondaryActions = []; + fillInActions(titleMenu, null, { primary: this.titleActions, secondary: this.titleSecondaryActions }, this.contextMenuService); + 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; + } + + dispose(): void { + this.disposables = dispose(this.disposables); + } +} \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/views/media/Document_16x.svg b/src/vs/workbench/browser/parts/views/media/Document_16x.svg new file mode 100644 index 00000000000..46a9f38cc88 --- /dev/null +++ b/src/vs/workbench/browser/parts/views/media/Document_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/views/media/Document_16x_inverse.svg b/src/vs/workbench/browser/parts/views/media/Document_16x_inverse.svg new file mode 100755 index 00000000000..14abfb51077 --- /dev/null +++ b/src/vs/workbench/browser/parts/views/media/Document_16x_inverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/views/media/FolderOpen_16x.svg b/src/vs/workbench/browser/parts/views/media/FolderOpen_16x.svg new file mode 100644 index 00000000000..1a3933d6351 --- /dev/null +++ b/src/vs/workbench/browser/parts/views/media/FolderOpen_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/views/media/FolderOpen_16x_inverse.svg b/src/vs/workbench/browser/parts/views/media/FolderOpen_16x_inverse.svg new file mode 100755 index 00000000000..fbf57c927f2 --- /dev/null +++ b/src/vs/workbench/browser/parts/views/media/FolderOpen_16x_inverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/views/media/Folder_16x.svg b/src/vs/workbench/browser/parts/views/media/Folder_16x.svg new file mode 100644 index 00000000000..3d64ae71db4 --- /dev/null +++ b/src/vs/workbench/browser/parts/views/media/Folder_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/views/media/Folder_16x_inverse.svg b/src/vs/workbench/browser/parts/views/media/Folder_16x_inverse.svg new file mode 100755 index 00000000000..13b18d18016 --- /dev/null +++ b/src/vs/workbench/browser/parts/views/media/Folder_16x_inverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/views/media/views.css b/src/vs/workbench/browser/parts/views/media/views.css index f017fb80c94..0d8382b371a 100644 --- a/src/vs/workbench/browser/parts/views/media/views.css +++ b/src/vs/workbench/browser/parts/views/media/views.css @@ -50,9 +50,12 @@ display: none; } -.tree-explorer-viewlet-tree-view.file-icon-themable-tree.align-icons-and-twisties .monaco-tree-row:not(.has-children) .content:not(.align-with-twisty)::before, -.tree-explorer-viewlet-tree-view.file-icon-themable-tree.hide-arrows .monaco-tree-row .content::before { - display: inline-block; +.tree-explorer-viewlet-tree-view.file-icon-themable-tree.custom-view-align-icons-and-twisties .monaco-tree-row:not(.has-children) .content::before { + display: none; +} + +.tree-explorer-viewlet-tree-view.file-icon-themable-tree.align-icons-and-twisties:not(.custom-view-align-icons-and-twisties) .monaco-tree-row:not(.has-children) .content::before { + display: block; } .tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row .custom-view-tree-node-item { @@ -82,6 +85,48 @@ -webkit-font-smoothing: antialiased; } +.tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row .custom-view-tree-node-item > .custom-view-tree-node-item-icon.placeholder-icon { + border: 1px; + border-style:dashed; + border-radius: 1px; + margin: 5px 6px 5px 2px; + height: 12px; + width: 6px; +} + +.tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row .custom-view-tree-node-item > .custom-view-tree-node-item-icon.file-icon { + content: ' '; + background-image: url('Document_16x.svg'); +} + +.hs-black .tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row .custom-view-tree-node-item > .custom-view-tree-node-item-icon.file-icon, +.vs-dark .tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row .custom-view-tree-node-item > .custom-view-tree-node-item-icon.file-icon { + content: ' '; + background-image: url('Document_16x_inverse.svg'); +} + +.tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row .custom-view-tree-node-item > .custom-view-tree-node-item-icon.folder-icon { + content: ' '; + background-image: url('Folder_16x.svg'); +} + +.hs-black .tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row .custom-view-tree-node-item > .custom-view-tree-node-item-icon.folder-icon, +.vs-dark .tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row .custom-view-tree-node-item > .custom-view-tree-node-item-icon.folder-icon { + content: ' '; + background-image: url('Folder_16x_inverse.svg'); +} + +.tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row.expanded .custom-view-tree-node-item > .custom-view-tree-node-item-icon.folder-icon { + content: ' '; + background-image: url('FolderOpen_16x.svg'); +} + +.hc-black .tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row.expanded .custom-view-tree-node-item > .custom-view-tree-node-item-icon.folder-icon, +.vs-dark .tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row.expanded .custom-view-tree-node-item > .custom-view-tree-node-item-icon.folder-icon { + content: ' '; + background-image: url('FolderOpen_16x_inverse.svg'); +} + .tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row .custom-view-tree-node-item > .actions { display: none; padding-right: 6px; diff --git a/src/vs/workbench/browser/parts/views/panelViewlet.ts b/src/vs/workbench/browser/parts/views/panelViewlet.ts index c9afb8b9ced..928ad422b63 100644 --- a/src/vs/workbench/browser/parts/views/panelViewlet.ts +++ b/src/vs/workbench/browser/parts/views/panelViewlet.ts @@ -6,12 +6,12 @@ import 'vs/css!./media/panelviewlet'; import * as nls from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; -import Event, { Emitter } from 'vs/base/common/event'; +import Event, { Emitter, filterEvent } from 'vs/base/common/event'; import { ColorIdentifier, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { attachStyler, IColorMapping, IThemable } from 'vs/platform/theme/common/styler'; import { SIDE_BAR_DRAG_AND_DROP_BACKGROUND, SIDE_BAR_SECTION_HEADER_FOREGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; import { Dimension, Builder } from 'vs/base/browser/builder'; -import { append, $, trackFocus } from 'vs/base/browser/dom'; +import { append, $, trackFocus, toggleClass } from 'vs/base/browser/dom'; import { IDisposable, combinedDisposable } from 'vs/base/common/lifecycle'; import { firstIndex } from 'vs/base/common/arrays'; import { IAction, IActionRunner } from 'vs/base/common/actions'; @@ -25,6 +25,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { PanelView, IPanelViewOptions, IPanelOptions, Panel } from 'vs/base/browser/ui/splitview/panelview'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; export interface IPanelColors extends IColorMapping { dropBackground?: ColorIdentifier; @@ -48,17 +49,21 @@ export interface IViewletPanelOptions extends IPanelOptions { export abstract class ViewletPanel extends Panel { + private static AlwaysShowActionsConfig = 'workbench.panel.alwaysShowActions'; + private _onDidFocus = new Emitter(); readonly onDidFocus: Event = this._onDidFocus.event; protected actionRunner: IActionRunner; protected toolbar: ToolBar; + private headerContainer: HTMLElement; constructor( readonly title: string, options: IViewletPanelOptions, @IKeybindingService protected keybindingService: IKeybindingService, - @IContextMenuService protected contextMenuService: IContextMenuService + @IContextMenuService protected contextMenuService: IContextMenuService, + @IConfigurationService protected readonly configurationService: IConfigurationService ) { super(options); @@ -74,6 +79,8 @@ export abstract class ViewletPanel extends Panel { } protected renderHeader(container: HTMLElement): void { + this.headerContainer = container; + this.renderHeaderTitle(container); const actions = append(container, $('.actions')); @@ -87,6 +94,10 @@ export abstract class ViewletPanel extends Panel { this.disposables.push(this.toolbar); this.updateActions(); + + const onDidRelevantConfigurationChange = filterEvent(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration(ViewletPanel.AlwaysShowActionsConfig)); + onDidRelevantConfigurationChange(this.updateActionsVisibility, this, this.disposables); + this.updateActionsVisibility(); } protected renderHeaderTitle(container: HTMLElement): void { @@ -102,6 +113,11 @@ export abstract class ViewletPanel extends Panel { this.toolbar.context = this.getActionsContext(); } + protected updateActionsVisibility(): void { + const shouldAlwaysShowActions = this.configurationService.getValue('workbench.panel.alwaysShowActions'); + toggleClass(this.headerContainer, 'actions-always-visible', shouldAlwaysShowActions); + } + getActions(): IAction[] { return []; } diff --git a/src/vs/workbench/browser/parts/views/treeView.ts b/src/vs/workbench/browser/parts/views/treeView.ts deleted file mode 100644 index b3b5dfc4973..00000000000 --- a/src/vs/workbench/browser/parts/views/treeView.ts +++ /dev/null @@ -1,567 +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 'vs/css!./media/views'; -import Event, { Emitter } from 'vs/base/common/event'; -import { IDisposable, dispose, empty as EmptyDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle'; -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 { 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'; -import { ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults'; -import { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; -import { IThemeService, LIGHT } from 'vs/platform/theme/common/themeService'; -import { fillInActions, ContextAwareMenuItemActionItem } 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 } from 'vs/platform/contextkey/common/contextkey'; -import { ActionItem, ActionBar, IActionItemProvider } from 'vs/base/browser/ui/actionbar/actionbar'; -import { ViewsRegistry, TreeItemCollapsibleState, ITreeItem, ITreeViewDataProvider, TreeViewItemHandleArg } from 'vs/workbench/common/views'; -import { IExtensionService } from 'vs/platform/extensions/common/extensions'; -import { IViewletViewOptions, IViewOptions, TreeViewsViewletPanel, FileIconThemableWorkbenchTree } from 'vs/workbench/browser/parts/views/viewsViewlet'; -import { ICommandService } from 'vs/platform/commands/common/commands'; -import { WorkbenchTree, WorkbenchTreeController } from 'vs/platform/list/browser/listService'; -import { ResourceLabel } from 'vs/workbench/browser/labels'; -import URI from 'vs/base/common/uri'; -import { basename } from 'vs/base/common/paths'; -import { FileKind } from 'vs/platform/files/common/files'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; - -export class TreeView extends TreeViewsViewletPanel { - - private menus: Menus; - private activated: boolean = false; - private treeInputPromise: TPromise; - - private dataProviderElementChangeListener: IDisposable; - private elementsToRefresh: ITreeItem[] = []; - - constructor( - options: IViewletViewOptions, - @IMessageService private messageService: IMessageService, - @IKeybindingService keybindingService: IKeybindingService, - @IContextMenuService contextMenuService: IContextMenuService, - @IInstantiationService private instantiationService: IInstantiationService, - @IThemeService themeService: IWorkbenchThemeService, - @IExtensionService private extensionService: IExtensionService, - @ICommandService private commandService: ICommandService - ) { - super({ ...(options as IViewOptions), ariaHeaderLabel: options.name }, keybindingService, contextMenuService); - this.menus = this.instantiationService.createInstance(Menus, this.id); - this.menus.onDidChangeTitle(() => this.updateActions(), this, this.disposables); - themeService.onThemeChange(() => this.tree.refresh() /* soft refresh */, this, this.disposables); - if (options.expanded) { - this.activate(); - } - } - - 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)); - this.setInput(); - } - - setExpanded(expanded: boolean): void { - super.setExpanded(expanded); - - if (expanded) { - this.activate(); - } - } - - private activate() { - if (!this.activated && this.extensionService) { - this.extensionService.activateByEvent(`onView:${this.id}`); - this.activated = true; - this.setInput(); - } - } - - public createViewer(container: Builder): WorkbenchTree { - const actionItemProvider = (action: IAction) => this.getActionItem(action); - const dataSource = this.instantiationService.createInstance(TreeDataSource, this.id); - const renderer = this.instantiationService.createInstance(TreeRenderer, this.id, this.menus, actionItemProvider); - const controller = this.instantiationService.createInstance(TreeController, this.id, this.menus); - const tree = this.instantiationService.createInstance(FileIconThemableWorkbenchTree, - container.getHTMLElement(), - { dataSource, renderer, controller }, - {} - ); - - tree.contextKeyService.createKey(this.id, true); - this.disposables.push(tree.onDidChangeSelection(e => this.onSelection(e))); - - return tree; - } - - getActions(): IAction[] { - return [...this.menus.getTitleActions()]; - } - - getSecondaryActions(): IAction[] { - return this.menus.getTitleSecondaryActions(); - } - - getActionItem(action: IAction): IActionItem { - if (!(action instanceof MenuItemAction)) { - return undefined; - } - return new ContextAwareMenuItemActionItem(action, this.keybindingService, this.messageService, this.contextMenuService); - } - - private setInput(): TPromise { - if (this.tree) { - if (!this.treeInputPromise) { - if (this.listenToDataProvider()) { - this.treeInputPromise = this.tree.setInput(new Root()); - } else { - this.treeInputPromise = new TPromise((c, e) => { - this.disposables.push(ViewsRegistry.onTreeViewDataProviderRegistered(id => { - if (this.id === id) { - if (this.listenToDataProvider()) { - this.tree.setInput(new Root()).then(() => c(null)); - } - } - })); - }); - } - } - return this.treeInputPromise; - } - 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)); - const disposable = dataProvider.onDispose(() => { - this.dataProviderElementChangeListener.dispose(); - this.tree.setInput(new Root()); - disposable.dispose(); - }); - return true; - } - return false; - } - - public getOptimalWidth(): number { - const parentNode = this.tree.getHTMLElement(); - const childNodes = [].slice.call(parentNode.querySelectorAll('.outline-item-label > a')); - - return DOM.getLargestChildWidth(parentNode, childNodes); - } - - private onSelection({ payload }: any): void { - const selection: ITreeItem = this.tree.getSelection()[0]; - if (selection) { - if (selection.command) { - const originalEvent: KeyboardEvent | MouseEvent = payload && payload.originalEvent; - const isMouseEvent = payload && payload.origin === 'mouse'; - const isDoubleClick = isMouseEvent && originalEvent && originalEvent.detail === 2; - - if (!isMouseEvent || this.tree.openOnSingleClick || isDoubleClick) { - this.commandService.executeCommand(selection.command.id, ...(selection.command.arguments || [])); - } - } - } - } - - protected updateTreeVisibility(tree: WorkbenchTree, isVisible: boolean): void { - super.updateTreeVisibility(tree, isVisible); - if (isVisible && this.elementsToRefresh.length) { - this.doRefresh(this.elementsToRefresh); - this.elementsToRefresh = []; - } - } - - private refresh(elements: ITreeItem[]): void { - if (!elements) { - const root: ITreeItem = this.tree.getInput(); - root.children = null; // reset children - elements = [root]; - } - if (this.isVisible() && this.isExpanded()) { - this.doRefresh(elements); - } else { - this.elementsToRefresh.push(...elements); - } - } - - private doRefresh(elements: ITreeItem[]): void { - for (const element of elements) { - this.tree.refresh(element); - } - } - - dispose(): void { - dispose(this.disposables); - if (this.dataProviderElementChangeListener) { - this.dataProviderElementChangeListener.dispose(); - } - dispose(this.disposables); - super.dispose(); - } -} - -class Root implements ITreeItem { - label = 'root'; - handle = '0'; - parentHandle = null; - collapsibleState = TreeItemCollapsibleState.Expanded; -} - -class TreeDataSource implements IDataSource { - - constructor( - private id: string, - @IProgressService private progressService: IProgressService - ) { - } - - public getId(tree: ITree, node: ITreeItem): string { - return node.handle; - } - - public hasChildren(tree: ITree, node: ITreeItem): boolean { - if (!this.getDataProvider()) { - return false; - } - return node.collapsibleState === TreeItemCollapsibleState.Collapsed || node.collapsibleState === TreeItemCollapsibleState.Expanded; - } - - public getChildren(tree: ITree, node: ITreeItem): TPromise { - if (node.children) { - return TPromise.as(node.children); - } - - 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([]); - } - - 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 { - label: HTMLElement; - resourceLabel: ResourceLabel; - icon: HTMLElement; - actionBar: ActionBar; - aligner: Aligner; -} - -class TreeRenderer implements IRenderer { - - private static readonly ITEM_HEIGHT = 22; - private static readonly TREE_TEMPLATE_ID = 'treeExplorer'; - - constructor( - private treeViewId: string, - private menus: Menus, - private actionItemProvider: IActionItemProvider, - @IInstantiationService private instantiationService: IInstantiationService, - @IWorkbenchThemeService private themeService: IWorkbenchThemeService - ) { - } - - 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 = DOM.append(container, DOM.$('.custom-view-tree-node-item')); - - const icon = DOM.append(el, DOM.$('.custom-view-tree-node-item-icon')); - const label = DOM.append(el, DOM.$('.custom-view-tree-node-item-label')); - const resourceLabel = this.instantiationService.createInstance(ResourceLabel, el, {}); - const actionsContainer = DOM.append(el, DOM.$('.actions')); - const actionBar = new ActionBar(actionsContainer, { - actionItemProvider: this.actionItemProvider, - actionRunner: new MultipleSelectionActionRunner(() => tree.getSelection()) - }); - - return { label, resourceLabel, icon, actionBar, aligner: new Aligner(container, tree, this.themeService) }; - } - - public renderElement(tree: ITree, node: ITreeItem, templateId: string, templateData: ITreeExplorerTemplateData): void { - const resource = node.resourceUri ? URI.revive(node.resourceUri) : null; - const name = node.label || basename(resource.path); - const icon = this.themeService.getTheme().type === LIGHT ? node.icon : node.iconDark; - - // reset - templateData.resourceLabel.clear(); - templateData.actionBar.clear(); - templateData.label.textContent = ''; - DOM.removeClass(templateData.label, 'custom-view-tree-node-item-label'); - DOM.removeClass(templateData.resourceLabel.element, 'custom-view-tree-node-item-resourceLabel'); - DOM.removeClass(templateData.icon, 'custom-view-tree-node-item-icon'); - - if (resource && !icon) { - templateData.resourceLabel.setLabel({ name, resource }, { fileKind: node.collapsibleState === TreeItemCollapsibleState.Collapsed || node.collapsibleState === TreeItemCollapsibleState.Expanded ? FileKind.FOLDER : FileKind.FILE }); - DOM.addClass(templateData.resourceLabel.element, 'custom-view-tree-node-item-resourceLabel'); - } else { - templateData.label.textContent = name; - DOM.addClass(templateData.label, 'custom-view-tree-node-item-label'); - templateData.icon.style.backgroundImage = `url('${icon}')`; - if (icon) { - DOM.addClass(templateData.icon, 'custom-view-tree-node-item-icon'); - } - } - - templateData.actionBar.context = ({ $treeViewId: this.treeViewId, $treeItemHandle: node.handle }); - templateData.actionBar.push(this.menus.getResourceActions(node), { icon: true, label: false }); - - templateData.aligner.align(node); - } - - public disposeTemplate(tree: ITree, templateId: string, templateData: ITreeExplorerTemplateData): void { - templateData.resourceLabel.dispose(); - templateData.aligner.dispose(); - } -} - -class Aligner extends Disposable { - - private node: ITreeItem; - - constructor( - private container: HTMLElement, - private tree: ITree, - private themeService: IWorkbenchThemeService - ) { - super(); - this._register(this.themeService.onDidFileIconThemeChange(() => this.alignByTheme())); - } - - align(treeItem: ITreeItem): void { - this.node = treeItem; - this.alignByTheme(); - } - - private alignByTheme(): void { - if (this.node) { - DOM.toggleClass(this.container, 'align-with-twisty', this.hasToAlignWithTwisty()); - } - } - - private hasToAlignWithTwisty(): boolean { - const fileIconTheme = this.themeService.getFileIconTheme(); - if (!(fileIconTheme.hasFileIcons && !fileIconTheme.hasFolderIcons)) { - return false; - } - if (this.node.collapsibleState !== TreeItemCollapsibleState.None) { - return false; - } - const icon = this.themeService.getTheme().type === LIGHT ? this.node.icon : this.node.iconDark; - const hasIcon = !!icon || !!this.node.resourceUri; - if (!hasIcon) { - return false; - } - - const siblingsWithChildren = this.getSiblings().filter(s => s.collapsibleState !== TreeItemCollapsibleState.None); - for (const s of siblingsWithChildren) { - const icon = this.themeService.getTheme().type === LIGHT ? s.icon : s.iconDark; - if (icon) { - return false; - } - } - - return true; - } - - private getSiblings(): ITreeItem[] { - const parent: ITreeItem = this.tree.getNavigator(this.node).parent() || this.tree.getInput(); - return parent.children; - } -} - -class TreeController extends WorkbenchTreeController { - - constructor( - private treeViewId: string, - private menus: Menus, - @IContextMenuService private contextMenuService: IContextMenuService, - @IKeybindingService private _keybindingService: IKeybindingService, - @IConfigurationService configurationService: IConfigurationService - ) { - super({ clickBehavior: ClickBehavior.ON_MOUSE_UP /* do not change to not break DND */, keyboardSupport: false }, configurationService); - } - - public onContextMenu(tree: ITree, node: ITreeItem, event: ContextMenuEvent): boolean { - event.preventDefault(); - event.stopPropagation(); - - tree.setFocus(node); - const actions = this.menus.getResourceContextActions(node); - if (!actions.length) { - return true; - } - const anchor = { x: event.posx, y: event.posy }; - this.contextMenuService.showContextMenu({ - getAnchor: () => anchor, - - getActions: () => { - return TPromise.as(actions); - }, - - getActionItem: (action) => { - const keybinding = this._keybindingService.lookupKeybinding(action.id); - if (keybinding) { - return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel() }); - } - return null; - }, - - onHide: (wasCancelled?: boolean) => { - if (wasCancelled) { - tree.DOMFocus(); - } - }, - - getActionsContext: () => ({ $treeViewId: this.treeViewId, $treeItemHandle: node.handle }), - - actionRunner: new MultipleSelectionActionRunner(() => tree.getSelection()) - }); - - return true; - } -} - -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 id: string, - @IContextKeyService private contextKeyService: IContextKeyService, - @IMenuService private menuService: IMenuService, - @IContextMenuService private contextMenuService: IContextMenuService - ) { - if (this.titleDisposable) { - this.titleDisposable.dispose(); - this.titleDisposable = EmptyDisposable; - } - - const _contextKeyService = this.contextKeyService.createScoped(); - _contextKeyService.createKey('view', id); - - const titleMenu = this.menuService.createMenu(MenuId.ViewTitle, _contextKeyService); - const updateActions = () => { - this.titleActions = []; - this.titleSecondaryActions = []; - fillInActions(titleMenu, null, { primary: this.titleActions, secondary: this.titleSecondaryActions }, this.contextMenuService); - 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; - } - - getResourceActions(element: ITreeItem): IAction[] { - return this.getActions(MenuId.ViewItemContext, { key: 'viewItem', value: element.contextValue }).primary; - } - - getResourceContextActions(element: ITreeItem): IAction[] { - return this.getActions(MenuId.ViewItemContext, { key: 'viewItem', 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.id); - contextKeyService.createKey(context.key, context.value); - - const menu = this.menuService.createMenu(menuId, contextKeyService); - const primary: IAction[] = []; - const secondary: IAction[] = []; - const result = { primary, secondary }; - fillInActions(menu, { shouldForwardArgs: true }, result, this.contextMenuService, g => /^inline/.test(g)); - - menu.dispose(); - contextKeyService.dispose(); - - return result; - } - - dispose(): void { - this.disposables = dispose(this.disposables); - } -} diff --git a/src/vs/workbench/browser/parts/views/viewsViewlet.ts b/src/vs/workbench/browser/parts/views/viewsViewlet.ts index 8e22161b5bb..de06ac9d0ec 100644 --- a/src/vs/workbench/browser/parts/views/viewsViewlet.ts +++ b/src/vs/workbench/browser/parts/views/viewsViewlet.ts @@ -13,7 +13,6 @@ import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { IAction, IActionRunner } from 'vs/base/common/actions'; import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { firstIndex } from 'vs/base/common/arrays'; -import { DelayedDragHandler } from 'vs/base/browser/dnd'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; @@ -49,9 +48,10 @@ export abstract class ViewsViewletPanel extends ViewletPanel { constructor( options: IViewOptions, protected keybindingService: IKeybindingService, - protected contextMenuService: IContextMenuService + protected contextMenuService: IContextMenuService, + @IConfigurationService configurationService: IConfigurationService ) { - super(options.name, options, keybindingService, contextMenuService); + super(options.name, options, keybindingService, contextMenuService, configurationService); this.id = options.id; this.name = options.name; @@ -102,25 +102,7 @@ export abstract class ViewsViewletPanel extends ViewletPanel { export abstract class TreeViewsViewletPanel extends ViewsViewletPanel { - readonly id: string; - readonly name: string; - protected treeContainer: HTMLElement; - protected tree: WorkbenchTree; - protected isDisposed: boolean; - private dragHandler: DelayedDragHandler; - - constructor( - options: IViewOptions, - protected keybindingService: IKeybindingService, - protected contextMenuService: IContextMenuService - ) { - super(options, keybindingService, contextMenuService); - - this.id = options.id; - this.name = options.name; - this._expanded = options.expanded; - } setExpanded(expanded: boolean): void { if (this.isExpanded() !== expanded) { @@ -129,29 +111,11 @@ export abstract class TreeViewsViewletPanel extends ViewsViewletPanel { } } - protected renderHeader(container: HTMLElement): void { - super.renderHeader(container); - - // Expand on drag over - this.dragHandler = new DelayedDragHandler(container, () => this.setExpanded(true)); - } - - protected renderViewTree(container: HTMLElement): HTMLElement { - const treeContainer = document.createElement('div'); - container.appendChild(treeContainer); - return treeContainer; - } - - getViewer(): WorkbenchTree { - return this.tree; - } - setVisible(visible: boolean): TPromise { if (this.isVisible() !== visible) { return super.setVisible(visible) .then(() => this.updateTreeVisibility(this.tree, visible && this.isExpanded())); } - return TPromise.wrap(null); } @@ -160,64 +124,12 @@ export abstract class TreeViewsViewletPanel extends ViewsViewletPanel { this.focusTree(); } - protected reveal(element: any, relativeTop?: number): TPromise { - if (!this.tree) { - return TPromise.as(null); // return early if viewlet has not yet been created - } - - return this.tree.reveal(element, relativeTop); - } - layoutBody(size: number): void { if (this.tree) { - this.treeContainer.style.height = size + 'px'; this.tree.layout(size); } } - getActions(): IAction[] { - return []; - } - - getSecondaryActions(): IAction[] { - return []; - } - - getActionItem(action: IAction): IActionItem { - return null; - } - - getActionsContext(): any { - return undefined; - } - - getOptimalWidth(): number { - return 0; - } - - create(): TPromise { - return TPromise.as(null); - } - - shutdown(): void { - // Subclass to implement - } - - dispose(): void { - this.isDisposed = true; - this.treeContainer = null; - - if (this.tree) { - this.tree.dispose(); - } - - if (this.dragHandler) { - this.dragHandler.dispose(); - } - - super.dispose(); - } - protected updateTreeVisibility(tree: WorkbenchTree, isVisible: boolean): void { if (!tree) { return; @@ -242,14 +154,21 @@ export abstract class TreeViewsViewletPanel extends ViewsViewletPanel { } // 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); + const selectedElement = this.tree.getSelection()[0]; + if (selectedElement) { + this.tree.reveal(selectedElement, 0.5).done(null, errors.onUnexpectedError); } // Pass Focus to Viewer this.tree.DOMFocus(); } + + dispose(): void { + if (this.tree) { + this.tree.dispose(); + } + super.dispose(); + } } export interface IViewletViewOptions extends IViewOptions { diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 96b57287a71..e3fca67780a 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -16,6 +16,7 @@ import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/insta import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { Registry } from 'vs/platform/registry/common/platform'; import { ITextModel } from 'vs/editor/common/model'; +import { Schemas } from 'vs/base/common/network'; export const TextCompareEditorVisible = new RawContextKey('textCompareEditorVisible', false); @@ -36,7 +37,10 @@ export const TEXT_DIFF_EDITOR_ID = 'workbench.editors.textDiffEditor'; export const BINARY_DIFF_EDITOR_ID = 'workbench.editors.binaryResourceDiffEditor'; export interface IFileInputFactory { + createFileInput(resource: URI, encoding: string, instantiationService: IInstantiationService): IFileEditorInput; + + isFileInput(obj: any): obj is IFileEditorInput; } export interface IEditorInputFactoryRegistry { @@ -859,7 +863,7 @@ export const EditorCommands = { export interface IResourceOptions { supportSideBySide?: boolean; - filter?: 'file' | 'untitled' | ['file', 'untitled'] | ['untitled', 'file']; + filter?: string | string[]; } export function toResource(editor: IEditorInput, options?: IResourceOptions): URI { @@ -884,18 +888,18 @@ export function toResource(editor: IEditorInput, options?: IResourceOptions): UR let includeFiles: boolean; let includeUntitled: boolean; if (Array.isArray(options.filter)) { - includeFiles = (options.filter.indexOf('file') >= 0); - includeUntitled = (options.filter.indexOf('untitled') >= 0); + includeFiles = (options.filter.indexOf(Schemas.file) >= 0); + includeUntitled = (options.filter.indexOf(Schemas.untitled) >= 0); } else { - includeFiles = (options.filter === 'file'); - includeUntitled = (options.filter === 'untitled'); + includeFiles = (options.filter === Schemas.file); + includeUntitled = (options.filter === Schemas.untitled); } - if (includeFiles && resource.scheme === 'file') { + if (includeFiles && resource.scheme === Schemas.file) { return resource; } - if (includeUntitled && resource.scheme === 'untitled') { + if (includeUntitled && resource.scheme === Schemas.untitled) { return resource; } diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 480ecc85f0b..75ed026731e 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -9,6 +9,19 @@ 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'; +// < --- Workbench (not customizable) --- > + +export function WORKBENCH_BACKGROUND(theme: ITheme): Color { + switch (theme.type) { + case 'dark': + return Color.fromHex('#252526'); + case 'light': + return Color.fromHex('#F3F3F3'); + default: + return Color.fromHex('#000000'); + } +} + // < --- Tabs --- > export const TAB_ACTIVE_BACKGROUND = registerColor('tab.activeBackground', { @@ -467,4 +480,4 @@ export class Themable extends Disposable { super.dispose(); } -} +} \ No newline at end of file diff --git a/src/vs/workbench/common/views.ts b/src/vs/workbench/common/views.ts index f7a59c538b0..cab9d6035ca 100644 --- a/src/vs/workbench/common/views.ts +++ b/src/vs/workbench/common/views.ts @@ -11,6 +11,8 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { ITreeViewDataProvider } from 'vs/workbench/common/views'; import { localize } from 'vs/nls'; import { IViewlet } from 'vs/workbench/common/viewlet'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { IDisposable } from 'vs/base/common/lifecycle'; export class ViewLocation { @@ -62,19 +64,15 @@ export interface IViewsRegistry { readonly onViewsDeregistered: Event; - readonly onTreeViewDataProviderRegistered: Event; - registerViews(views: IViewDescriptor[]): void; deregisterViews(ids: string[], location: ViewLocation): void; - registerTreeViewDataProvider(id: string, factory: ITreeViewDataProvider): void; - - deregisterTreeViewDataProviders(): void; - getViews(loc: ViewLocation): IViewDescriptor[]; - getTreeViewDataProvider(id: string): ITreeViewDataProvider; + getAllViews(): IViewDescriptor[]; + + getView(id: string): IViewDescriptor; } @@ -86,11 +84,8 @@ export const ViewsRegistry: IViewsRegistry = new class implements IViewsRegistry private _onViewsDeregistered: Emitter = new Emitter(); readonly onViewsDeregistered: Event = this._onViewsDeregistered.event; - private _onTreeViewDataProviderRegistered: Emitter = new Emitter(); - readonly onTreeViewDataProviderRegistered: Event = this._onTreeViewDataProviderRegistered.event; - + private _viewLocations: ViewLocation[] = []; private _views: Map = new Map(); - private _treeViewDataPoviders: Map = new Map(); registerViews(viewDescriptors: IViewDescriptor[]): void { if (viewDescriptors.length) { @@ -99,6 +94,7 @@ export const ViewsRegistry: IViewsRegistry = new class implements IViewsRegistry if (!views) { views = []; this._views.set(viewDescriptor.location, views); + this._viewLocations.push(viewDescriptor.location); } if (views.some(v => v.id === viewDescriptor.id)) { throw new Error(localize('duplicateId', "A view with id `{0}` is already registered in the location `{1}`", viewDescriptor.id, viewDescriptor.location.id)); @@ -119,36 +115,36 @@ export const ViewsRegistry: IViewsRegistry = new class implements IViewsRegistry const viewsToDeregister = views.filter(view => ids.indexOf(view.id) !== -1); if (viewsToDeregister.length) { - this._views.set(location, views.filter(view => ids.indexOf(view.id) === -1)); + const remaningViews = views.filter(view => ids.indexOf(view.id) === -1); + if (remaningViews.length) { + this._views.set(location, remaningViews); + } else { + this._views.delete(location); + this._viewLocations.splice(this._viewLocations.indexOf(location), 1); + } } this._onViewsDeregistered.fire(viewsToDeregister); } - registerTreeViewDataProvider(id: string, factory: ITreeViewDataProvider) { - if (!this.isDataProviderRegistered(id)) { - // TODO: throw error - } - this._treeViewDataPoviders.set(id, factory); - this._onTreeViewDataProviderRegistered.fire(id); - } - - deregisterTreeViewDataProviders(): void { - this._treeViewDataPoviders.clear(); - } - getViews(loc: ViewLocation): IViewDescriptor[] { return this._views.get(loc) || []; } - getTreeViewDataProvider(id: string): ITreeViewDataProvider { - return this._treeViewDataPoviders.get(id); + getAllViews(): IViewDescriptor[] { + const result: IViewDescriptor[] = []; + this._views.forEach(views => result.push(...views)); + return result; } - private isDataProviderRegistered(id: string): boolean { - let registered = false; - this._views.forEach(views => registered = registered || views.some(view => view.id === id)); - return registered; + getView(id: string): IViewDescriptor { + for (const viewLocation of this._viewLocations) { + const viewDescriptor = (this._views.get(viewLocation) || []).filter(v => v.id === id)[0]; + if (viewDescriptor) { + return viewDescriptor; + } + } + return null; } }; @@ -158,7 +154,40 @@ export interface IViewsViewlet extends IViewlet { } -// Custom view +// Custom views + +export interface ITreeViewer extends IDisposable { + + readonly dataProvider: ITreeViewDataProvider; + + refresh(treeItems?: ITreeItem[]): TPromise; + + setVisibility(visible: boolean): void; + + focus(): void; + + layout(height: number): void; + + render(container: HTMLElement); + + getOptimalWidth(): number; +} + +export interface ICustomViewDescriptor extends IViewDescriptor { + + treeView?: boolean; + +} + +export const ICustomViewsService = createDecorator('customViewsService'); + +export interface ICustomViewsService { + _serviceBrand: any; + + getTreeViewer(id: string): ITreeViewer; + + registerTreeViewDataProvider(id: string, ITreeViewDataProvider): void; +} export type TreeViewItemHandleArg = { $treeViewId: string, @@ -200,7 +229,5 @@ export interface ITreeViewDataProvider { onDispose: Event; - getElements(): TPromise; - - getChildren(element: ITreeItem): TPromise; + getChildren(element?: ITreeItem): TPromise; } \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 7c4a15e8e7b..f04c6bdbf0e 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -20,10 +20,9 @@ import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; -import { IExtensionManagementService, LocalExtensionType, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import paths = require('vs/base/common/paths'); -import { isMacintosh, isLinux, language } from 'vs/base/common/platform'; +import { isMacintosh, isLinux } from 'vs/base/common/platform'; import { IQuickOpenService, IFilePickOpenEntry, ISeparator, IPickOpenAction, IPickOpenItem } from 'vs/platform/quickOpen/common/quickOpen'; import * as browser from 'vs/base/browser/browser'; import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; @@ -40,15 +39,18 @@ import { getPathLabel, getBaseLabel } from 'vs/base/common/labels'; import { IViewlet } from 'vs/workbench/common/viewlet'; import { IPanel } from 'vs/workbench/common/panel'; import { IWorkspaceIdentifier, getWorkspaceLabel, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; -import { FileKind, IFileService } from 'vs/platform/files/common/files'; +import { FileKind } from 'vs/platform/files/common/files'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IExtensionService, ActivationTimes } from 'vs/platform/extensions/common/extensions'; import { getEntries } from 'vs/base/common/performance'; -import { IEditor } from 'vs/platform/editor/common/editor'; -import { IIssueService, IssueReporterData, IssueType, IssueReporterStyles } from 'vs/platform/issue/common/issue'; -import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; -import { textLinkForeground, inputBackground, inputBorder, inputForeground, buttonBackground, buttonHoverBackground, buttonForeground, inputValidationErrorBorder, foreground, inputActiveOptionBorder } from 'vs/platform/theme/common/colorRegistry'; -import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; +import { IssueType } from 'vs/platform/issue/common/issue'; +import { domEvent } from 'vs/base/browser/event'; +import { once } from 'vs/base/common/event'; +import { IDisposable, toDisposable, dispose } from 'vs/base/common/lifecycle'; +import { getDomNodePagePosition, createStyleSheet, createCSSRule } from 'vs/base/browser/dom'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { Context } from 'vs/platform/contextkey/browser/contextKeyService'; +import { IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue'; // --- actions @@ -863,22 +865,6 @@ export class CloseMessagesAction extends Action { } } -export function getIssueReporterStyles(theme: ITheme): IssueReporterStyles { - return { - backgroundColor: theme.getColor(SIDE_BAR_BACKGROUND) && theme.getColor(SIDE_BAR_BACKGROUND).toString(), - color: theme.getColor(foreground).toString(), - textLinkColor: theme.getColor(textLinkForeground) && theme.getColor(textLinkForeground).toString(), - inputBackground: theme.getColor(inputBackground) && theme.getColor(inputBackground).toString(), - inputForeground: theme.getColor(inputForeground) && theme.getColor(inputForeground).toString(), - inputBorder: theme.getColor(inputBorder) && theme.getColor(inputBorder).toString(), - inputActiveBorder: theme.getColor(inputActiveOptionBorder) && theme.getColor(inputActiveOptionBorder).toString(), - inputErrorBorder: theme.getColor(inputValidationErrorBorder) && theme.getColor(inputValidationErrorBorder).toString(), - buttonBackground: theme.getColor(buttonBackground) && theme.getColor(buttonBackground).toString(), - buttonForeground: theme.getColor(buttonForeground) && theme.getColor(buttonForeground).toString(), - buttonHoverBackground: theme.getColor(buttonHoverBackground) && theme.getColor(buttonHoverBackground).toString() - }; -} - export class OpenIssueReporterAction extends Action { public static readonly ID = 'workbench.action.openIssueReporter'; public static readonly LABEL = nls.localize({ key: 'reportIssueInEnglish', comment: ['Translate this to "Report Issue in English" in all languages please!'] }, "Report Issue"); @@ -886,28 +872,14 @@ export class OpenIssueReporterAction extends Action { constructor( id: string, label: string, - @IIssueService private issueService: IIssueService, - @IThemeService private themeService: IThemeService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService + @IWorkbenchIssueService private issueService: IWorkbenchIssueService ) { super(id, label); } public run(): TPromise { - return this.extensionManagementService.getInstalled(LocalExtensionType.User).then(extensions => { - const enabledExtensions = extensions.filter(extension => this.extensionEnablementService.isEnabled(extension.identifier)); - const theme = this.themeService.getTheme(); - const issueReporterData: IssueReporterData = { - styles: getIssueReporterStyles(theme), - zoomLevel: webFrame.getZoomLevel(), - enabledExtensions - }; - - return this.issueService.openReporter(issueReporterData).then(() => { - return TPromise.as(true); - }); - }); + return this.issueService.openReporter() + .then(() => true); } } @@ -918,30 +890,15 @@ export class ReportPerformanceIssueUsingReporterAction extends Action { constructor( id: string, label: string, - @IIssueService private issueService: IIssueService, - @IThemeService private themeService: IThemeService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService + @IWorkbenchIssueService private issueService: IWorkbenchIssueService ) { super(id, label); } public run(): TPromise { - return this.extensionManagementService.getInstalled(LocalExtensionType.User).then(extensions => { - const enabledExtensions = extensions.filter(extension => this.extensionEnablementService.isEnabled(extension.identifier)); - const theme = this.themeService.getTheme(); - const issueReporterData: IssueReporterData = { - styles: getIssueReporterStyles(theme), - zoomLevel: webFrame.getZoomLevel(), - enabledExtensions, - issueType: IssueType.PerformanceIssue - }; - - // TODO: Reporter should send timings table as well - return this.issueService.openReporter(issueReporterData).then(() => { - return TPromise.as(true); - }); - }); + // TODO: Reporter should send timings table as well + return this.issueService.openReporter({ issueType: IssueType.PerformanceIssue }) + .then(() => true); } } @@ -1606,44 +1563,80 @@ export class ToggleWindowTabsBar extends Action { } } -export class ConfigureLocaleAction extends Action { - public static readonly ID = 'workbench.action.configureLocale'; - public static readonly LABEL = nls.localize('configureLocale', "Configure Language"); +export class ShowAboutDialogAction extends Action { - private static DEFAULT_CONTENT: string = [ - '{', - `\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 restarting VSCode.')}`, - `\t"locale":"${language}"`, - '}' - ].join('\n'); + public static readonly ID = 'workbench.action.showAboutDialog'; + public static LABEL = nls.localize('about', "About {0}", product.applicationName); - constructor(id: string, label: string, - @IFileService private fileService: IFileService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + constructor( + id: string, + label: string, + @IWindowsService private windowsService: IWindowsService ) { super(id, label); } - public run(event?: any): TPromise { - const file = URI.file(paths.join(this.environmentService.appSettingsHome, 'locale.json')); - return this.fileService.resolveFile(file).then(null, (error) => { - return this.fileService.createFile(file, ConfigureLocaleAction.DEFAULT_CONTENT); - }).then((stat) => { - if (!stat) { - return undefined; - } - return this.editorService.openEditor({ - resource: stat.resource, - options: { - forceOpen: true - } - }); - }, (error) => { - throw new Error(nls.localize('fail.createSettings', "Unable to create '{0}' ({1}).", getPathLabel(file, this.contextService), error)); - }); + run(): TPromise { + return this.windowsService.openAboutDialog(); + } +} + +export class InspectContextKeysAction extends Action { + + public static readonly ID = 'workbench.action.inspectContextKeys'; + public static LABEL = nls.localize('inspect context keys', "Inspect Context Keys"); + + constructor( + id: string, + label: string, + @IContextKeyService private contextKeyService: IContextKeyService, + @IWindowService private windowService: IWindowService, + ) { + super(id, label); + } + + run(): TPromise { + const disposables: IDisposable[] = []; + + const stylesheet = createStyleSheet(); + disposables.push(toDisposable(() => stylesheet.parentNode.removeChild(stylesheet))); + createCSSRule('*', 'cursor: crosshair !important;', stylesheet); + + const hoverFeedback = document.createElement('div'); + document.body.appendChild(hoverFeedback); + disposables.push(toDisposable(() => document.body.removeChild(hoverFeedback))); + + hoverFeedback.style.position = 'absolute'; + hoverFeedback.style.pointerEvents = 'none'; + hoverFeedback.style.backgroundColor = 'rgba(255, 0, 0, 0.5)'; + hoverFeedback.style.zIndex = '1000'; + + const onMouseMove = domEvent(document.body, 'mousemove', true); + disposables.push(onMouseMove(e => { + const target = e.target as HTMLElement; + const position = getDomNodePagePosition(target); + + hoverFeedback.style.top = `${position.top}px`; + hoverFeedback.style.left = `${position.left}px`; + hoverFeedback.style.width = `${position.width}px`; + hoverFeedback.style.height = `${position.height}px`; + })); + + const onMouseDown = once(domEvent(document.body, 'mousedown', true)); + onMouseDown(e => { e.preventDefault(); e.stopPropagation(); }, null, disposables); + + const onMouseUp = once(domEvent(document.body, 'mouseup', true)); + onMouseUp(e => { + e.preventDefault(); + e.stopPropagation(); + + const context = this.contextKeyService.getContext(e.target as HTMLElement) as Context; + console.log(context.collectAllValues()); + this.windowService.openDevTools(); + + dispose(disposables); + }, null, disposables); + + return TPromise.as(null); } } diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index d8057f6cf75..da39162e0b2 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -14,15 +14,13 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform'; -import { KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, OpenTipsAndTricksUrlAction, OpenIssueReporterAction, ReportPerformanceIssueUsingReporterAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseWorkspaceAction, CloseCurrentWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction, ShowStartupPerformance, ToggleSharedProcessAction, QuickSwitchWindow, QuickOpenRecentAction, inRecentFilesPickerContextKey, ConfigureLocaleAction } from 'vs/workbench/electron-browser/actions'; +import { KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, OpenTipsAndTricksUrlAction, OpenIssueReporterAction, ReportPerformanceIssueUsingReporterAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseWorkspaceAction, CloseCurrentWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction, ShowStartupPerformance, ToggleSharedProcessAction, QuickSwitchWindow, QuickOpenRecentAction, inRecentFilesPickerContextKey, ShowAboutDialogAction, InspectContextKeysAction } 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 { AddRootFolderAction, GlobalRemoveRootFolderAction, OpenWorkspaceAction, SaveWorkspaceAsAction, OpenWorkspaceConfigFileAction, OpenFolderAsWorkspaceInNewWindowAction, OpenFileFolderAction, OpenFileAction, OpenFolderAction } from 'vs/workbench/browser/actions/workspaceActions'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { inQuickOpenContext, getQuickNavigateHandler } from 'vs/workbench/browser/parts/quickopen/quickopen'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { IJSONContributionRegistry, Extensions as JSONExtensions } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; // Contribute Commands registerCommands(); @@ -67,6 +65,8 @@ if (OpenTipsAndTricksUrlAction.AVAILABLE) { workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenTipsAndTricksUrlAction, OpenTipsAndTricksUrlAction.ID, OpenTipsAndTricksUrlAction.LABEL), 'Help: Tips and Tricks', helpCategory); } +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowAboutDialogAction, ShowAboutDialogAction.ID, ShowAboutDialogAction.LABEL), 'Help: About', helpCategory); + workbenchActionsRegistry.registerWorkbenchAction( new SyncActionDescriptor(ZoomInAction, ZoomInAction.ID, ZoomInAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.US_EQUAL, @@ -112,6 +112,7 @@ workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenFo 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); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(InspectContextKeysAction, InspectContextKeysAction.ID, InspectContextKeysAction.LABEL), 'Developer: Inspect Context Keys', developerCategory); const recentFilesPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(inRecentFilesPickerContextKey)); @@ -253,6 +254,11 @@ configurationRegistry.registerConfiguration({ 'default': true, 'description': nls.localize('activityBarVisibility', "Controls the visibility of the activity bar in the workbench.") }, + 'workbench.panel.alwaysShowActions': { + 'type': 'boolean', + 'default': false, + 'description': nls.localize('panelActionVisibility', "Controls the visibility of side panel tree view actions. Panel actions may either be always visible, or only visible when that panel is focused or hovered over.") + }, 'workbench.fontAliasing': { 'type': 'string', 'enum': ['default', 'antialiased', 'none', 'auto'], @@ -374,7 +380,7 @@ configurationRegistry.registerConfiguration({ 'type': 'boolean', 'default': true, 'description': nls.localize('autoDetectHighContrast', "If enabled, will automatically change to high contrast theme if Windows is using a high contrast theme, and to dark theme when switching away from a Windows high contrast theme."), - 'included': !isWindows + 'included': isWindows }, 'window.titleBarStyle': { 'type': 'string', @@ -425,38 +431,4 @@ configurationRegistry.registerConfiguration({ 'description': nls.localize('zenMode.restore', "Controls if a window should restore to zen mode if it was exited in zen mode.") } } -}); - -// Register action to configure locale and related settings - -const registry = Registry.as(Extensions.WorkbenchActions); -registry.registerWorkbenchAction(new SyncActionDescriptor(ConfigureLocaleAction, ConfigureLocaleAction.ID, ConfigureLocaleAction.LABEL), 'Configure Language'); - -let enumValues: string[] = ['de', 'en', 'en-US', 'es', 'fr', 'it', 'ja', 'ko', 'ru', 'zh-CN', 'zh-TW']; -if (product.quality !== 'stable') { - enumValues.push('hu'); -} - -const schemaId = 'vscode://schemas/locale'; -// Keep en-US since we generated files with that content. -const schema: IJSONSchema = - { - id: schemaId, - allowComments: true, - description: 'Locale Definition file', - type: 'object', - default: { - 'locale': 'en' - }, - required: ['locale'], - properties: { - locale: { - type: 'string', - enum: enumValues, - description: nls.localize('JsonSchema.locale', 'The UI Language to use.') - } - } - }; - -const jsonRegistry = Registry.as(JSONExtensions.JSONContribution); -jsonRegistry.registerSchema(schemaId, schema); +}); \ 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 60ab815b7bc..7dee2b7d03c 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -35,7 +35,7 @@ import { IRequestService } from 'vs/platform/request/node/request'; import { RequestService } from 'vs/platform/request/electron-browser/requestService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { SearchService } from 'vs/workbench/services/search/node/searchService'; -import { LifecycleService } from 'vs/workbench/services/lifecycle/electron-browser/lifecycleService'; +import { LifecycleService } from 'vs/platform/lifecycle/electron-browser/lifecycleService'; import { MarkerService } from 'vs/platform/markers/common/markerService'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; @@ -87,8 +87,13 @@ import { IBroadcastService, BroadcastService } from 'vs/platform/broadcast/elect import { HashService } from 'vs/workbench/services/hash/node/hashService'; import { IHashService } from 'vs/workbench/services/hash/common/hashService'; import { ILogService } from 'vs/platform/log/common/log'; +import { WORKBENCH_BACKGROUND } from 'vs/workbench/common/theme'; import { stat } from 'fs'; import { join } from 'path'; +import { ILocalizationsChannel, LocalizationsChannelClient } from 'vs/platform/localizations/common/localizationsIpc'; +import { ILocalizationsService } from 'vs/platform/localizations/common/localizations'; +import { IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue'; +import { WorkbenchIssueService } from 'vs/workbench/services/issue/electron-browser/workbenchIssueService'; /** * Services that we require for the Shell @@ -339,7 +344,7 @@ export class WorkbenchShell { const instantiationService: IInstantiationService = new InstantiationService(serviceCollection, true); - this.broadcastService = new BroadcastService(this.configuration.windowId); + this.broadcastService = instantiationService.createInstance(BroadcastService, this.configuration.windowId); serviceCollection.set(IBroadcastService, this.broadcastService); serviceCollection.set(IWindowService, new SyncDescriptor(WindowService, this.configuration.windowId, this.configuration)); @@ -442,10 +447,15 @@ export class WorkbenchShell { serviceCollection.set(ISearchService, new SyncDescriptor(SearchService)); + serviceCollection.set(IWorkbenchIssueService, new SyncDescriptor(WorkbenchIssueService)); + serviceCollection.set(ICodeEditorService, new SyncDescriptor(CodeEditorServiceImpl)); serviceCollection.set(IIntegrityService, new SyncDescriptor(IntegrityServiceImpl)); + const localizationsChannel = getDelayedChannel(sharedProcess.then(c => c.getChannel('localizations'))); + serviceCollection.set(ILocalizationsService, new SyncDescriptor(LocalizationsChannelClient, localizationsChannel)); + return [instantiationService, serviceCollection]; } @@ -559,17 +569,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } // We need to set the workbench background color so that on Windows we get subpixel-antialiasing. - let workbenchBackground: string; - switch (theme.type) { - case 'dark': - workbenchBackground = '#252526'; - break; - case 'light': - workbenchBackground = '#F3F3F3'; - break; - default: - workbenchBackground = '#000000'; - } + const workbenchBackground = WORKBENCH_BACKGROUND(theme); collector.addRule(`.monaco-workbench { background-color: ${workbenchBackground}; }`); // Scrollbars diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 551bcc802f5..3666039dbf0 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -77,7 +77,7 @@ import { TextModelResolverService } from 'vs/workbench/services/textmodelResolve import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; -import { LifecycleService } from 'vs/workbench/services/lifecycle/electron-browser/lifecycleService'; +import { LifecycleService } from 'vs/platform/lifecycle/electron-browser/lifecycleService'; import { IWindowService, IWindowConfiguration as IWindowSettings, IWindowConfiguration, IPath } from 'vs/platform/windows/common/windows'; import { IMessageService } from 'vs/platform/message/common/message'; import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar'; @@ -97,6 +97,8 @@ import URI from 'vs/base/common/uri'; import { IListService, ListService } from 'vs/platform/list/browser/listService'; import { domEvent } from 'vs/base/browser/event'; import { InputFocusedContext } from 'vs/platform/workbench/common/contextkeys'; +import { ICustomViewsService } from 'vs/workbench/common/views'; +import { CustomViewsService } from 'vs/workbench/browser/parts/views/customView'; export const MessagesVisibleContext = new RawContextKey('globalMessageVisible', false); export const EditorsVisibleContext = new RawContextKey('editorIsOpen', false); @@ -541,6 +543,10 @@ export class Workbench implements IPartService { this.toUnbind.push({ dispose: () => this.panelPart.shutdown() }); serviceCollection.set(IPanelService, this.panelPart); + // Custom views service + const customViewsService = this.instantiationService.createInstance(CustomViewsService); + serviceCollection.set(ICustomViewsService, customViewsService); + // Activity service (activitybar part) this.activitybarPart = this.instantiationService.createInstance(ActivitybarPart, Identifiers.ACTIVITYBAR_PART); this.toUnbind.push({ dispose: () => this.activitybarPart.shutdown() }); diff --git a/src/vs/workbench/parts/backup/common/backupRestorer.ts b/src/vs/workbench/parts/backup/common/backupRestorer.ts index 6e1d90e3e7e..54c0b064a01 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, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import errors = require('vs/base/common/errors'); import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; @@ -17,6 +17,7 @@ import { Position, IResourceInput, IUntitledResourceInput } from 'vs/platform/ed import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { Schemas } from 'vs/base/common/network'; import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { IFileService } from 'vs/platform/files/common/files'; export class BackupRestorer implements IWorkbenchContribution { @@ -28,7 +29,8 @@ export class BackupRestorer implements IWorkbenchContribution { @IBackupFileService private backupFileService: IBackupFileService, @ITextFileService private textFileService: ITextFileService, @IEditorGroupService private groupService: IEditorGroupService, - @ILifecycleService private lifecycleService: ILifecycleService + @ILifecycleService private lifecycleService: ILifecycleService, + @IFileService private fileService: IFileService ) { this.restoreBackups(); } @@ -67,9 +69,9 @@ export class BackupRestorer implements IWorkbenchContribution { backups.forEach(backup => { if (stacks.isOpen(backup)) { - if (backup.scheme === Schemas.file) { + if (this.fileService.canHandleResource(backup)) { restorePromises.push(this.textFileService.models.loadOrCreate(backup).then(null, () => unresolved.push(backup))); - } else if (backup.scheme === UNTITLED_SCHEMA) { + } else if (backup.scheme === Schemas.untitled) { restorePromises.push(this.untitledEditorService.loadOrCreate({ resource: backup }).then(null, () => unresolved.push(backup))); } } else { @@ -92,7 +94,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_SCHEMA && !BackupRestorer.UNTITLED_REGEX.test(resource.fsPath)) { + if (resource.scheme === Schemas.untitled && !BackupRestorer.UNTITLED_REGEX.test(resource.fsPath)) { return { filePath: resource.fsPath, options }; } diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.ts b/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.ts index 4c878b344b3..fee6b3b5579 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/textMate/inspectTMScopes.ts @@ -273,7 +273,7 @@ class InspectTMScopesWidget extends Disposable implements IContentWidget { let theme = this._themeService.getColorTheme(); result += ``; - let matchingRule = findMatchingThemeRule(theme, data.tokens1[token1Index].scopes); + let matchingRule = findMatchingThemeRule(theme, data.tokens1[token1Index].scopes, false); if (matchingRule) { result += `${matchingRule.rawSelector}\n${JSON.stringify(matchingRule.settings, null, '\t')}`; } else { diff --git a/src/vs/workbench/parts/debug/browser/breakpointWidget.ts b/src/vs/workbench/parts/debug/browser/breakpointWidget.ts index a9133e661c8..4c57aa11630 100644 --- a/src/vs/workbench/parts/debug/browser/breakpointWidget.ts +++ b/src/vs/workbench/parts/debug/browser/breakpointWidget.ts @@ -15,7 +15,7 @@ import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { ZoneWidget } from 'vs/editor/contrib/zoneWidget/zoneWidget'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; -import { IDebugService, IBreakpoint, IRawBreakpoint } from 'vs/workbench/parts/debug/common/debug'; +import { IDebugService, IBreakpoint } from 'vs/workbench/parts/debug/common/debug'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { once } from 'vs/base/common/functional'; import { attachInputBoxStyler, attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; @@ -109,31 +109,38 @@ export class BreakpointWidget extends ZoneWidget { const oldBreakpoint = this.debugService.getModel().getBreakpoints() .filter(bp => bp.lineNumber === this.lineNumber && bp.column === this.column && bp.uri.toString() === uri.toString()).pop(); - const raw: IRawBreakpoint = { - lineNumber: this.lineNumber, - column: oldBreakpoint ? oldBreakpoint.column : undefined, - enabled: true, - condition: oldBreakpoint && oldBreakpoint.condition, - hitCondition: oldBreakpoint && oldBreakpoint.hitCondition - }; + let condition = oldBreakpoint && oldBreakpoint.condition; + let hitCondition = oldBreakpoint && oldBreakpoint.hitCondition; if (this.hitCountContext) { - raw.hitCondition = this.inputBox.value; + hitCondition = this.inputBox.value; if (this.conditionInput) { - raw.condition = this.conditionInput; + condition = this.conditionInput; } } else { - raw.condition = this.inputBox.value; + condition = this.inputBox.value; if (this.hitCountInput) { - raw.hitCondition = this.hitCountInput; + hitCondition = this.hitCountInput; } } if (oldBreakpoint) { - this.debugService.removeBreakpoints(oldBreakpoint.getId()).done(null, errors.onUnexpectedError); + this.debugService.updateBreakpoints(oldBreakpoint.uri, { + [oldBreakpoint.getId()]: { + condition, + hitCondition, + verified: oldBreakpoint.verified + } + }); + } else { + this.debugService.addBreakpoints(uri, [{ + lineNumber: this.lineNumber, + column: oldBreakpoint ? oldBreakpoint.column : undefined, + enabled: true, + condition, + hitCondition + }]).done(null, errors.onUnexpectedError); } - - this.debugService.addBreakpoints(uri, [raw]).done(null, errors.onUnexpectedError); } this.dispose(); diff --git a/src/vs/workbench/parts/debug/browser/debugActionItems.ts b/src/vs/workbench/parts/debug/browser/debugActionItems.ts index 526d46c3640..4d6367248ac 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionItems.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionItems.ts @@ -158,7 +158,7 @@ export class StartDebugActionItem implements IActionItem { const inWorkspace = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE; manager.getLaunches().forEach(launch => launch.getConfigurationNames().forEach(name => { - if (name === manager.selectedName && launch === manager.selectedLaunch) { + if (name === manager.selectedConfiguration.name && launch === manager.selectedConfiguration.launch) { this.selected = this.options.length; } const label = inWorkspace ? `${name} (${launch.name})` : name; diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index 293425c4a9f..8cbe0a6d287 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -77,7 +77,8 @@ export class ConfigureAction extends AbstractDebugAction { constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, - @IMessageService private messageService: IMessageService + @IMessageService private messageService: IMessageService, + @IWorkspaceContextService private contextService: IWorkspaceContextService ) { super(id, label, 'debug-action configure', debugService, keybindingService); this.toDispose.push(debugService.getConfigurationManager().onDidSelectConfiguration(() => this.updateClass())); @@ -85,7 +86,7 @@ export class ConfigureAction extends AbstractDebugAction { } public get tooltip(): string { - if (this.debugService.getConfigurationManager().selectedName) { + if (this.debugService.getConfigurationManager().selectedConfiguration.name) { return ConfigureAction.LABEL; } @@ -93,17 +94,17 @@ export class ConfigureAction extends AbstractDebugAction { } private updateClass(): void { - this.class = this.debugService.getConfigurationManager().selectedName ? 'debug-action configure' : 'debug-action configure notification'; + this.class = this.debugService.getConfigurationManager().selectedConfiguration.name ? 'debug-action configure' : 'debug-action configure notification'; } public run(event?: any): TPromise { - if (!this.debugService.getConfigurationManager().selectedLaunch) { + if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) { this.messageService.show(severity.Info, nls.localize('noFolderDebugConfig', "Please first open a folder in order to do advanced debug configuration.")); return TPromise.as(null); } const sideBySide = !!(event && (event.ctrlKey || event.metaKey)); - return this.debugService.getConfigurationManager().selectedLaunch.openConfigFile(sideBySide); + return this.debugService.getConfigurationManager().selectedConfiguration.launch.openConfigFile(sideBySide); } } @@ -124,7 +125,7 @@ export class StartAction extends AbstractDebugAction { } public run(): TPromise { - const launch = this.debugService.getConfigurationManager().selectedLaunch; + const launch = this.debugService.getConfigurationManager().selectedConfiguration.launch; return this.debugService.startDebugging(launch ? launch.workspace : undefined, undefined, this.isNoDebug()); } @@ -134,7 +135,7 @@ export class StartAction extends AbstractDebugAction { public static isEnabled(debugService: IDebugService, contextService: IWorkspaceContextService, configName: string) { const processes = debugService.getModel().getProcesses(); - const launch = debugService.getConfigurationManager().selectedLaunch; + const launch = debugService.getConfigurationManager().selectedConfiguration.launch; if (debugService.state === State.Initializing) { return false; @@ -155,7 +156,7 @@ export class StartAction extends AbstractDebugAction { // Disabled if the launch drop down shows the launch config that is already running. protected isEnabled(state: State): boolean { - return StartAction.isEnabled(this.debugService, this.contextService, this.debugService.getConfigurationManager().selectedName); + return StartAction.isEnabled(this.debugService, this.contextService, this.debugService.getConfigurationManager().selectedConfiguration.name); } } diff --git a/src/vs/workbench/parts/debug/browser/debugEditorActions.ts b/src/vs/workbench/parts/debug/browser/debugEditorActions.ts index 96b73045e07..994864b155f 100644 --- a/src/vs/workbench/parts/debug/browser/debugEditorActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugEditorActions.ts @@ -49,63 +49,6 @@ class ToggleBreakpointAction extends EditorAction { } } -function addColumnBreakpoint(accessor: ServicesAccessor, editor: ICodeEditor, remove: boolean): TPromise { - const debugService = accessor.get(IDebugService); - - const position = editor.getPosition(); - const modelUri = editor.getModel().uri; - const bp = debugService.getModel().getBreakpoints() - .filter(bp => bp.lineNumber === position.lineNumber && bp.column === position.column && bp.uri.toString() === modelUri.toString()).pop(); - - if (bp) { - return remove ? debugService.removeBreakpoints(bp.getId()) : TPromise.as(null); - } - if (debugService.getConfigurationManager().canSetBreakpointsIn(editor.getModel())) { - return debugService.addBreakpoints(modelUri, [{ lineNumber: position.lineNumber, column: position.column }]); - } - - return TPromise.as(null); -} - -class ToggleColumnBreakpointAction extends EditorAction { - constructor() { - super({ - id: 'editor.debug.action.toggleColumnBreakpoint', - label: nls.localize('columnBreakpointAction', "Debug: Column Breakpoint"), - alias: 'Debug: Column Breakpoint', - precondition: null, - kbOpts: { - kbExpr: EditorContextKeys.textFocus, - primary: KeyMod.Shift | KeyCode.F9 - } - }); - } - - public run(accessor: ServicesAccessor, editor: ICodeEditor): TPromise { - return addColumnBreakpoint(accessor, editor, true); - } -} - -// TODO@Isidor merge two column breakpoints actions together -class ToggleColumnBreakpointContextMenuAction extends EditorAction { - constructor() { - super({ - id: 'editor.debug.action.toggleColumnBreakpointContextMenu', - label: nls.localize('columnBreakpoint', "Add Column Breakpoint"), - alias: 'Toggle Column Breakpoint', - precondition: ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, CONTEXT_NOT_IN_DEBUG_REPL, EditorContextKeys.writable), - menuOpts: { - group: 'debug', - order: 1 - } - }); - } - - public run(accessor: ServicesAccessor, editor: ICodeEditor): TPromise { - return addColumnBreakpoint(accessor, editor, false); - } -} - class ConditionalBreakpointAction extends EditorAction { constructor() { @@ -268,12 +211,9 @@ class CloseBreakpointWidgetCommand extends EditorCommand { } registerEditorAction(ToggleBreakpointAction); -registerEditorAction(ToggleColumnBreakpointAction); -registerEditorAction(ToggleColumnBreakpointContextMenuAction); registerEditorAction(ConditionalBreakpointAction); registerEditorAction(RunToCursorAction); registerEditorAction(SelectionToReplAction); registerEditorAction(SelectionToWatchExpressionsAction); registerEditorAction(ShowDebugHoverAction); - registerEditorCommand(new CloseBreakpointWidgetCommand()); diff --git a/src/vs/workbench/parts/debug/browser/debugQuickOpen.ts b/src/vs/workbench/parts/debug/browser/debugQuickOpen.ts index 909b65532b8..c75ddf12c13 100644 --- a/src/vs/workbench/parts/debug/browser/debugQuickOpen.ts +++ b/src/vs/workbench/parts/debug/browser/debugQuickOpen.ts @@ -103,7 +103,7 @@ export class DebugQuickOpenHandler extends Quickopen.QuickOpenHandler { launch.getConfigurationNames().map(config => ({ config: config, highlights: Filters.matchesContiguousSubString(input, config) })) .filter(({ highlights }) => !!highlights) .forEach(({ config, highlights }) => { - if (launch === configManager.selectedLaunch && config === configManager.selectedName) { + if (launch === configManager.selectedConfiguration.launch && config === configManager.selectedConfiguration.name) { this.autoFocusIndex = configurations.length; } configurations.push(new StartDebugEntry(this.debugService, this.contextService, this.messageService, launch, config, highlights)); diff --git a/src/vs/workbench/parts/debug/browser/debugStatus.ts b/src/vs/workbench/parts/debug/browser/debugStatus.ts index 01e55d619ed..4d43982f5e7 100644 --- a/src/vs/workbench/parts/debug/browser/debugStatus.ts +++ b/src/vs/workbench/parts/debug/browser/debugStatus.ts @@ -92,10 +92,10 @@ export class DebugStatus extends Themable implements IStatusbarItem { private setLabel(): void { if (this.label && this.statusBarItem) { const manager = this.debugService.getConfigurationManager(); - if (manager.selectedName) { - const name = manager.selectedName; + const name = manager.selectedConfiguration.name; + if (name) { this.statusBarItem.style.display = 'block'; - this.label.textContent = manager.getLaunches().length > 1 ? `${name} (${manager.selectedLaunch.name})` : name; + this.label.textContent = manager.getLaunches().length > 1 ? `${name} (${manager.selectedConfiguration.launch.name})` : name; } else { this.statusBarItem.style.display = 'none'; } diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index 67381c841c1..eddef39bcdd 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -82,7 +82,7 @@ export class DebugViewlet extends PersistentViewsViewlet { } public getActionItem(action: IAction): IActionItem { - if (action.id === StartAction.ID && !!this.debugService.getConfigurationManager().selectedLaunch) { + if (action.id === StartAction.ID) { this.startDebugActionItem = this.instantiationService.createInstance(StartDebugActionItem, null, action); return this.startDebugActionItem; } diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index a1e04b14335..69096337e0d 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -40,6 +40,7 @@ export const CONTEXT_BREAKPOINT_WIDGET_VISIBLE = new RawContextKey('bre export const CONTEXT_BREAKPOINTS_FOCUSED = new RawContextKey('breakpointsFocused', true); export const CONTEXT_WATCH_EXPRESSIONS_FOCUSED = new RawContextKey('watchExpressionsFocused', true); export const CONTEXT_VARIABLES_FOCUSED = new RawContextKey('variablesFocused', true); +export const CONTEXT_EXPRESSION_SELECTED = new RawContextKey('expressionSelected', false); export const EDITOR_CONTRIBUTION_ID = 'editor.contrib.debug'; export const DEBUG_SCHEME = 'debug'; @@ -222,7 +223,7 @@ export interface IEnablement extends ITreeElement { enabled: boolean; } -export interface IRawBreakpoint { +export interface IBreakpointData { id?: string; lineNumber: number; column?: number; @@ -231,6 +232,11 @@ export interface IRawBreakpoint { hitCondition?: string; } +export interface IBreakpointUpdateData extends DebugProtocol.Breakpoint { + condition?: string; + hitCondition?: string; +} + export interface IBreakpoint extends IEnablement { uri: uri; lineNumber: number; @@ -329,12 +335,12 @@ export enum State { export interface IDebugConfiguration { allowBreakpointsEverywhere: boolean; - openDebug: string; + openDebug: 'neverOpen' | 'openOnSessionStart' | 'openOnFirstSessionStart'; openExplorerOnEnd: boolean; inlineValues: boolean; hideActionBar: boolean; - showInStatusBar: string; - internalConsoleOptions: string; + showInStatusBar: 'never' | 'always' | 'onFirstSessionStart'; + internalConsoleOptions: 'neverOpen' | 'openOnSessionStart' | 'openOnFirstSessionStart'; } export interface IGlobalConfig { @@ -347,7 +353,7 @@ export interface IEnvConfig { name?: string; type: string; request: string; - internalConsoleOptions?: string; + internalConsoleOptions?: 'neverOpen' | 'openOnSessionStart' | 'openOnFirstSessionStart'; preLaunchTask?: string; __restart?: any; __sessionId?: string; @@ -412,11 +418,12 @@ export interface IConfigurationManager { canSetBreakpointsIn(model: EditorIModel): boolean; /** - * Returns null for no folder workspace. Otherwise returns a launch object corresponding to the selected debug configuration. + * Returns an object containing the selected launch configuration and the selected configuration name. Both these fields can be null (no folder workspace). */ - selectedLaunch: ILaunch; - - selectedName: string; + selectedConfiguration: { + launch: ILaunch; + name: string; + }; selectConfiguration(launch: ILaunch, name?: string, debugStarted?: boolean): void; @@ -535,12 +542,12 @@ export interface IDebugService { /** * Adds new breakpoints to the model for the file specified with the uri. Notifies debug adapter of breakpoint changes. */ - addBreakpoints(uri: uri, rawBreakpoints: IRawBreakpoint[]): TPromise; + addBreakpoints(uri: uri, rawBreakpoints: IBreakpointData[]): TPromise; /** * Updates the breakpoints. */ - updateBreakpoints(uri: uri, data: { [id: string]: DebugProtocol.Breakpoint }): void; + updateBreakpoints(uri: uri, data: { [id: string]: IBreakpointUpdateData }): void; /** * Enables or disables all breakpoints. If breakpoint is passed only enables or disables the passed breakpoint. diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 4e95270d430..0397bc389b7 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -20,7 +20,7 @@ import { ISuggestion } from 'vs/editor/common/modes'; import { Position } from 'vs/editor/common/core/position'; import { ITreeElement, IExpression, IExpressionContainer, IProcess, IStackFrame, IExceptionBreakpoint, IBreakpoint, IFunctionBreakpoint, IModel, IReplElementSource, - IConfig, ISession, IThread, IRawModelUpdate, IScope, IRawStoppedDetails, IEnablement, IRawBreakpoint, IExceptionInfo, IReplElement, ProcessState, IBreakpointsChangeEvent + IConfig, ISession, IThread, IRawModelUpdate, IScope, IRawStoppedDetails, IEnablement, IBreakpointData, IExceptionInfo, IReplElement, ProcessState, IBreakpointsChangeEvent, IBreakpointUpdateData } from 'vs/workbench/parts/debug/common/debug'; import { Source } from 'vs/workbench/parts/debug/common/debugSource'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -864,7 +864,7 @@ export class Model implements IModel { this._onDidChangeBreakpoints.fire(); } - public addBreakpoints(uri: uri, rawData: IRawBreakpoint[], fireEvent = true): Breakpoint[] { + public addBreakpoints(uri: uri, rawData: IBreakpointData[], fireEvent = true): Breakpoint[] { const newBreakpoints = rawData.map(rawBp => new Breakpoint(uri, rawBp.lineNumber, rawBp.column, rawBp.enabled, rawBp.condition, rawBp.hitCondition, undefined, rawBp.id)); this.breakpoints = this.breakpoints.concat(newBreakpoints); this.breakpointsActivated = true; @@ -882,7 +882,7 @@ export class Model implements IModel { this._onDidChangeBreakpoints.fire({ removed: toRemove }); } - public updateBreakpoints(data: { [id: string]: DebugProtocol.Breakpoint }): void { + public updateBreakpoints(data: { [id: string]: IBreakpointUpdateData }): void { const updated: IBreakpoint[] = []; this.breakpoints.forEach(bp => { const bpData = data[bp.getId()]; @@ -895,6 +895,8 @@ export class Model implements IModel { bp.idFromAdapter = bpData.id; bp.message = bpData.message; bp.adapterData = bpData.source ? bpData.source.adapterData : bp.adapterData; + bp.condition = bpData.condition || bp.condition; + bp.hitCondition = bpData.hitCondition || bp.hitCondition; updated.push(bp); } }); @@ -1046,10 +1048,12 @@ export class Model implements IModel { return this.watchExpressions; } - public addWatchExpression(process: IProcess, stackFrame: IStackFrame, name: string): void { + public addWatchExpression(process: IProcess, stackFrame: IStackFrame, name: string): IExpression { const we = new Expression(name); this.watchExpressions.push(we); this._onDidChangeWatchExpressions.fire(we); + + return we; } public renameWatchExpression(process: IProcess, stackFrame: IStackFrame, id: string, newName: string): void { diff --git a/src/vs/workbench/parts/debug/common/debugSource.ts b/src/vs/workbench/parts/debug/common/debugSource.ts index 3816e33cb70..a1c372db5a0 100644 --- a/src/vs/workbench/parts/debug/common/debugSource.ts +++ b/src/vs/workbench/parts/debug/common/debugSource.ts @@ -11,6 +11,7 @@ import * as resources from 'vs/base/common/resources'; import { DEBUG_SCHEME } from 'vs/workbench/parts/debug/common/debug'; import { IRange } from 'vs/editor/common/core/range'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { Schemas } from 'vs/base/common/network'; const UNKNOWN_SOURCE_LABEL = nls.localize('unknownSource', "Unknown Source"); @@ -76,7 +77,7 @@ export class Source { let processId: string; switch (modelUri.scheme) { - case 'file': + case Schemas.file: path = paths.normalize(modelUri.fsPath, true); break; case DEBUG_SCHEME: diff --git a/src/vs/workbench/parts/debug/common/debugViewModel.ts b/src/vs/workbench/parts/debug/common/debugViewModel.ts index 7e877a1ebb1..fcfb554b07f 100644 --- a/src/vs/workbench/parts/debug/common/debugViewModel.ts +++ b/src/vs/workbench/parts/debug/common/debugViewModel.ts @@ -4,44 +4,47 @@ *--------------------------------------------------------------------------------------------*/ import Event, { Emitter } from 'vs/base/common/event'; -import * as debug from 'vs/workbench/parts/debug/common/debug'; +import { CONTEXT_EXPRESSION_SELECTED, IViewModel, IStackFrame, IProcess, IThread, IExpression, IFunctionBreakpoint } from 'vs/workbench/parts/debug/common/debug'; +import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; -export class ViewModel implements debug.IViewModel { +export class ViewModel implements IViewModel { - private _focusedStackFrame: debug.IStackFrame; - private _focusedProcess: debug.IProcess; - private _focusedThread: debug.IThread; - private selectedExpression: debug.IExpression; - private selectedFunctionBreakpoint: debug.IFunctionBreakpoint; - private _onDidFocusProcess: Emitter; - private _onDidFocusStackFrame: Emitter<{ stackFrame: debug.IStackFrame, explicit: boolean }>; - private _onDidSelectExpression: Emitter; + private _focusedStackFrame: IStackFrame; + private _focusedProcess: IProcess; + private _focusedThread: IThread; + private selectedExpression: IExpression; + private selectedFunctionBreakpoint: IFunctionBreakpoint; + private _onDidFocusProcess: Emitter; + private _onDidFocusStackFrame: Emitter<{ stackFrame: IStackFrame, explicit: boolean }>; + private _onDidSelectExpression: Emitter; private multiProcessView: boolean; + private expressionSelectedContextKey: IContextKey; - constructor() { - this._onDidFocusProcess = new Emitter(); - this._onDidFocusStackFrame = new Emitter<{ stackFrame: debug.IStackFrame, explicit: boolean }>(); - this._onDidSelectExpression = new Emitter(); + constructor(contextKeyService: IContextKeyService) { + this._onDidFocusProcess = new Emitter(); + this._onDidFocusStackFrame = new Emitter<{ stackFrame: IStackFrame, explicit: boolean }>(); + this._onDidSelectExpression = new Emitter(); this.multiProcessView = false; + this.expressionSelectedContextKey = CONTEXT_EXPRESSION_SELECTED.bindTo(contextKeyService); } public getId(): string { return 'root'; } - public get focusedProcess(): debug.IProcess { + public get focusedProcess(): IProcess { return this._focusedProcess; } - public get focusedThread(): debug.IThread { + public get focusedThread(): IThread { return this._focusedStackFrame ? this._focusedStackFrame.thread : (this._focusedProcess ? this._focusedProcess.getAllThreads().pop() : null); } - public get focusedStackFrame(): debug.IStackFrame { + public get focusedStackFrame(): IStackFrame { return this._focusedStackFrame; } - public setFocus(stackFrame: debug.IStackFrame, thread: debug.IThread, process: debug.IProcess, explicit: boolean): void { + public setFocus(stackFrame: IStackFrame, thread: IThread, process: IProcess, explicit: boolean): void { let shouldEmit = this._focusedProcess !== process || this._focusedThread !== thread || this._focusedStackFrame !== stackFrame; if (this._focusedProcess !== process) { @@ -56,32 +59,33 @@ export class ViewModel implements debug.IViewModel { } } - public get onDidFocusProcess(): Event { + public get onDidFocusProcess(): Event { return this._onDidFocusProcess.event; } - public get onDidFocusStackFrame(): Event<{ stackFrame: debug.IStackFrame, explicit: boolean }> { + public get onDidFocusStackFrame(): Event<{ stackFrame: IStackFrame, explicit: boolean }> { return this._onDidFocusStackFrame.event; } - public getSelectedExpression(): debug.IExpression { + public getSelectedExpression(): IExpression { return this.selectedExpression; } - public setSelectedExpression(expression: debug.IExpression) { + public setSelectedExpression(expression: IExpression) { this.selectedExpression = expression; + this.expressionSelectedContextKey.set(!!expression); this._onDidSelectExpression.fire(expression); } - public get onDidSelectExpression(): Event { + public get onDidSelectExpression(): Event { return this._onDidSelectExpression.event; } - public getSelectedFunctionBreakpoint(): debug.IFunctionBreakpoint { + public getSelectedFunctionBreakpoint(): IFunctionBreakpoint { return this.selectedFunctionBreakpoint; } - public setSelectedFunctionBreakpoint(functionBreakpoint: debug.IFunctionBreakpoint): void { + public setSelectedFunctionBreakpoint(functionBreakpoint: IFunctionBreakpoint): void { this.selectedFunctionBreakpoint = functionBreakpoint; } diff --git a/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts b/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts index 51060145213..81e1c7d7483 100644 --- a/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/baseDebugView.ts @@ -5,7 +5,7 @@ import * as dom from 'vs/base/browser/dom'; import { IExpression, IDebugService, IEnablement } from 'vs/workbench/parts/debug/common/debug'; -import { Expression, FunctionBreakpoint, Variable } from 'vs/workbench/parts/debug/common/debugModel'; +import { Expression, Variable } from 'vs/workbench/parts/debug/common/debugModel'; import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { ITree, ContextMenuEvent, IActionProvider } from 'vs/base/parts/tree/browser/tree'; @@ -15,7 +15,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { once } from 'vs/base/common/functional'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IMenuService, MenuId, IMenu } from 'vs/platform/actions/common/actions'; -import { ClickBehavior, IControllerOptions } from 'vs/base/parts/tree/browser/treeDefaults'; +import { IControllerOptions } from 'vs/base/parts/tree/browser/treeDefaults'; import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { KeyCode } from 'vs/base/common/keyCodes'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; @@ -136,7 +136,6 @@ export function renderRenameBox(debugService: IDebugService, contextViewService: }); const styler = attachInputBoxStyler(inputBox, themeService); - tree.setHighlight(); inputBox.value = options.initialValue ? options.initialValue : ''; inputBox.focus(); inputBox.select(); @@ -149,12 +148,10 @@ export function renderRenameBox(debugService: IDebugService, contextViewService: disposed = true; if (element instanceof Expression && renamed && inputBox.value) { debugService.renameWatchExpression(element.getId(), inputBox.value); + debugService.getViewModel().setSelectedExpression(undefined); } else if (element instanceof Expression && !element.name) { debugService.removeWatchExpressions(element.getId()); - } else if (element instanceof FunctionBreakpoint && inputBox.value) { - debugService.renameFunctionBreakpoint(element.getId(), renamed ? inputBox.value : element.name).done(null, onUnexpectedError); - } else if (element instanceof FunctionBreakpoint && !element.name) { - debugService.removeFunctionBreakpoints(element.getId()).done(null, onUnexpectedError); + debugService.getViewModel().setSelectedExpression(undefined); } else if (element instanceof Variable) { element.errorMessage = null; if (renamed && element.value !== inputBox.value) { @@ -168,7 +165,6 @@ export function renderRenameBox(debugService: IDebugService, contextViewService: } } - tree.clearHighlight(); tree.DOMFocus(); tree.setFocus(element); @@ -192,8 +188,6 @@ export function renderRenameBox(debugService: IDebugService, contextViewService: })); } -export const DefaultDebugControllerOptions: IControllerOptions = { clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: false }; - export class BaseDebugController extends WorkbenchTreeController { private contributedContextMenu: IMenu; diff --git a/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts b/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts index c6692a98a85..58878dbf3df 100644 --- a/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts @@ -26,12 +26,13 @@ import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { IDelegate, IListContextMenuEvent, IRenderer } from 'vs/base/browser/ui/list/list'; import { IEditorService, IEditor } from 'vs/platform/editor/common/editor'; import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; -import { IKeyboardEvent, StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; import { WorkbenchList } from 'vs/platform/list/browser/listService'; import { ViewsViewletPanel, IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; import { isCodeEditor } from 'vs/editor/browser/editorBrowser'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; const $ = dom.$; @@ -51,9 +52,10 @@ export class BreakpointsView extends ViewsViewletPanel { @IInstantiationService private instantiationService: IInstantiationService, @IThemeService private themeService: IThemeService, @IEditorService private editorService: IEditorService, - @IContextViewService private contextViewService: IContextViewService + @IContextViewService private contextViewService: IContextViewService, + @IConfigurationService configurationService: IConfigurationService ) { - super(options, keybindingService, contextMenuService); + super(options, keybindingService, contextMenuService, configurationService); this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize(); this.settings = options.viewletSettings; @@ -72,23 +74,12 @@ export class BreakpointsView extends ViewsViewletPanel { ], { identityProvider: element => element.getId(), multipleSelectionSupport: false - }); + }) as WorkbenchList; CONTEXT_BREAKPOINTS_FOCUSED.bindTo(this.list.contextKeyService); this.list.onContextMenu(this.onListContextMenu, this, this.disposables); - const handleBreakpointFocus = (preserveFocus: boolean, sideBySide: boolean, selectFunctionBreakpoint: boolean) => { - const focused = this.list.getFocusedElements(); - const element = focused.length ? focused[0] : undefined; - if (element instanceof Breakpoint) { - openBreakpointSource(element, sideBySide, preserveFocus, this.debugService, this.editorService).done(undefined, onUnexpectedError); - } - if (selectFunctionBreakpoint && element instanceof FunctionBreakpoint && element !== this.debugService.getViewModel().getSelectedFunctionBreakpoint()) { - this.debugService.getViewModel().setSelectedFunctionBreakpoint(element); - this.onBreakpointsChange(); - } - }; this.disposables.push(this.list.onOpen(e => { let isSingleClick = false; let isDoubleClick = false; @@ -101,14 +92,14 @@ export class BreakpointsView extends ViewsViewletPanel { openToSide = (browserEvent.ctrlKey || browserEvent.metaKey || browserEvent.altKey); } - handleBreakpointFocus(isSingleClick, openToSide, isDoubleClick); - })); - - // TODO@Isidor this should be a command (breakpoints.openToSide) - this.disposables.push(this.list.onKeyUp(e => { - const event = new StandardKeyboardEvent(e); - if (event.equals(KeyCode.Enter) && (event.ctrlKey || event.metaKey || event.altKey)) { - handleBreakpointFocus(false, true, false); + const focused = this.list.getFocusedElements(); + const element = focused.length ? focused[0] : undefined; + if (element instanceof Breakpoint) { + openBreakpointSource(element, openToSide, isSingleClick, this.debugService, this.editorService).done(undefined, onUnexpectedError); + } + if (isDoubleClick && element instanceof FunctionBreakpoint && element !== this.debugService.getViewModel().getSelectedFunctionBreakpoint()) { + this.debugService.getViewModel().setSelectedFunctionBreakpoint(element); + this.onBreakpointsChange(); } })); @@ -495,7 +486,7 @@ class FunctionBreakpointInputRenderer implements IRenderer { +export function openBreakpointSource(breakpoint: Breakpoint, sideBySide: boolean, preserveFocus: boolean, debugService: IDebugService, editorService: IEditorService): TPromise { if (breakpoint.uri.scheme === DEBUG_SCHEME && debugService.state === State.Inactive) { return TPromise.as(null); } diff --git a/src/vs/workbench/parts/debug/electron-browser/callStackView.ts b/src/vs/workbench/parts/debug/electron-browser/callStackView.ts index 894be8083de..b1931df1789 100644 --- a/src/vs/workbench/parts/debug/electron-browser/callStackView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/callStackView.ts @@ -15,7 +15,7 @@ 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 { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { BaseDebugController, twistiePixels, renderViewTree, DefaultDebugControllerOptions } from 'vs/workbench/parts/debug/electron-browser/baseDebugView'; +import { BaseDebugController, twistiePixels, renderViewTree } from 'vs/workbench/parts/debug/electron-browser/baseDebugView'; import { ITree, IActionProvider, IDataSource, IRenderer, IAccessibilityProvider } from 'vs/base/parts/tree/browser/tree'; import { IAction, IActionItem } from 'vs/base/common/actions'; import { RestartAction, StopAction, ContinueAction, StepOverAction, StepIntoAction, StepOutAction, PauseAction, RestartFrameAction } from 'vs/workbench/parts/debug/browser/debugActions'; @@ -26,6 +26,7 @@ import { Source } from 'vs/workbench/parts/debug/common/debugSource'; import { basenameOrAuthority } from 'vs/base/common/resources'; import { TreeResourceNavigator, WorkbenchTree } from 'vs/platform/list/browser/listService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; const $ = dom.$; @@ -38,6 +39,7 @@ export class CallStackView extends TreeViewsViewletPanel { private settings: any; private needsRefresh: boolean; private ignoreSelectionChangedEvent: boolean; + private treeContainer: HTMLElement; constructor( private options: IViewletViewOptions, @@ -46,8 +48,9 @@ export class CallStackView extends TreeViewsViewletPanel { @IKeybindingService keybindingService: IKeybindingService, @IInstantiationService private instantiationService: IInstantiationService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IConfigurationService configurationService: IConfigurationService, ) { - super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService); + super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService, configurationService); this.settings = options.viewletSettings; // Create scheduler to prevent unnecessary flashing of tree when reacting to changes @@ -92,7 +95,7 @@ export class CallStackView extends TreeViewsViewletPanel { dom.addClass(container, 'debug-call-stack'); this.treeContainer = renderViewTree(container); const actionProvider = new CallStackActionProvider(this.debugService, this.keybindingService); - const controller = this.instantiationService.createInstance(CallStackController, actionProvider, MenuId.DebugCallStackContext, DefaultDebugControllerOptions); + const controller = this.instantiationService.createInstance(CallStackController, actionProvider, MenuId.DebugCallStackContext, {}); this.tree = this.instantiationService.createInstance(WorkbenchTree, this.treeContainer, { dataSource: new CallStackDataSource(), @@ -157,6 +160,13 @@ export class CallStackView extends TreeViewsViewletPanel { } } + layoutBody(size: number): void { + if (this.treeContainer) { + this.treeContainer.style.height = size + 'px'; + } + super.layoutBody(size); + } + private updateTreeSelection(): TPromise { if (!this.tree.getInput()) { // Tree not initialized yet diff --git a/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts b/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts index 3387c35f8a5..889506d01c5 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts @@ -9,34 +9,24 @@ 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'; -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, WorkbenchState } from 'vs/platform/workspace/common/workspace'; -import { IDebugService, IEnablement, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED, EDITOR_CONTRIBUTION_ID, IDebugEditorContribution } from 'vs/workbench/parts/debug/common/debug'; +import { IDebugService, IEnablement, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED, EDITOR_CONTRIBUTION_ID, IDebugEditorContribution, CONTEXT_IN_DEBUG_MODE, CONTEXT_NOT_IN_DEBUG_REPL, CONTEXT_EXPRESSION_SELECTED } 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'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; +import { CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { openBreakpointSource } from 'vs/workbench/parts/debug/electron-browser/breakpointsView'; export function registerCommands(): void { - // TODO@Isidor remove in february - KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: 'debug.logToDebugConsole', - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - handler: (accessor: ServicesAccessor, value: string) => { - if (typeof value === 'string') { - const debugService = accessor.get(IDebugService); - // Use warning as severity to get the orange color for messages coming from the debug extension - debugService.logToRepl(value, severity.Warning); - } - }, - when: undefined, - primary: undefined - }); - KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'debug.toggleBreakpoint', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(5), @@ -101,7 +91,7 @@ export function registerCommands(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'debug.removeWatchExpression', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: CONTEXT_WATCH_EXPRESSIONS_FOCUSED, + when: ContextKeyExpr.and(CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_EXPRESSION_SELECTED.toNegated()), primary: KeyCode.Delete, mac: { primary: KeyMod.CtrlCmd | KeyCode.Backspace }, handler: (accessor) => { @@ -169,7 +159,7 @@ export function registerCommands(): void { 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); } - const launch = manager.getLaunches().filter(l => l.uri.toString() === launchUri).pop() || manager.selectedLaunch; + const launch = manager.getLaunches().filter(l => l.uri.toString() === launchUri).pop() || manager.selectedConfiguration.launch; return launch.openConfigFile(false).done(editor => { if (editor) { @@ -183,4 +173,67 @@ export function registerCommands(): void { }); } }); + + const COLUMN_BREAKPOINT_COMMAND_ID = 'editor.debug.action.toggleColumnBreakpoint'; + CommandsRegistry.registerCommand({ + id: COLUMN_BREAKPOINT_COMMAND_ID, + handler: (accessor) => { + const debugService = accessor.get(IDebugService); + const editorService = accessor.get(IWorkbenchEditorService); + const editor = editorService.getActiveEditor(); + const control = editor && editor.getControl(); + if (control) { + const position = control.getPosition(); + const modelUri = control.getModel().uri; + const bp = debugService.getModel().getBreakpoints() + .filter(bp => bp.lineNumber === position.lineNumber && bp.column === position.column && bp.uri.toString() === modelUri.toString()).pop(); + + if (bp) { + return TPromise.as(null); + } + if (debugService.getConfigurationManager().canSetBreakpointsIn(control.getModel())) { + return debugService.addBreakpoints(modelUri, [{ lineNumber: position.lineNumber, column: position.column }]); + } + } + + return TPromise.as(null); + } + }); + + MenuRegistry.appendMenuItem(MenuId.CommandPalette, { + command: { + id: COLUMN_BREAKPOINT_COMMAND_ID, + title: nls.localize('columnBreakpoint', "Column Breakpoint"), + category: nls.localize('debug', "Debug") + } + }); + MenuRegistry.appendMenuItem(MenuId.EditorContext, { + command: { + id: COLUMN_BREAKPOINT_COMMAND_ID, + title: nls.localize('addColumnBreakpoint', "Add Column Breakpoint") + }, + when: ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, CONTEXT_NOT_IN_DEBUG_REPL, EditorContextKeys.writable), + group: 'debug', + order: 1 + }); + + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: 'debug.openBreakpointToSide', + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: CONTEXT_BREAKPOINTS_FOCUSED, + primary: KeyMod.CtrlCmd | KeyCode.Enter, + secondary: [KeyMod.Alt | KeyCode.Enter], + handler: (accessor) => { + const listService = accessor.get(IListService); + const list = listService.lastFocusedList; + if (list instanceof List) { + const focus = list.getFocusedElements(); + if (focus.length && focus[0] instanceof Breakpoint) { + return openBreakpointSource(focus[0], true, false, accessor.get(IDebugService), accessor.get(IWorkbenchEditorService)); + } + } + + return TPromise.as(undefined); + } + }); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index f06096a0ece..adcdcc16cf2 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -225,8 +225,8 @@ export class ConfigurationManager implements IConfigurationManager { private adapters: Adapter[]; private breakpointModeIdsSet = new Set(); private launches: ILaunch[]; - private _selectedName: string; - private _selectedLaunch: ILaunch; + private selectedName: string; + private selectedLaunch: ILaunch; private toDispose: IDisposable[]; private _onDidSelectConfigurationName = new Emitter(); private providers: IDebugConfigurationProvider[]; @@ -368,8 +368,8 @@ export class ConfigurationManager implements IConfigurationManager { this.launches.push(this.instantiationService.createInstance(WorkspaceLaunch, this)); } - if (this.launches.indexOf(this._selectedLaunch) === -1) { - this._selectedLaunch = undefined; + if (this.launches.indexOf(this.selectedLaunch) === -1) { + this.selectedLaunch = undefined; } } @@ -390,12 +390,11 @@ export class ConfigurationManager implements IConfigurationManager { return this.launches; } - public get selectedLaunch(): ILaunch { - return this._selectedLaunch; - } - - public get selectedName(): string { - return this._selectedName; + public get selectedConfiguration(): { launch: ILaunch, name: string } { + return { + launch: this.selectedLaunch, + name: this.selectedName + }; } public get onDidSelectConfiguration(): Event { @@ -411,20 +410,20 @@ export class ConfigurationManager implements IConfigurationManager { } public selectConfiguration(launch?: ILaunch, name?: string, debugStarted?: boolean): void { - const previousLaunch = this._selectedLaunch; - const previousName = this._selectedName; + const previousLaunch = this.selectedLaunch; + const previousName = this.selectedName; if (!launch) { launch = this.selectedLaunch && this.selectedLaunch.getConfigurationNames().length ? this.selectedLaunch : first(this.launches, l => !!l.getConfigurationNames().length, this.launches.length ? this.launches[0] : undefined); } - this._selectedLaunch = launch; + this.selectedLaunch = launch; const names = launch ? launch.getConfigurationNames() : []; if (name && names.indexOf(name) >= 0) { - this._selectedName = name; + this.selectedName = name; } if (names.indexOf(this.selectedName) === -1) { - this._selectedName = names.length ? names[0] : undefined; + this.selectedName = names.length ? names[0] : undefined; } if (this.selectedLaunch !== previousLaunch || this.selectedName !== previousName) { @@ -491,8 +490,8 @@ export class ConfigurationManager implements IConfigurationManager { private store(): void { this.storageService.store(DEBUG_SELECTED_CONFIG_NAME_KEY, this.selectedName, StorageScope.WORKSPACE); - if (this._selectedLaunch) { - this.storageService.store(DEBUG_SELECTED_ROOT, this._selectedLaunch.uri.toString(), StorageScope.WORKSPACE); + if (this.selectedLaunch) { + this.storageService.store(DEBUG_SELECTED_ROOT, this.selectedLaunch.uri.toString(), StorageScope.WORKSPACE); } } @@ -621,7 +620,7 @@ class Launch implements ILaunch { if (!content) { return undefined; } - const index = content.indexOf(`"${this.configurationManager.selectedName}"`); + const index = content.indexOf(`"${this.configurationManager.selectedConfiguration.name}"`); let startLineNumber = 1; for (let i = 0; i < index; i++) { if (content.charAt(i) === '\n') { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index a187adff67f..aa20bf05c93 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -11,7 +11,7 @@ import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import * as dom from 'vs/base/browser/dom'; import { ITree } from 'vs/base/parts/tree/browser/tree'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { DefaultController, ICancelableEvent, ClickBehavior, OpenMode } from 'vs/base/parts/tree/browser/treeDefaults'; +import { ICancelableEvent, OpenMode } from 'vs/base/parts/tree/browser/treeDefaults'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; @@ -25,7 +25,8 @@ import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableEle import { 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 { WorkbenchTree } from 'vs/platform/list/browser/listService'; +import { WorkbenchTree, WorkbenchTreeController } from 'vs/platform/list/browser/listService'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; const $ = dom.$; const MAX_ELEMENTS_SHOWN = 18; @@ -71,7 +72,7 @@ export class DebugHoverWidget implements IContentWidget { this.tree = this.instantiationService.createInstance(WorkbenchTree, this.treeContainer, { dataSource: new VariablesDataSource(), renderer: this.instantiationService.createInstance(VariablesHoverRenderer), - controller: new DebugHoverController(this.editor) + controller: this.instantiationService.createInstance(DebugHoverController, this.editor) }, { indentPixels: 6, twistiePixels: 15, @@ -333,10 +334,13 @@ export class DebugHoverWidget implements IContentWidget { } } -class DebugHoverController extends DefaultController { +class DebugHoverController extends WorkbenchTreeController { - constructor(private editor: ICodeEditor) { - super({ clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: false, openMode: OpenMode.SINGLE_CLICK }); + constructor( + private editor: ICodeEditor, + @IConfigurationService configurationService: IConfigurationService + ) { + super({ openMode: OpenMode.SINGLE_CLICK }, configurationService); } protected onLeftClick(tree: ITree, element: any, eventish: ICancelableEvent, origin = 'mouse'): boolean { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 5220266e488..f2400633557 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -122,7 +122,7 @@ export class DebugService implements debug.IDebugService { this.model = new Model(this.loadBreakpoints(), this.storageService.getBoolean(DEBUG_BREAKPOINTS_ACTIVATED_KEY, StorageScope.WORKSPACE, true), this.loadFunctionBreakpoints(), this.loadExceptionBreakpoints(), this.loadWatchExpressions()); this.toDispose.push(this.model); - this.viewModel = new ViewModel(); + this.viewModel = new ViewModel(contextKeyService); this.firstSessionStart = true; this.registerListeners(); @@ -580,7 +580,7 @@ export class DebugService implements debug.IDebugService { return this.sendAllBreakpoints(); } - public addBreakpoints(uri: uri, rawBreakpoints: debug.IRawBreakpoint[]): TPromise { + public addBreakpoints(uri: uri, rawBreakpoints: debug.IBreakpointData[]): TPromise { this.model.addBreakpoints(uri, rawBreakpoints); rawBreakpoints.forEach(rbp => aria.status(nls.localize('breakpointAdded', "Added breakpoint, line {0}, file {1}", rbp.lineNumber, uri.fsPath))); @@ -642,7 +642,8 @@ export class DebugService implements debug.IDebugService { } public addWatchExpression(name: string): void { - return this.model.addWatchExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, name); + const we = this.model.addWatchExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, name); + this.viewModel.setSelectedExpression(we); } public renameWatchExpression(id: string, newName: string): void { @@ -657,7 +658,7 @@ export class DebugService implements debug.IDebugService { this.model.removeWatchExpressions(id); } - public startDebugging(root: IWorkspaceFolder, configOrName?: debug.IConfig | string, noDebug = false, topCompoundName?: string): TPromise { + public startDebugging(root: IWorkspaceFolder, configOrName?: debug.IConfig | string, noDebug = false): TPromise { // make sure to save all files and that the configuration is up to date return this.extensionService.activateByEvent('onDebug').then(() => this.textFileService.saveAll().then(() => this.configurationService.reloadConfiguration(root).then(() => @@ -673,7 +674,7 @@ export class DebugService implements debug.IDebugService { let config: debug.IConfig, compound: debug.ICompound; if (!configOrName) { - configOrName = this.configurationManager.selectedName; + configOrName = this.configurationManager.selectedConfiguration.name; } if (typeof configOrName === 'string' && launch) { config = launch.getConfiguration(configOrName); @@ -681,10 +682,6 @@ export class DebugService implements debug.IDebugService { } else if (typeof configOrName !== 'string') { config = configOrName; } - if (launch) { - // in the drop down the name of the top most compound takes precedence over the launch config name - this.configurationManager.selectConfiguration(launch, topCompoundName || (typeof configOrName === 'string' ? configOrName : undefined), true); - } if (compound) { if (!compound.configurations) { @@ -708,7 +705,7 @@ export class DebugService implements debug.IDebugService { rootForName = launch.workspace; } else { return TPromise.wrapError(new Error(launchesContainingName.length === 0 ? nls.localize('noConfigurationNameInWorkspace', "Could not find launch configuration '{0}' in the workspace.", name) - : nls.localize('multipleConfigurationNamesInWorkspace', "There are multiple launch configurates `{0}` in the workspace. Use folder name to qualify the configuration.", name))); + : nls.localize('multipleConfigurationNamesInWorkspace', "There are multiple launch configurations `{0}` in the workspace. Use folder name to qualify the configuration.", name))); } } else if (configData.folder) { const root = this.contextService.getWorkspace().folders.filter(f => f.name === configData.folder).pop(); @@ -719,7 +716,7 @@ export class DebugService implements debug.IDebugService { } } - return this.startDebugging(rootForName, name, noDebug, topCompoundName || compound.name); + return this.startDebugging(rootForName, name, noDebug); })); } if (configOrName && !config) { @@ -757,7 +754,9 @@ export class DebugService implements debug.IDebugService { return this.createProcess(root, config, sessionId); } - return undefined; + if (launch) { + return launch.openConfigFile(false, type).done(undefined, errors.onUnexpectedError); + } }) ).then(() => wrapUpState(), err => { wrapUpState(); @@ -768,7 +767,7 @@ export class DebugService implements debug.IDebugService { } private createProcess(root: IWorkspaceFolder, config: debug.IConfig, sessionId: string): TPromise { - const launch = root ? this.configurationManager.getLaunches().filter(l => l.workspace && l.workspace.uri.toString() === root.uri.toString()).pop() : this.configurationManager.selectedLaunch; + const launch = root ? this.configurationManager.getLaunches().filter(l => l.workspace && l.workspace.uri.toString() === root.uri.toString()).pop() : undefined; return this.textFileService.saveAll().then(() => (launch ? launch.resolveConfiguration(config) : TPromise.as(config)).then(resolvedConfig => { if (!resolvedConfig) { @@ -1063,9 +1062,11 @@ export class DebugService implements debug.IDebugService { setTimeout(() => { // 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.configurationManager.selectedLaunch) { + + const launch = this.configurationManager.getLaunches().filter(l => l.workspace && process.session.root && l.workspace.uri.toString() === process.session.root.uri.toString()).pop(); + if (this.launchJsonChanged && launch) { this.launchJsonChanged = false; - config = this.configurationManager.selectedLaunch.getConfiguration(process.configuration.name) || config; + config = launch.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; diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index 87596c77d68..82e3c72b1d7 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -44,7 +44,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { WorkbenchTree } from 'vs/platform/list/browser/listService'; import { memoize } from 'vs/base/common/decorators'; import { dispose } from 'vs/base/common/lifecycle'; -import { ClickBehavior, OpenMode } from 'vs/base/parts/tree/browser/treeDefaults'; +import { OpenMode } from 'vs/base/parts/tree/browser/treeDefaults'; const $ = dom.$; @@ -135,7 +135,7 @@ export class Repl extends Panel implements IPrivateReplService { this.createReplInput(this.container); this.renderer = this.instantiationService.createInstance(ReplExpressionsRenderer); - const controller = this.instantiationService.createInstance(ReplExpressionsController, new ReplExpressionsActionProvider(this.instantiationService), MenuId.DebugConsoleContext, { clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: false, openMode: OpenMode.SINGLE_CLICK }); + const controller = this.instantiationService.createInstance(ReplExpressionsController, new ReplExpressionsActionProvider(this.instantiationService), MenuId.DebugConsoleContext, { openMode: OpenMode.SINGLE_CLICK }); controller.toFocusOnClick = this.replInput; this.tree = this.instantiationService.createInstance(WorkbenchTree, this.treeContainer, { diff --git a/src/vs/workbench/parts/debug/electron-browser/variablesView.ts b/src/vs/workbench/parts/debug/electron-browser/variablesView.ts index 8ef474462bd..6d6b197dc1e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/variablesView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/variablesView.ts @@ -7,7 +7,7 @@ import * as nls from 'vs/nls'; import { RunOnceScheduler, sequence } from 'vs/base/common/async'; import * as dom from 'vs/base/browser/dom'; import * as errors from 'vs/base/common/errors'; -import { IHighlightEvent, IActionProvider, ITree, IDataSource, IRenderer, IAccessibilityProvider } from 'vs/base/parts/tree/browser/tree'; +import { IActionProvider, ITree, IDataSource, IRenderer, IAccessibilityProvider } from 'vs/base/parts/tree/browser/tree'; import { CollapseAction } from 'vs/workbench/browser/viewlet'; import { TreeViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { IDebugService, State, CONTEXT_VARIABLES_FOCUSED, IExpression } from 'vs/workbench/parts/debug/common/debug'; @@ -17,7 +17,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { MenuId } from 'vs/platform/actions/common/actions'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { once } from 'vs/base/common/event'; import { twistiePixels, renderViewTree, IVariableTemplateData, BaseDebugController, renderRenameBox, renderVariable } from 'vs/workbench/parts/debug/electron-browser/baseDebugView'; import { TPromise } from 'vs/base/common/winjs.base'; import { IAction, IActionItem } from 'vs/base/common/actions'; @@ -28,7 +27,8 @@ import { ViewModel } from 'vs/workbench/parts/debug/common/debugViewModel'; import { equalsIgnoreCase } from 'vs/base/common/strings'; import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { WorkbenchTree } from 'vs/platform/list/browser/listService'; -import { ClickBehavior, OpenMode } from 'vs/base/parts/tree/browser/treeDefaults'; +import { OpenMode } from 'vs/base/parts/tree/browser/treeDefaults'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; const $ = dom.$; @@ -39,15 +39,17 @@ export class VariablesView extends TreeViewsViewletPanel { private settings: any; private expandedElements: any[]; private needsRefresh: boolean; + private treeContainer: HTMLElement; constructor( options: IViewletViewOptions, @IContextMenuService contextMenuService: IContextMenuService, @IDebugService private debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private instantiationService: IInstantiationService, + @IConfigurationService configurationService: IConfigurationService ) { - super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService); + super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService, configurationService); this.settings = options.viewletSettings; this.expandedElements = []; @@ -59,8 +61,6 @@ export class VariablesView extends TreeViewsViewletPanel { this.expandedElements = expanded; } - // Always clear tree highlight to avoid ending up in a broken state #12203 - this.tree.clearHighlight(); this.needsRefresh = false; this.tree.refresh().then(() => { const stackFrame = this.debugService.getViewModel().focusedStackFrame; @@ -88,7 +88,7 @@ export class VariablesView extends TreeViewsViewletPanel { dataSource: new VariablesDataSource(), renderer: this.instantiationService.createInstance(VariablesRenderer), accessibilityProvider: new VariablesAccessibilityProvider(), - controller: this.instantiationService.createInstance(VariablesController, new VariablesActionProvider(this.debugService, this.keybindingService), MenuId.DebugVariablesContext, { clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: false, openMode: OpenMode.SINGLE_CLICK }) + controller: this.instantiationService.createInstance(VariablesController, new VariablesActionProvider(this.debugService, this.keybindingService), MenuId.DebugVariablesContext, { openMode: OpenMode.SINGLE_CLICK }) }, { ariaLabel: nls.localize('variablesAriaTreeLabel', "Debug Variables"), twistiePixels @@ -122,21 +122,19 @@ export class VariablesView extends TreeViewsViewletPanel { })); this.disposables.push(this.debugService.getViewModel().onDidSelectExpression(expression => { - if (!expression || !(expression instanceof Variable)) { - return; + if (expression instanceof Variable) { + this.tree.refresh(expression, false).done(null, errors.onUnexpectedError); } - - this.tree.refresh(expression, false).then(() => { - this.tree.setHighlight(expression); - once(this.tree.onDidChangeHighlight)((e: IHighlightEvent) => { - if (!e.highlight) { - this.debugService.getViewModel().setSelectedExpression(null); - } - }); - }).done(null, errors.onUnexpectedError); })); } + layoutBody(size: number): void { + if (this.treeContainer) { + this.treeContainer.style.height = size + 'px'; + } + super.layoutBody(size); + } + public setExpanded(expanded: boolean): void { super.setExpanded(expanded); if (expanded && this.needsRefresh) { diff --git a/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts b/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts index e353cc434f8..c03086ae9a9 100644 --- a/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/watchExpressionsView.ts @@ -9,7 +9,7 @@ import * as dom from 'vs/base/browser/dom'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; import * as errors from 'vs/base/common/errors'; -import { IHighlightEvent, IActionProvider, ITree, IDataSource, IRenderer, IAccessibilityProvider, IDragAndDropData, IDragOverReaction, DRAG_OVER_REJECT } from 'vs/base/parts/tree/browser/tree'; +import { IActionProvider, ITree, IDataSource, IRenderer, IAccessibilityProvider, IDragAndDropData, IDragOverReaction, DRAG_OVER_REJECT } from 'vs/base/parts/tree/browser/tree'; import { CollapseAction } from 'vs/workbench/browser/viewlet'; import { TreeViewsViewletPanel, IViewletViewOptions, IViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet'; import { IDebugService, IExpression, CONTEXT_WATCH_EXPRESSIONS_FOCUSED } from 'vs/workbench/parts/debug/common/debug'; @@ -20,15 +20,15 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { MenuId } from 'vs/platform/actions/common/actions'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { once } from 'vs/base/common/event'; import { IAction, IActionItem } from 'vs/base/common/actions'; import { CopyValueAction } from 'vs/workbench/parts/debug/electron-browser/electronDebugActions'; import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { equalsIgnoreCase } from 'vs/base/common/strings'; import { IMouseEvent, DragMouseEvent } from 'vs/base/browser/mouseEvent'; -import { DefaultDragAndDrop, ClickBehavior, OpenMode } from 'vs/base/parts/tree/browser/treeDefaults'; +import { DefaultDragAndDrop, OpenMode, ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults'; import { IVariableTemplateData, renderVariable, renderRenameBox, renderExpressionValue, BaseDebugController, twistiePixels, renderViewTree } from 'vs/workbench/parts/debug/electron-browser/baseDebugView'; import { WorkbenchTree } from 'vs/platform/list/browser/listService'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; const $ = dom.$; const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024; @@ -37,6 +37,7 @@ export class WatchExpressionsView extends TreeViewsViewletPanel { private static readonly MEMENTO = 'watchexpressionsview.memento'; private onWatchExpressionsUpdatedScheduler: RunOnceScheduler; + private treeContainer: HTMLElement; private settings: any; private needsRefresh: boolean; @@ -45,9 +46,10 @@ export class WatchExpressionsView extends TreeViewsViewletPanel { @IContextMenuService contextMenuService: IContextMenuService, @IDebugService private debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private instantiationService: IInstantiationService, + @IConfigurationService configurationService: IConfigurationService ) { - super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('expressionsSection', "Expressions Section") }, keybindingService, contextMenuService); + super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('expressionsSection', "Expressions Section") }, keybindingService, contextMenuService, configurationService); this.settings = options.viewletSettings; this.onWatchExpressionsUpdatedScheduler = new RunOnceScheduler(() => { @@ -65,7 +67,7 @@ export class WatchExpressionsView extends TreeViewsViewletPanel { dataSource: new WatchExpressionsDataSource(this.debugService), renderer: this.instantiationService.createInstance(WatchExpressionsRenderer), accessibilityProvider: new WatchExpressionsAccessibilityProvider(), - controller: this.instantiationService.createInstance(WatchExpressionsController, actionProvider, MenuId.DebugWatchContext, { clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: false, openMode: OpenMode.SINGLE_CLICK }), + controller: this.instantiationService.createInstance(WatchExpressionsController, actionProvider, MenuId.DebugWatchContext, { clickBehavior: ClickBehavior.ON_MOUSE_UP /* do not change to not break DND */, openMode: OpenMode.SINGLE_CLICK }), dnd: new WatchExpressionsDragAndDrop(this.debugService) }, { ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'watchAriaTreeLabel' }, "Debug Watch Expressions"), @@ -103,21 +105,19 @@ export class WatchExpressionsView extends TreeViewsViewletPanel { })); this.disposables.push(this.debugService.getViewModel().onDidSelectExpression(expression => { - if (!expression || !(expression instanceof Expression)) { - return; + if (expression instanceof Expression) { + this.tree.refresh(expression, false).done(null, errors.onUnexpectedError); } - - this.tree.refresh(expression, false).then(() => { - this.tree.setHighlight(expression); - once(this.tree.onDidChangeHighlight)((e: IHighlightEvent) => { - if (!e.highlight) { - this.debugService.getViewModel().setSelectedExpression(null); - } - }); - }).done(null, errors.onUnexpectedError); })); } + layoutBody(size: number): void { + if (this.treeContainer) { + this.treeContainer.style.height = size + 'px'; + } + super.layoutBody(size); + } + public setExpanded(expanded: boolean): void { super.setExpanded(expanded); if (expanded && this.needsRefresh) { @@ -290,7 +290,7 @@ class WatchExpressionsRenderer implements IRenderer { private renderWatchExpression(tree: ITree, watchExpression: IExpression, data: IWatchExpressionTemplateData): void { let selectedExpression = this.debugService.getViewModel().getSelectedExpression(); - if ((selectedExpression instanceof Expression && selectedExpression.getId() === watchExpression.getId()) || (watchExpression instanceof Expression && !watchExpression.name)) { + if ((selectedExpression instanceof Expression && selectedExpression.getId() === watchExpression.getId())) { renderRenameBox(this.debugService, this.contextViewService, this.themeService, tree, watchExpression, data.expression, { initialValue: watchExpression.name, placeholder: nls.localize('watchExpressionPlaceholder', "Expression to watch"), diff --git a/src/vs/workbench/parts/debug/node/debugAdapter.ts b/src/vs/workbench/parts/debug/node/debugAdapter.ts index 6b168d250c6..59617f4d305 100644 --- a/src/vs/workbench/parts/debug/node/debugAdapter.ts +++ b/src/vs/workbench/parts/debug/node/debugAdapter.ts @@ -88,7 +88,7 @@ export class Adapter { } return TPromise.wrapError(new Error(nls.localize({ key: 'debugAdapterCannotDetermineExecutable', comment: ['Adapter executable file not found'] }, - "Cannot determine executable for debug adapter '{0}'.", details.command))); + "Cannot determine executable for debug adapter '{0}'.", this.type))); } private getRuntime(): string { 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 ff921163c20..76130ed7692 100644 --- a/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts +++ b/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts @@ -7,12 +7,13 @@ import * as assert from 'assert'; import { ViewModel } from 'vs/workbench/parts/debug/common/debugViewModel'; import { StackFrame, Expression, Thread, Process } from 'vs/workbench/parts/debug/common/debugModel'; import { MockSession } from 'vs/workbench/parts/debug/test/common/mockDebug'; +import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService'; suite('Debug - View Model', () => { let model: ViewModel; setup(() => { - model = new ViewModel(); + model = new ViewModel(new MockContextKeyService()); }); teardown(() => { diff --git a/src/vs/workbench/parts/debug/test/common/mockDebug.ts b/src/vs/workbench/parts/debug/test/common/mockDebug.ts index 7d722ef668d..81acf9c471d 100644 --- a/src/vs/workbench/parts/debug/test/common/mockDebug.ts +++ b/src/vs/workbench/parts/debug/test/common/mockDebug.ts @@ -39,11 +39,11 @@ export class MockDebugService implements debug.IDebugService { public focusStackFrame(focusedStackFrame: debug.IStackFrame): void { } - public addBreakpoints(uri: uri, rawBreakpoints: debug.IRawBreakpoint[]): TPromise { + public addBreakpoints(uri: uri, rawBreakpoints: debug.IBreakpointData[]): TPromise { return TPromise.as(null); } - public updateBreakpoints(uri: uri, data: { [id: string]: DebugProtocol.Breakpoint }): void { } + public updateBreakpoints(uri: uri, data: { [id: string]: debug.IBreakpointUpdateData }): void { } public enableOrDisableBreakpoints(enabled: boolean): TPromise { return TPromise.as(null); diff --git a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts index 093557504c7..869a9d8c7c1 100644 --- a/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts +++ b/src/vs/workbench/parts/execution/electron-browser/execution.contribution.ts @@ -26,6 +26,7 @@ import { IFileService } from 'vs/platform/files/common/files'; import { IListService } from 'vs/platform/list/browser/listService'; import { getResourceForCommand } from 'vs/workbench/parts/files/browser/files'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { Schemas } from 'vs/base/common/network'; if (env.isWindows) { registerSingleton(ITerminalService, WinTerminalService); @@ -111,7 +112,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ handler: (accessor) => { const historyService = accessor.get(IHistoryService); const terminalService = accessor.get(ITerminalService); - const root = historyService.getLastActiveWorkspaceRoot('file'); + const root = historyService.getLastActiveWorkspaceRoot(Schemas.file); if (root) { terminalService.openTerminal(root.fsPath); } @@ -135,12 +136,12 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'navigation', order: 30, command: openConsoleCommand, - when: ResourceContextKey.Scheme.isEqualTo('file') + when: ResourceContextKey.Scheme.isEqualTo(Schemas.file) }); MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { group: 'navigation', order: 30, command: openConsoleCommand, - when: ResourceContextKey.Scheme.isEqualTo('file') + when: ResourceContextKey.Scheme.isEqualTo(Schemas.file) }); diff --git a/src/vs/workbench/parts/extensions/browser/dependenciesViewer.ts b/src/vs/workbench/parts/extensions/browser/dependenciesViewer.ts index ae9cd5f371c..18baa41f67c 100644 --- a/src/vs/workbench/parts/extensions/browser/dependenciesViewer.ts +++ b/src/vs/workbench/parts/extensions/browser/dependenciesViewer.ts @@ -9,7 +9,6 @@ import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { TPromise, Promise } from 'vs/base/common/winjs.base'; import { IDataSource, ITree, IRenderer } from 'vs/base/parts/tree/browser/tree'; -import { ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults'; import { Action } from 'vs/base/common/actions'; import { IExtensionDependencies, IExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/common/extensions'; import { once } from 'vs/base/common/event'; @@ -164,7 +163,7 @@ export class Controller extends WorkbenchTreeController { @IExtensionsWorkbenchService private extensionsWorkdbenchService: IExtensionsWorkbenchService, @IConfigurationService configurationService: IConfigurationService ) { - super({ clickBehavior: ClickBehavior.ON_MOUSE_UP, keyboardSupport: false }, configurationService); + super({}, configurationService); // TODO@Sandeep this should be a command this.downKeyBindingDispatcher.set(KeyMod.CtrlCmd | KeyCode.Enter, (tree: ITree, event: any) => this.openExtension(tree, true)); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index 3fdfe03c4e3..5be419ee069 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -43,7 +43,7 @@ interface IExtensionsContent { const empty: { [key: string]: any; } = Object.create(null); const milliSecondsInADay = 1000 * 60 * 60 * 24; -const choiceNever = localize('neverShowAgain', "Don't show again"); +const choiceNever = localize('neverShowAgain', "Don't Show Again"); const choiceClose = localize('close', "Close"); interface IDynamicWorkspaceRecommendations { @@ -277,7 +277,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe } }); - const allRecommendations = []; + const allRecommendations: string[] = []; forEach(this._availableRecommendations, ({ value: ids }) => { allRecommendations.push(...ids); }); @@ -613,7 +613,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe const homeDir = os.homedir(); let foundExecutables: Set = new Set(); - let findExecutable = (exeName, path) => { + let findExecutable = (exeName: string, path: string) => { return pfs.fileExists(path).then(exists => { if (exists && !foundExecutables.has(exeName)) { foundExecutables.add(exeName); @@ -679,7 +679,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe this._dynamicWorkspaceRecommendations = storedRecommendationsJson['recommendations']; /* __GDPR__ "dynamicWorkspaceRecommendations" : { - "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, "cache" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } } */ @@ -722,7 +722,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe }), StorageScope.WORKSPACE); /* __GDPR__ "dynamicWorkspaceRecommendations" : { - "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, "cache" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } } */ diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts index 6be04be6baa..9cb0397433d 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts @@ -80,7 +80,7 @@ export class InstallVSIXAction extends Action { this.messageService.show( severity.Info, { - message: localize('InstallVSIXAction.success', "Successfully installed the extension. Restart to enable it."), + message: localize('InstallVSIXAction.success', "Successfully installed the extension. Reload to enable it."), actions: [this.instantiationService.createInstance(ReloadWindowAction, ReloadWindowAction.ID, localize('InstallVSIXAction.reloadNow', "Reload Now"))] } ); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts index c3806ceef8d..eef0647b527 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts @@ -12,7 +12,7 @@ import { assign } from 'vs/base/common/objects'; import { chain } from 'vs/base/common/event'; import { isPromiseCanceledError, create as createError } from 'vs/base/common/errors'; import Severity from 'vs/base/common/severity'; -import { PagedModel, IPagedModel, mergePagers, IPager } from 'vs/base/common/paging'; +import { PagedModel, IPagedModel, IPager } from 'vs/base/common/paging'; import { IMessageService, CloseAction } from 'vs/platform/message/common/message'; import { SortBy, SortOrder, IQueryOptions, LocalExtensionType, IExtensionTipsService, EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; @@ -36,6 +36,7 @@ import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge'; import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { InstallWorkspaceRecommendedExtensionsAction, ConfigureWorkspaceFolderRecommendedExtensionsAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; import { WorkbenchPagedList } from 'vs/platform/list/browser/listService'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; export class ExtensionsListView extends ViewsViewletPanel { @@ -58,9 +59,10 @@ export class ExtensionsListView extends ViewsViewletPanel { @IEditorGroupService private editorInputService: IEditorGroupService, @IExtensionTipsService private tipsService: IExtensionTipsService, @IModeService private modeService: IModeService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @IConfigurationService configurationService: IConfigurationService ) { - super({ ...(options as IViewOptions), ariaHeaderLabel: options.name }, keybindingService, contextMenuService); + super({ ...(options as IViewOptions), ariaHeaderLabel: options.name }, keybindingService, contextMenuService, configurationService); } renderHeader(container: HTMLElement): void { @@ -79,7 +81,7 @@ export class ExtensionsListView extends ViewsViewletPanel { const renderer = this.instantiationService.createInstance(Renderer); this.list = this.instantiationService.createInstance(WorkbenchPagedList, this.extensionsList, delegate, [renderer], { ariaLabel: localize('extensions', "Extensions") - }); + }) as WorkbenchPagedList; chain(this.list.onOpen) .map(e => e.elements[0]) @@ -214,15 +216,11 @@ export class ExtensionsListView extends ViewsViewletPanel { return this.getRecommendationsModel(query, options); } - const pagerPromises: TPromise>[] = []; let text = query.value; const extensionRegex = /\bext:([^\s]+)\b/g; if (extensionRegex.test(query.value)) { - let names: string[] = []; - text = query.value.replace(extensionRegex, (m, ext) => { - names.push(...this.tipsService.getRecommendationsForExtension(ext)); // Get curated keywords const keywords = this.tipsService.getKeywordsForExtension(ext); @@ -236,9 +234,10 @@ export class ExtensionsListView extends ViewsViewletPanel { return `tag:"__ext_${ext}" tag:"__ext_.${ext}" ${keywords.map(tag => `tag:"${tag}"`).join(' ')}${languageTag} tag:"${ext}"`; }); - if (names.length) { - const namesOptions = assign({}, options, { names, source: 'extRegex' }); - pagerPromises.push(this.extensionsWorkbenchService.queryGallery(namesOptions)); + if (text !== query.value) { + options = assign(options, { text: text.substr(0, 350), source: 'file-extension-tags' }); + const pager = await this.extensionsWorkbenchService.queryGallery(options); + return new PagedModel(pager); } } @@ -248,11 +247,7 @@ export class ExtensionsListView extends ViewsViewletPanel { options.source = 'viewlet'; } - pagerPromises.push(this.extensionsWorkbenchService.queryGallery(options)); - - const pagers = await TPromise.join(pagerPromises); - const pager = pagers.length === 2 ? mergePagers(pagers[0], pagers[1]) : pagers[0]; - + const pager = await this.extensionsWorkbenchService.queryGallery(options); return new PagedModel(pager); } diff --git a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts index bc300591ee4..e6256d7aeae 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -364,7 +364,7 @@ export class RuntimeExtensionsEditor extends BaseEditor { this._list = this._instantiationService.createInstance(WorkbenchList, container, delegate, [renderer], { multipleSelectionSupport: false - }); + }) as WorkbenchList; this._list.splice(0, this._list.length, this._elements); diff --git a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts index a8da68f6fe6..be921b9f2c7 100644 --- a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts @@ -645,7 +645,7 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { } private promptForDependenciesAndEnable(extension: IExtension, dependencies: IExtension[], enablementState: EnablementState, enable: boolean): TPromise { - const message = nls.localize('enableDependeciesConfirmation', "Enabling '{0}' also enable its dependencies. Would you like to continue?", extension.displayName); + const message = nls.localize('enableDependeciesConfirmation', "Enabling '{0}' also enables its dependencies. Would you like to continue?", extension.displayName); const options = [ nls.localize('enable', "Yes"), nls.localize('doNotEnable', "No") @@ -939,8 +939,11 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { const extensionId = match[1]; this.queryLocal().then(local => { - if (local.some(local => local.id === extensionId)) { - return TPromise.as(null); + const extension = local.filter(local => local.id === extensionId)[0]; + + if (extension) { + return this.windowService.show() + .then(() => this.open(extension)); } return this.queryGallery({ names: [extensionId], source: 'uri' }).then(result => { diff --git a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts index 20013c5caa2..305ae9ee6bd 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts +++ b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts @@ -20,6 +20,7 @@ import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } 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 { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; +import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry'; export const FEEDBACK_VISIBLE_CONFIG = 'workbench.statusBar.feedback.visible'; @@ -70,6 +71,7 @@ export class FeedbackDropdown extends Dropdown { container: HTMLElement, options: IFeedbackDropdownOptions, @ICommandService private commandService: ICommandService, + @ITelemetryService private telemetryService: ITelemetryService, @IIntegrityService private integrityService: IIntegrityService, @IThemeService private themeService: IThemeService, @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService @@ -171,7 +173,16 @@ export class FeedbackDropdown extends Dropdown { $('div').append($('a').attr('target', '_blank').attr('href', '#').text(nls.localize("submit a bug", "Submit a bug")).attr('tabindex', '0')) .on('click', event => { dom.EventHelper.stop(event); - this.commandService.executeCommand('workbench.action.openIssueReporter').done(null, errors.onUnexpectedError); + const actionId = 'workbench.action.openIssueReporter'; + this.commandService.executeCommand(actionId).done(null, errors.onUnexpectedError); + + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ + this.telemetryService.publicLog('workbenchActionExecuted', { id: actionId, from: 'feedback' }); }) .appendTo($contactUsContainer); diff --git a/src/vs/workbench/parts/files/common/explorerModel.ts b/src/vs/workbench/parts/files/common/explorerModel.ts index 621a89dba03..60168c40f3b 100644 --- a/src/vs/workbench/parts/files/common/explorerModel.ts +++ b/src/vs/workbench/parts/files/common/explorerModel.ts @@ -16,6 +16,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { IEditorGroup, toResource, IEditorIdentifier } from 'vs/workbench/common/editor'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { getPathLabel } from 'vs/base/common/labels'; +import { Schemas } from 'vs/base/common/network'; export class Model { @@ -397,7 +398,7 @@ export class OpenEditor implements IEditorIdentifier { } public isUntitled(): boolean { - return !!toResource(this.editor, { supportSideBySide: true, filter: 'untitled' }); + return !!toResource(this.editor, { supportSideBySide: true, filter: Schemas.untitled }); } public isDirty(): boolean { diff --git a/src/vs/workbench/parts/files/common/files.ts b/src/vs/workbench/parts/files/common/files.ts index 3147b323330..8924a1f2d1e 100644 --- a/src/vs/workbench/parts/files/common/files.ts +++ b/src/vs/workbench/parts/files/common/files.ts @@ -40,7 +40,6 @@ export interface IExplorerView { */ const explorerViewletVisibleId = 'explorerViewletVisible'; const filesExplorerFocusId = 'filesExplorerFocus'; -const openEditorsVisibleId = 'openEditorsVisible'; const openEditorsFocusId = 'openEditorsFocus'; const explorerViewletFocusId = 'explorerViewletFocus'; const explorerResourceIsFolderId = 'explorerResourceIsFolder'; @@ -50,11 +49,9 @@ export const ExplorerViewletVisibleContext = new RawContextKey(explorer export const ExplorerFolderContext = new RawContextKey(explorerResourceIsFolderId, false); export const ExplorerRootContext = new RawContextKey(explorerResourceIsRootId, false); export const FilesExplorerFocusedContext = new RawContextKey(filesExplorerFocusId, true); -export const OpenEditorsVisibleContext = new RawContextKey(openEditorsVisibleId, false); export const OpenEditorsFocusedContext = new RawContextKey(openEditorsFocusId, true); export const ExplorerFocusedContext = new RawContextKey(explorerViewletFocusId, true); -export const OpenEditorsVisibleCondition = ContextKeyExpr.has(openEditorsVisibleId); export const FilesExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(filesExplorerFocusId), ContextKeyExpr.not(InputFocusedContextKey)); export const ExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(explorerViewletFocusId), ContextKeyExpr.not(InputFocusedContextKey)); diff --git a/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts b/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts index 7dd040a28c2..df259646f71 100644 --- a/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts @@ -11,9 +11,9 @@ 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, OpenEditorsVisibleContext, OpenEditorsVisibleCondition, IExplorerViewlet } from 'vs/workbench/parts/files/common/files'; +import { VIEWLET_ID, ExplorerViewletVisibleContext, IFilesConfiguration, IExplorerViewlet } from 'vs/workbench/parts/files/common/files'; import { PersistentViewsViewlet, IViewletViewOptions, ViewsViewletPanel } from 'vs/workbench/browser/parts/views/viewsViewlet'; -import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ActionRunner, FileViewletState } from 'vs/workbench/parts/files/electron-browser/views/explorerViewer'; import { ExplorerView, IExplorerViewOptions } from 'vs/workbench/parts/files/electron-browser/views/explorerView'; import { EmptyView } from 'vs/workbench/parts/files/electron-browser/views/emptyView'; @@ -38,23 +38,16 @@ import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; export class ExplorerViewletViewsContribution extends Disposable implements IWorkbenchContribution { - private openEditorsVisibleContextKey: IContextKey; - constructor( @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IConfigurationService private configurationService: IConfigurationService, @IContextKeyService contextKeyService: IContextKeyService ) { super(); this.registerViews(); - this.openEditorsVisibleContextKey = OpenEditorsVisibleContext.bindTo(contextKeyService); - this.updateOpenEditorsVisibility(); - this._register(workspaceContextService.onDidChangeWorkbenchState(() => this.registerViews())); this._register(workspaceContextService.onDidChangeWorkspaceFolders(() => this.registerViews())); - this._register(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(e))); } private registerViews(): void { @@ -104,7 +97,6 @@ export class ExplorerViewletViewsContribution extends Disposable implements IWor location: ViewLocation.Explorer, ctor: OpenEditorsView, order: 0, - when: OpenEditorsVisibleCondition, canToggleVisibility: true }; } @@ -130,16 +122,6 @@ export class ExplorerViewletViewsContribution extends Disposable implements IWor canToggleVisibility: false }; } - - private onConfigurationUpdated(e: IConfigurationChangeEvent): void { - if (e.affectsConfiguration('explorer.openEditors.visible')) { - this.updateOpenEditorsVisibility(); - } - } - - private updateOpenEditorsVisibility(): void { - this.openEditorsVisibleContextKey.set(this.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY || this.configurationService.getValue('explorer.openEditors.visible') !== 0); - } } export class ExplorerViewlet extends PersistentViewsViewlet implements IExplorerViewlet { @@ -177,10 +159,6 @@ export class ExplorerViewlet extends PersistentViewsViewlet implements IExplorer DOM.addClass(el, 'explorer-viewlet'); } - private isOpenEditorsVisible(): boolean { - return this.contextService.getWorkbenchState() === WorkbenchState.EMPTY || this.configurationService.getValue('explorer.openEditors.visible') !== 0; - } - protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewsViewletPanel { if (viewDescriptor.id === ExplorerView.ID) { // Create a delegating editor service for the explorer to be able to delay the refresh in the opened @@ -253,13 +231,4 @@ export class ExplorerViewlet extends PersistentViewsViewlet implements IExplorer public getViewletState(): FileViewletState { return this.viewletState; } - - protected loadViewsStates(): void { - super.loadViewsStates(); - - // Remove the open editors view state if it is removed globally - if (!this.isOpenEditorsVisible()) { - this.viewsStates.delete(OpenEditorsView.ID); - } - } -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts index 743441bf0a1..00a64e2658d 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts @@ -16,7 +16,7 @@ import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/c import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { isWindows, isMacintosh } from 'vs/base/common/platform'; -import { FilesExplorerFocusCondition, ExplorerRootContext, ExplorerFolderContext, ExplorerFocusedContext } from 'vs/workbench/parts/files/common/files'; +import { FilesExplorerFocusCondition, ExplorerRootContext, ExplorerFolderContext } from 'vs/workbench/parts/files/common/files'; import { ADD_ROOT_FOLDER_COMMAND_ID, ADD_ROOT_FOLDER_LABEL } from 'vs/workbench/browser/actions/workspaceCommands'; import { CLOSE_UNMODIFIED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; import { OPEN_FOLDER_SETTINGS_COMMAND, OPEN_FOLDER_SETTINGS_LABEL } from 'vs/workbench/parts/preferences/browser/preferencesActions'; @@ -24,6 +24,7 @@ import { AutoSaveContext } from 'vs/workbench/services/textfile/common/textfiles import { ResourceContextKey } from 'vs/workbench/common/resources'; import { WorkbenchListDoubleSelection } from 'vs/platform/list/browser/listService'; import URI from 'vs/base/common/uri'; +import { Schemas } from 'vs/base/common/network'; // Contribute Global Actions const category = nls.localize('filesCategory', "File"); @@ -95,13 +96,13 @@ const PASTE_FILE_ID = 'filesExplorer.paste'; KeybindingsRegistry.registerCommandAndKeybindingRule({ id: PASTE_FILE_ID, weight: KeybindingsRegistry.WEIGHT.workbenchContrib(explorerCommandsWeightBonus), - when: ContextKeyExpr.and(FilesExplorerFocusCondition, FileCopiedContext), + when: ContextKeyExpr.and(FilesExplorerFocusCondition), primary: KeyMod.CtrlCmd | KeyCode.KEY_V, handler: pasteFileHandler }); // Editor Title Context Menu -appendEditorTitleContextMenuItem(REVEAL_IN_OS_COMMAND_ID, REVEAL_IN_OS_LABEL, ResourceContextKey.Scheme.isEqualTo('file')); +appendEditorTitleContextMenuItem(REVEAL_IN_OS_COMMAND_ID, REVEAL_IN_OS_LABEL, ResourceContextKey.Scheme.isEqualTo(Schemas.file)); appendEditorTitleContextMenuItem(COPY_PATH_COMMAND_ID, CopyPathAction.LABEL, ResourceContextKey.IsFile); appendEditorTitleContextMenuItem(REVEAL_IN_EXPLORER_COMMAND_ID, nls.localize('revealInSideBar', "Reveal in Side Bar"), ResourceContextKey.IsFile); @@ -141,14 +142,13 @@ function appendSaveConflictEditorTitleAction(id: string, title: string, iconPath // Menu registration - command palette -function appendToCommandPalette(id: string, title: string, category: string, when?: ContextKeyExpr): void { +function appendToCommandPalette(id: string, title: string, category: string): void { MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id, title, category - }, - when + } }); } appendToCommandPalette(COPY_PATH_COMMAND_ID, nls.localize('copyPathOfActive', "Copy Path of Active File"), category); @@ -160,8 +160,8 @@ appendToCommandPalette(COMPARE_WITH_SAVED_COMMAND_ID, nls.localize('compareActiv appendToCommandPalette(REVEAL_IN_OS_COMMAND_ID, REVEAL_IN_OS_LABEL, category); appendToCommandPalette(SAVE_FILE_AS_COMMAND_ID, SAVE_FILE_AS_LABEL, category); appendToCommandPalette(CLOSE_EDITOR_COMMAND_ID, nls.localize('closeEditor', "Close Editor"), nls.localize('view', "View")); -appendToCommandPalette(NEW_FILE_COMMAND_ID, NEW_FILE_LABEL, category, ExplorerFocusedContext); -appendToCommandPalette(NEW_FOLDER_COMMAND_ID, NEW_FOLDER_LABEL, category, ExplorerFocusedContext); +appendToCommandPalette(NEW_FILE_COMMAND_ID, NEW_FILE_LABEL, category); +appendToCommandPalette(NEW_FOLDER_COMMAND_ID, NEW_FOLDER_LABEL, category); @@ -186,7 +186,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { group: 'navigation', order: 20, command: revealInOsCommand, - when: ResourceContextKey.Scheme.isEqualTo('file') + when: ResourceContextKey.Scheme.isEqualTo(Schemas.file) }); const copyPathCommand = { @@ -228,7 +228,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { id: SAVE_FILE_AS_COMMAND_ID, title: SAVE_FILE_AS_LABEL }, - when: ResourceContextKey.Scheme.isEqualTo('untitled') + when: ResourceContextKey.Scheme.isEqualTo(Schemas.untitled) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, { @@ -355,7 +355,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { group: 'navigation', order: 20, command: revealInOsCommand, - when: ResourceContextKey.Scheme.isEqualTo('file') + when: ResourceContextKey.Scheme.isEqualTo(Schemas.file) }); MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index 952968f7641..a7ffb1d52ab 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -50,8 +50,9 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IListService, ListWidget } from 'vs/platform/list/browser/listService'; -import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { distinctParents } from 'vs/base/common/resources'; +import { RawContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { distinctParents, basenameOrAuthority } from 'vs/base/common/resources'; +import { Schemas } from 'vs/base/common/network'; export interface IEditableData { action: IAction; @@ -873,9 +874,6 @@ export class ImportFileAction extends BaseFileAction { } // Copy File/Folder -let filesToCopy: FileStat[]; -let fileCopiedContextKey: IContextKey; - class CopyFileAction extends BaseFileAction { private tree: ITree; @@ -885,22 +883,19 @@ class CopyFileAction extends BaseFileAction { @IFileService fileService: IFileService, @IMessageService messageService: IMessageService, @ITextFileService textFileService: ITextFileService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IClipboardService private clipboardService: IClipboardService ) { super('filesExplorer.copy', COPY_FILE_LABEL, fileService, messageService, textFileService); this.tree = tree; - if (!fileCopiedContextKey) { - fileCopiedContextKey = FileCopiedContext.bindTo(contextKeyService); - } this._updateEnablement(); } public run(): TPromise { - // Remember as file/folder to copy - filesToCopy = this.elements; - fileCopiedContextKey.set(!!filesToCopy.length); + // Write to clipboard as file/folder to copy + this.clipboardService.writeFiles(this.elements.map(e => e.resource)); // Remove highlight if (this.tree) { @@ -926,7 +921,7 @@ class PasteFileAction extends BaseFileAction { @IFileService fileService: IFileService, @IMessageService messageService: IMessageService, @ITextFileService textFileService: ITextFileService, - @IInstantiationService private instantiationService: IInstantiationService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService ) { super(PasteFileAction.ID, PASTE_FILE_LABEL, fileService, messageService, textFileService); @@ -939,33 +934,42 @@ class PasteFileAction extends BaseFileAction { this._updateEnablement(); } - public run(fileToCopy: FileStat): TPromise { - - const exists = fileToCopy.root.find(fileToCopy.resource); - if (!exists) { - fileToCopy = null; - fileCopiedContextKey.set(false); - throw new Error(nls.localize('fileDeleted', "File was deleted or moved meanwhile")); - } + public run(fileToPaste: URI): TPromise { // Check if target is ancestor of pasted folder - if (this.element.resource.toString() !== fileToCopy.resource.toString() && resources.isEqualOrParent(this.element.resource, fileToCopy.resource, !isLinux /* ignorecase */)) { - throw new Error(nls.localize('fileIsAncestor', "File to copy is an ancestor of the desitnation folder")); + if (this.element.resource.toString() !== fileToPaste.toString() && resources.isEqualOrParent(this.element.resource, fileToPaste, !isLinux /* ignorecase */)) { + throw new Error(nls.localize('fileIsAncestor', "File to paste is an ancestor of the destination folder")); } - // Find target - let target: FileStat; - if (this.element.resource.toString() === fileToCopy.resource.toString()) { - target = this.element.parent; - } else { - target = this.element.isDirectory ? this.element : this.element.parent; - } + return this.fileService.resolveFile(fileToPaste).then(fileToPasteStat => { - // Reuse duplicate action - const pasteAction = this.instantiationService.createInstance(DuplicateFileAction, this.tree, fileToCopy, target); + // Remove highlight + if (this.tree) { + this.tree.clearHighlight(); + } - return pasteAction.run().then(() => { - this.tree.DOMFocus(); + // Find target + let target: FileStat; + if (this.element.resource.toString() === fileToPaste.toString()) { + target = this.element.parent; + } else { + target = this.element.isDirectory ? this.element : this.element.parent; + } + + const targetFile = findValidPasteFileTarget(target, { resource: fileToPaste, isDirectory: fileToPasteStat.isDirectory }); + + // Copy File + return this.fileService.copyFile(fileToPaste, targetFile).then(stat => { + if (!stat.isDirectory) { + return this.editorService.openEditor({ resource: stat.resource, options: { pinned: true } }); + } + + return void 0; + }, error => this.onError(error)).then(() => { + this.tree.DOMFocus(); + }); + }, error => { + this.onError(new Error(nls.localize('fileDeleted', "File to paste was deleted or moved meanwhile"))); }); } } @@ -973,11 +977,11 @@ class PasteFileAction extends BaseFileAction { // Duplicate File/Folder export class DuplicateFileAction extends BaseFileAction { private tree: ITree; - private target: IFileStat; + private target: FileStat; constructor( tree: ITree, - element: FileStat, + fileToDuplicate: FileStat, target: FileStat, @IFileService fileService: IFileService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @@ -987,8 +991,8 @@ export class DuplicateFileAction extends BaseFileAction { super('workbench.files.action.duplicateFile', nls.localize('duplicateFile', "Duplicate"), fileService, messageService, textFileService); this.tree = tree; - this.element = element; - this.target = (target && target.isDirectory) ? target : element.parent; + this.element = fileToDuplicate; + this.target = (target && target.isDirectory) ? target : fileToDuplicate.parent; this._updateEnablement(); } @@ -1000,7 +1004,7 @@ export class DuplicateFileAction extends BaseFileAction { } // Copy File - const result = this.fileService.copyFile(this.element.resource, this.findTarget()).then(stat => { + const result = this.fileService.copyFile(this.element.resource, findValidPasteFileTarget(this.target, { resource: this.element.resource, isDirectory: this.element.isDirectory })).then(stat => { if (!stat.isDirectory) { return this.editorService.openEditor({ resource: stat.resource, options: { pinned: true } }); } @@ -1010,44 +1014,44 @@ export class DuplicateFileAction extends BaseFileAction { return result; } +} - private findTarget(): URI { - let name = this.element.name; +function findValidPasteFileTarget(targetFolder: FileStat, fileToPaste: { resource: URI, isDirectory?: boolean }): URI { + let name = basenameOrAuthority(fileToPaste.resource); - let candidate = this.target.resource.with({ path: paths.join(this.target.resource.path, name) }); - while (true) { - if (!this.element.root.find(candidate)) { - break; - } - - name = this.toCopyName(name, this.element.isDirectory); - candidate = this.target.resource.with({ path: paths.join(this.target.resource.path, name) }); + let candidate = targetFolder.resource.with({ path: paths.join(targetFolder.resource.path, name) }); + while (true) { + if (!targetFolder.root.find(candidate)) { + break; } - return candidate; + name = incrementFileName(name, fileToPaste.isDirectory); + candidate = targetFolder.resource.with({ path: paths.join(targetFolder.resource.path, name) }); } - private toCopyName(name: string, isFolder: boolean): string { + return candidate; +} - // file.1.txt=>file.2.txt - if (!isFolder && name.match(/(.*\.)(\d+)(\..*)$/)) { - return name.replace(/(.*\.)(\d+)(\..*)$/, (match, g1?, g2?, g3?) => { return g1 + (parseInt(g2) + 1) + g3; }); - } +function incrementFileName(name: string, isFolder: boolean): string { - // file.txt=>file.1.txt - const lastIndexOfDot = name.lastIndexOf('.'); - if (!isFolder && lastIndexOfDot >= 0) { - return strings.format('{0}.1{1}', name.substr(0, lastIndexOfDot), name.substr(lastIndexOfDot)); - } - - // folder.1=>folder.2 - if (isFolder && name.match(/(\d+)$/)) { - return name.replace(/(\d+)$/, (match: string, ...groups: any[]) => { return String(parseInt(groups[0]) + 1); }); - } - - // file/folder=>file.1/folder.1 - return strings.format('{0}.1', name); + // file.1.txt=>file.2.txt + if (!isFolder && name.match(/(.*\.)(\d+)(\..*)$/)) { + return name.replace(/(.*\.)(\d+)(\..*)$/, (match, g1?, g2?, g3?) => { return g1 + (parseInt(g2) + 1) + g3; }); } + + // file.txt=>file.1.txt + const lastIndexOfDot = name.lastIndexOf('.'); + if (!isFolder && lastIndexOfDot >= 0) { + return strings.format('{0}.1{1}', name.substr(0, lastIndexOfDot), name.substr(lastIndexOfDot)); + } + + // folder.1=>folder.2 + if (isFolder && name.match(/(\d+)$/)) { + return name.replace(/(\d+)$/, (match: string, ...groups: any[]) => { return String(parseInt(groups[0]) + 1); }); + } + + // file/folder=>file.1/folder.1 + return strings.format('{0}.1', name); } // Global Compare with @@ -1341,7 +1345,7 @@ export class ShowOpenedFileInNewWindow extends Action { } public run(): TPromise { - const fileResource = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + const fileResource = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: Schemas.file /* todo@remote */ }); if (fileResource) { this.windowsService.openWindow([fileResource.fsPath], { forceNewWindow: true, forceOpenWorkspaceAsFile: true }); } else { @@ -1446,6 +1450,7 @@ export class CompareWithClipboardAction extends Action { @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IInstantiationService private instantiationService: IInstantiationService, @ITextModelService private textModelService: ITextModelService, + @IFileService private fileService: IFileService ) { super(id, label); @@ -1453,11 +1458,10 @@ export class CompareWithClipboardAction extends Action { } public run(): TPromise { - const resource: URI = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); - const provider = this.instantiationService.createInstance(ClipboardContentProvider); - - if (resource) { + const resource: URI = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true }); + if (resource && (this.fileService.canHandleResource(resource) || resource.scheme === Schemas.untitled)) { if (!this.registrationDisposal) { + const provider = this.instantiationService.createInstance(ClipboardContentProvider); this.registrationDisposal = this.textModelService.registerTextModelContentProvider(CompareWithClipboardAction.SCHEME, provider); } @@ -1521,27 +1525,42 @@ function getContext(listWidget: ListWidget, viewletService: IViewletService): IE // TODO@isidor these commands are calling into actions due to the complex inheritance action structure. // It should be the other way around, that actions call into commands. +function openExplorerAndRunAction(accessor: ServicesAccessor, isFolderAction: boolean): TPromise { + const instantationService = accessor.get(IInstantiationService); + const listService = accessor.get(IListService); + const viewletService = accessor.get(IViewletService); + const activeViewlet = viewletService.getActiveViewlet(); + let explorerPromise = TPromise.as(activeViewlet); + if (!activeViewlet || activeViewlet.getId() !== VIEWLET_ID) { + explorerPromise = viewletService.openViewlet(VIEWLET_ID, true); + } + + return explorerPromise.then((explorer: ExplorerViewlet) => { + const explorerView = explorer.getExplorerView(); + if (explorerView && explorerView.isVisible() && explorerView.isExpanded()) { + explorerView.focus(); + const explorerContext = getContext(listService.lastFocusedList, viewletService); + const constructor = isFolderAction ? NewFolderAction : NewFileAction; + const action = instantationService.createInstance(constructor, listService.lastFocusedList, explorerContext.stat); + + return action.run(explorerContext); + } + + return undefined; + }); +} + CommandsRegistry.registerCommand({ id: NEW_FILE_COMMAND_ID, handler: (accessor) => { - const instantationService = accessor.get(IInstantiationService); - const listService = accessor.get(IListService); - const explorerContext = getContext(listService.lastFocusedList, accessor.get(IViewletService)); - const newFileAction = instantationService.createInstance(NewFileAction, listService.lastFocusedList, explorerContext.stat); - - return newFileAction.run(explorerContext); + return openExplorerAndRunAction(accessor, false); } }); CommandsRegistry.registerCommand({ id: NEW_FOLDER_COMMAND_ID, handler: (accessor) => { - const instantationService = accessor.get(IInstantiationService); - const listService = accessor.get(IListService); - const explorerContext = getContext(listService.lastFocusedList, accessor.get(IViewletService)); - const newFolderAction = instantationService.createInstance(NewFolderAction, listService.lastFocusedList, explorerContext.stat); - - return newFolderAction.run(explorerContext); + return openExplorerAndRunAction(accessor, true); } }); @@ -1587,9 +1606,10 @@ export const copyFileHandler = (accessor: ServicesAccessor) => { export const pasteFileHandler = (accessor: ServicesAccessor) => { const instantationService = accessor.get(IInstantiationService); const listService = accessor.get(IListService); + const clipboardService = accessor.get(IClipboardService); const explorerContext = getContext(listService.lastFocusedList, accessor.get(IViewletService)); - return TPromise.join(distinctParents(filesToCopy, s => s.resource).map(toCopy => { + return TPromise.join(distinctParents(clipboardService.readFiles(), r => r).map(toCopy => { const pasteFileAction = instantationService.createInstance(PasteFileAction, listService.lastFocusedList, explorerContext.stat); return pasteFileAction.run(toCopy); })); diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts index 6e4bf7992f5..4f96e279b46 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts @@ -42,6 +42,7 @@ import { sequence } from 'vs/base/common/async'; import { getResourceForCommand, getMultiSelectedResources } from 'vs/workbench/parts/files/browser/files'; import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing'; import { getMultiSelectedEditorContexts } from 'vs/workbench/browser/parts/editor/editorCommands'; +import { Schemas } from 'vs/base/common/network'; // Commands @@ -84,14 +85,14 @@ export const openWindowCommand = (accessor: ServicesAccessor, paths: string[], f function save(resource: URI, isSaveAs: boolean, editorService: IWorkbenchEditorService, fileService: IFileService, untitledEditorService: IUntitledEditorService, textFileService: ITextFileService, editorGroupService: IEditorGroupService): TPromise { - if (resource && (fileService.canHandleResource(resource) || resource.scheme === 'untitled')) { + if (resource && (fileService.canHandleResource(resource) || resource.scheme === Schemas.untitled)) { // Save As (or Save untitled with associated path) - if (isSaveAs || resource.scheme === 'untitled') { + if (isSaveAs || resource.scheme === Schemas.untitled) { let encodingOfSource: string; - if (resource.scheme === 'untitled') { + if (resource.scheme === Schemas.untitled) { encodingOfSource = untitledEditorService.getEncoding(resource); - } else if (resource.scheme === 'file') { + } else if (fileService.canHandleResource(resource)) { const textModel = textFileService.models.get(resource); encodingOfSource = textModel && textModel.getEncoding(); // text model can be null e.g. if this is a binary file! } @@ -101,14 +102,14 @@ function save(resource: URI, isSaveAs: boolean, editorService: IWorkbenchEditorS const editor = getCodeEditor(activeEditor); if (editor) { const activeResource = toResource(activeEditor.input, { supportSideBySide: true }); - if (activeResource && (fileService.canHandleResource(activeResource) || resource.scheme === 'untitled') && activeResource.toString() === resource.toString()) { + if (activeResource && (fileService.canHandleResource(activeResource) || resource.scheme === Schemas.untitled) && activeResource.toString() === resource.toString()) { viewStateOfSource = editor.saveViewState(); } } // Special case: an untitled file with associated path gets saved directly unless "saveAs" is true let savePromise: TPromise; - if (!isSaveAs && resource.scheme === 'untitled' && untitledEditorService.hasAssociatedFilePath(resource)) { + if (!isSaveAs && resource.scheme === Schemas.untitled && untitledEditorService.hasAssociatedFilePath(resource)) { savePromise = textFileService.save(resource).then((result) => { if (result) { return URI.file(resource.fsPath); @@ -199,7 +200,7 @@ function saveAll(saveAllArguments: any, editorService: IWorkbenchEditorService, const untitledToReopen: { input: IResourceInput, position: Position }[] = []; results.results.forEach(result => { - if (!result.success || result.source.scheme !== 'untitled') { + if (!result.success || result.source.scheme !== Schemas.untitled) { return; } @@ -246,7 +247,7 @@ CommandsRegistry.registerCommand({ const messageService = accessor.get(IMessageService); const resources = getMultiSelectedResources(resource, accessor.get(IListService), editorService); - if (resource && resource.scheme !== 'untitled') { + if (resource && resource.scheme !== Schemas.untitled) { return textFileService.revertAll(resources, { force: true }).then(null, error => { messageService.show(Severity.Error, nls.localize('genericRevertError', "Failed to revert '{0}': {1}", basename(resource.fsPath), toErrorMessage(error, false))); }); @@ -318,7 +319,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ const editorService = accessor.get(IWorkbenchEditorService); resource = getResourceForCommand(resource, accessor.get(IListService), editorService); - if (resource && resource.scheme === 'file') { + if (resource && resource.scheme === Schemas.file /* only files on disk supported for now */) { const name = paths.basename(resource.fsPath); const editorLabel = nls.localize('modifiedLabel', "{0} (on disk) ↔ {1}", name, name); @@ -385,48 +386,48 @@ CommandsRegistry.registerCommand({ } }); -const revealInOSHandler = (accessor: ServicesAccessor, resource: URI) => { - // Without resource, try to look at the active editor - const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IWorkbenchEditorService)); - +function revealResourcesInOS(resources: URI[], windowsService: IWindowsService, messageService: IMessageService): void { if (resources.length) { - const windowsService = accessor.get(IWindowsService); sequence(resources.map(r => () => windowsService.showItemInFolder(paths.normalize(r.fsPath, true)))); } else { - const messageService = accessor.get(IMessageService); messageService.show(severity.Info, nls.localize('openFileToReveal', "Open a file first to reveal")); } -}; +} KeybindingsRegistry.registerCommandAndKeybindingRule({ id: REVEAL_IN_OS_COMMAND_ID, weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - when: undefined, - primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_R), - secondary: [KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R], + when: ExplorerFocusCondition, + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R, win: { primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_R }, - handler: revealInOSHandler + handler: (accessor: ServicesAccessor, resource: URI) => { + const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IWorkbenchEditorService)); + revealResourcesInOS(resources, accessor.get(IWindowsService), accessor.get(IMessageService)); + } }); -// TODO@isidor deprecated remove in february -CommandsRegistry.registerCommand({ +KeybindingsRegistry.registerCommandAndKeybindingRule({ + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_R), id: 'workbench.action.files.revealActiveFileInWindows', - handler: revealInOSHandler + handler: (accessor: ServicesAccessor, resource: URI) => { + const editorService = accessor.get(IWorkbenchEditorService); + const activeInput = editorService.getActiveEditorInput(); + const resources = activeInput && activeInput.getResource() ? [activeInput.getResource()] : []; + revealResourcesInOS(resources, accessor.get(IWindowsService), accessor.get(IMessageService)); + } }); -const copyPathHandler = (accessor, resource: URI) => { - const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IWorkbenchEditorService)); +function resourcesToClipboard(resources: URI[], clipboardService: IClipboardService, messageService: IMessageService): void { if (resources.length) { - const clipboardService = accessor.get(IClipboardService); const lineDelimiter = isWindows ? '\r\n' : '\n'; - const text = resources.map(r => r.scheme === 'file' ? labels.getPathLabel(r) : r.toString()).join(lineDelimiter); + const text = resources.map(r => r.scheme === Schemas.file ? labels.getPathLabel(r) : r.toString()).join(lineDelimiter); clipboardService.writeText(text); } else { - const messageService = accessor.get(IMessageService); messageService.show(severity.Info, nls.localize('openFileToCopy', "Open a file first to copy its path")); } -}; - +} KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), when: ExplorerFocusCondition, @@ -435,13 +436,23 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_C }, id: COPY_PATH_COMMAND_ID, - handler: copyPathHandler + handler: (accessor, resource: URI) => { + const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IWorkbenchEditorService)); + resourcesToClipboard(resources, accessor.get(IClipboardService), accessor.get(IMessageService)); + } }); -// TODO@isidor deprecated remove in february -CommandsRegistry.registerCommand({ +KeybindingsRegistry.registerCommandAndKeybindingRule({ + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: undefined, + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_P), id: 'workbench.action.files.copyPathOfActiveFile', - handler: copyPathHandler + handler: (accessor, resource: URI) => { + const editorService = accessor.get(IWorkbenchEditorService); + const activeInput = editorService.getActiveEditorInput(); + const resources = activeInput && activeInput.getResource() ? [activeInput.getResource()] : []; + resourcesToClipboard(resources, accessor.get(IClipboardService), accessor.get(IMessageService)); + } }); CommandsRegistry.registerCommand({ @@ -520,7 +531,7 @@ CommandsRegistry.registerCommand({ const editorGroup = editorGroupService.getStacksModel().getGroup(context.groupId); editorGroup.getEditors().forEach(editor => { const resource = toResource(editor, { supportSideBySide: true }); - if (resource && (resource.scheme === 'untitled' || fileService.canHandleResource(resource))) { + if (resource && (resource.scheme === Schemas.untitled || fileService.canHandleResource(resource))) { saveAllArg.push(resource); } }); diff --git a/src/vs/workbench/parts/files/electron-browser/files.contribution.ts b/src/vs/workbench/parts/files/electron-browser/files.contribution.ts index 1f3a9ba56f3..bdc2ca614b6 100644 --- a/src/vs/workbench/parts/files/electron-browser/files.contribution.ts +++ b/src/vs/workbench/parts/files/electron-browser/files.contribution.ts @@ -100,6 +100,10 @@ Registry.as(EditorExtensions.Editors).registerEditor( Registry.as(EditorInputExtensions.EditorInputFactories).registerFileInputFactory({ createFileInput: (resource, encoding, instantiationService): IFileEditorInput => { return instantiationService.createInstance(FileEditorInput, resource, encoding); + }, + + isFileInput: (obj): obj is IFileEditorInput => { + return obj instanceof FileEditorInput; } }); diff --git a/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts b/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts index 50804c6c0cd..8a89c8f3511 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts @@ -21,6 +21,7 @@ import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; export class EmptyView extends ViewsViewletPanel { @@ -37,9 +38,10 @@ export class EmptyView extends ViewsViewletPanel { @IInstantiationService private instantiationService: IInstantiationService, @IKeybindingService keybindingService: IKeybindingService, @IContextMenuService contextMenuService: IContextMenuService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IConfigurationService configurationService: IConfigurationService ) { - super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService); + super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService, configurationService); this.contextService.onDidChangeWorkbenchState(() => this.setLabels()); } diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts index 3c8aa206404..4c1612cbf09 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts @@ -42,6 +42,8 @@ import { ResourceGlobMatcher } from 'vs/workbench/electron-browser/resources'; import { isLinux } from 'vs/base/common/platform'; import { IDecorationsService } from 'vs/workbench/services/decorations/browser/decorations'; import { WorkbenchTree } from 'vs/platform/list/browser/listService'; +import { DelayedDragHandler } from 'vs/base/browser/dnd'; +import { Schemas } from 'vs/base/common/network'; export interface IExplorerViewOptions extends IViewletViewOptions { viewletState: FileViewletState; @@ -74,6 +76,9 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView private autoReveal: boolean; private sortOrder: SortOrder; private settings: object; + private treeContainer: HTMLElement; + private dragHandler: DelayedDragHandler; + private isDisposed: boolean; constructor( options: IExplorerViewOptions, @@ -88,10 +93,10 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView @IPartService private partService: IPartService, @IKeybindingService keybindingService: IKeybindingService, @IContextKeyService contextKeyService: IContextKeyService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService configurationService: IConfigurationService, @IDecorationsService decorationService: IDecorationsService ) { - super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService); + super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService, configurationService); this.settings = options.viewletSettings; this.viewletState = options.viewletState; @@ -122,6 +127,9 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView protected renderHeader(container: HTMLElement): void { super.renderHeader(container); + // Expand on drag over + this.dragHandler = new DelayedDragHandler(container, () => this.setExpanded(true)); + const titleElement = container.querySelector('.title') as HTMLElement; const setHeader = () => { const workspace = this.contextService.getWorkspace(); @@ -151,9 +159,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView } public renderBody(container: HTMLElement): void { - this.treeContainer = super.renderViewTree(container); - DOM.addClass(this.treeContainer, 'explorer-folders-view'); - + this.treeContainer = DOM.append(container, DOM.$('.explorer-folders-view')); this.tree = this.createViewer($(this.treeContainer)); if (this.toolbar) { @@ -164,6 +170,13 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView this.disposables.push(this.contextService.onDidChangeWorkbenchState(e => this.refreshFromEvent())); } + layoutBody(size: number): void { + if (this.treeContainer) { + this.treeContainer.style.height = size + 'px'; + } + super.layoutBody(size); + } + public getActions(): IAction[] { const actions: Action[] = []; @@ -226,7 +239,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView // Handle closed or untitled file (convince explorer to not reopen any file when getting visible) const activeInput = this.editorService.getActiveEditorInput(); - if (!activeInput || toResource(activeInput, { supportSideBySide: true, filter: 'untitled' })) { + if (!activeInput || toResource(activeInput, { supportSideBySide: true, filter: Schemas.untitled })) { this.settings[ExplorerView.MEMENTO_LAST_ACTIVE_FILE_RESOURCE] = void 0; clearFocus = true; } @@ -381,7 +394,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView return model; } - public createViewer(container: Builder): WorkbenchTree { + private createViewer(container: Builder): WorkbenchTree { const dataSource = this.instantiationService.createInstance(FileDataSource); const renderer = this.instantiationService.createInstance(FileRenderer, this.viewletState); const controller = this.instantiationService.createInstance(FileController); @@ -441,6 +454,10 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView return this.explorerViewer; } + getViewer(): WorkbenchTree { + return this.tree; + } + public getOptimalWidth(): number { const parentNode = this.explorerViewer.getHTMLElement(); const childNodes = [].slice.call(parentNode.querySelectorAll('.explorer-item .label-name')); // select all file labels @@ -952,6 +969,13 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView }); } + private reveal(element: any, relativeTop?: number): TPromise { + if (!this.tree) { + return TPromise.as(null); // return early if viewlet has not yet been created + } + return this.tree.reveal(element, relativeTop); + } + public shutdown(): void { // Keep list of expanded folders to restore on next load @@ -974,4 +998,12 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView super.shutdown(); } + + dispose(): void { + this.isDisposed = true; + if (this.dragHandler) { + this.dragHandler.dispose(); + } + super.dispose(); + } } diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts index eaf035bc91e..55174406507 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts @@ -10,7 +10,6 @@ import lifecycle = require('vs/base/common/lifecycle'); import objects = require('vs/base/common/objects'); import DOM = require('vs/base/browser/dom'); import URI from 'vs/base/common/uri'; -import { MIME_BINARY } from 'vs/base/common/mime'; import { once } from 'vs/base/common/functional'; import paths = require('vs/base/common/paths'); import resources = require('vs/base/common/resources'); @@ -26,9 +25,9 @@ import { IFilesConfiguration, SortOrder } from 'vs/workbench/parts/files/common/ import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { FileOperationError, FileOperationResult, IFileService, FileKind } from 'vs/platform/files/common/files'; import { ResourceMap } from 'vs/base/common/map'; -import { DuplicateFileAction, ImportFileAction, IEditableData, IFileViewletState } from 'vs/workbench/parts/files/electron-browser/fileActions'; +import { DuplicateFileAction, ImportFileAction, IEditableData, IFileViewletState, FileCopiedContext } from 'vs/workbench/parts/files/electron-browser/fileActions'; import { IDataSource, ITree, IAccessibilityProvider, IRenderer, ContextMenuEvent, ISorter, IFilter, 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, SimpleFileResourceDragAndDrop } from 'vs/base/parts/tree/browser/treeDnd'; +import { DesktopDragAndDropData, ExternalElementsDragAndDropData } from 'vs/base/parts/tree/browser/treeDnd'; import { ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults'; import { FileStat, NewStatPlaceholder, Model } from 'vs/workbench/parts/files/common/explorerModel'; import { DragMouseEvent, IMouseEvent } from 'vs/base/browser/mouseEvent'; @@ -36,7 +35,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; -import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService, IConfirmation, Severity, IConfirmationResult, getConfirmMessage } from 'vs/platform/message/common/message'; @@ -51,12 +50,13 @@ import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IWindowService } from 'vs/platform/windows/common/windows'; import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing'; -import { getPathLabel } from 'vs/base/common/labels'; -import { extractResources } from 'vs/workbench/browser/editor'; +import { extractResources, SimpleFileResourceDragAndDrop, CodeDataTransfers, fillResourceDataTransfers } from 'vs/workbench/browser/dnd'; import { relative } from 'path'; -import { DataTransfers } from 'vs/base/browser/dnd'; import { distinctParents } from 'vs/base/common/resources'; import { WorkbenchTree, WorkbenchTreeController } from 'vs/platform/list/browser/listService'; +import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; +import { DataTransfers } from 'vs/base/browser/dnd'; +import { Schemas } from 'vs/base/common/network'; export class FileDataSource implements IDataSource { constructor( @@ -326,7 +326,7 @@ export class FileAccessibilityProvider implements IAccessibilityProvider { // Explorer Controller export class FileController extends WorkbenchTreeController implements IDisposable { - + private fileCopiedContextKey: IContextKey; private contributedContextMenu: IMenu; private toDispose: IDisposable[]; private previousSelectionRangeStop: FileStat; @@ -337,10 +337,12 @@ export class FileController extends WorkbenchTreeController implements IDisposab @ITelemetryService private telemetryService: ITelemetryService, @IMenuService private menuService: IMenuService, @IContextKeyService contextKeyService: IContextKeyService, + @IClipboardService private clipboardService: IClipboardService, @IConfigurationService configurationService: IConfigurationService ) { - super({ clickBehavior: ClickBehavior.ON_MOUSE_UP /* do not change to not break DND */, keyboardSupport: false /* handled via IListService */ }, configurationService); + super({ clickBehavior: ClickBehavior.ON_MOUSE_UP /* do not change to not break DND */ }, configurationService); + this.fileCopiedContextKey = FileCopiedContext.bindTo(contextKeyService); this.toDispose = []; } @@ -389,8 +391,8 @@ export class FileController extends WorkbenchTreeController implements IDisposab tree.setSelection(selection.filter(s => s !== stat)); } else { tree.setSelection(selection.concat(stat)); + tree.setFocus(stat, payload); } - tree.setFocus(stat, payload); } // Allow to unselect @@ -409,7 +411,7 @@ export class FileController extends WorkbenchTreeController implements IDisposab else { // Expand / Collapse - if (isDoubleClick || this.openOnSingleClick) { + if (isDoubleClick || this.openOnSingleClick || this.isClickOnTwistie(event)) { tree.toggleExpansion(stat, event.altKey); this.previousSelectionRangeStop = undefined; } @@ -446,6 +448,9 @@ export class FileController extends WorkbenchTreeController implements IDisposab tree.setFocus(stat); + // update dynamic contexts + this.fileCopiedContextKey.set(this.clipboardService.hasFiles()); + if (!this.contributedContextMenu) { this.contributedContextMenu = this.menuService.createMenu(MenuId.ExplorerContext, tree.contextKeyService); this.toDispose.push(this.contributedContextMenu); @@ -456,7 +461,7 @@ export class FileController extends WorkbenchTreeController implements IDisposab this.contextMenuService.showContextMenu({ getAnchor: () => anchor, getActions: () => { - const actions = []; + const actions: IAction[] = []; fillInActions(this.contributedContextMenu, { arg: stat instanceof FileStat ? stat.resource : {}, shouldForwardArgs: true }, actions, this.contextMenuService); return TPromise.as(actions); }, @@ -681,13 +686,13 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { @IWorkspaceContextService private contextService: IWorkspaceContextService, @IFileService private fileService: IFileService, @IConfigurationService private configurationService: IConfigurationService, - @IInstantiationService private instantiationService: IInstantiationService, + @IInstantiationService instantiationService: IInstantiationService, @ITextFileService private textFileService: ITextFileService, @IBackupFileService private backupFileService: IBackupFileService, @IWindowService private windowService: IWindowService, @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService ) { - super(stat => this.statToResource(stat)); + super(stat => this.statToResource(stat), instantiationService); this.toDispose = []; @@ -715,6 +720,7 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { public onDragStart(tree: ITree, data: IDragAndDropData, originalEvent: DragMouseEvent): void { const sources: FileStat[] = data.getData(); if (sources && sources.length) { + // When dragging folders, make sure to collapse them to free up some space sources.forEach(s => { if (s.isDirectory && tree.isExpanded(s)) { @@ -723,14 +729,13 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { }); // Apply some datatransfer types to allow for dragging the element outside of the application - originalEvent.dataTransfer.setData(DataTransfers.TEXT, sources.map(fs => fs.resource.scheme === 'file' ? getPathLabel(fs.resource) : fs.resource.toString()).join('\n')); - if (sources.length === 1) { - if (!sources[0].isDirectory) { - originalEvent.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, sources[0].name, sources[0].resource.toString()].join(':')); - } + this.instantiationService.invokeFunction(fillResourceDataTransfers, sources, originalEvent); - } else { - originalEvent.dataTransfer.setData(DataTransfers.URLS, JSON.stringify(sources.filter(s => !s.isDirectory).map(s => s.resource.toString()))); + // The only custom data transfer we set from the explorer is a file transfer + // to be able to DND between multiple code file explorers across windows + const fileResources = sources.filter(s => !s.isDirectory && s.resource.scheme === Schemas.file).map(r => r.resource.fsPath); + if (fileResources.length) { + originalEvent.dataTransfer.setData(CodeDataTransfers.FILES, JSON.stringify(fileResources)); } } } @@ -745,15 +750,13 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { // Desktop DND if (fromDesktop) { - const dragData = (data).getData(); - - const types = dragData.types; + const types: string[] = originalEvent.dataTransfer.types; const typesArray: string[] = []; for (let i = 0; i < types.length; i++) { - typesArray.push(types[i]); + typesArray.push(types[i].toLowerCase()); // somehow the types are lowercase } - if (typesArray.length === 0 || !typesArray.some(type => { return type === 'Files'; })) { + if (typesArray.indexOf(DataTransfers.FILES.toLowerCase()) === -1 && typesArray.indexOf(CodeDataTransfers.FILES.toLowerCase()) === -1) { return DRAG_OVER_REJECT; } } diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index 45eb47b14df..545a0d341a2 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -40,9 +40,7 @@ import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { IMenuService, MenuId, IMenu } from 'vs/platform/actions/common/actions'; import { OpenEditorsGroupContext, DirtyEditorContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; import { ResourceContextKey } from 'vs/workbench/common/resources'; -import { DataTransfers } from 'vs/base/browser/dnd'; -import { getPathLabel, getBaseLabel } from 'vs/base/common/labels'; -import { MIME_BINARY } from 'vs/base/common/mime'; +import { fillResourceDataTransfers, ResourcesDropHandler, LocalSelectionTransfer } from 'vs/workbench/browser/dnd'; const $ = dom.$; @@ -70,7 +68,7 @@ export class OpenEditorsView extends ViewsViewletPanel { @ITextFileService private textFileService: ITextFileService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IEditorGroupService private editorGroupService: IEditorGroupService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService configurationService: IConfigurationService, @IKeybindingService keybindingService: IKeybindingService, @IUntitledEditorService private untitledEditorService: IUntitledEditorService, @IContextKeyService private contextKeyService: IContextKeyService, @@ -81,7 +79,7 @@ export class OpenEditorsView extends ViewsViewletPanel { super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize({ key: 'openEditosrSection', comment: ['Open is an adjective'] }, "Open Editors Section"), - }, keybindingService, contextMenuService); + }, keybindingService, contextMenuService, configurationService); this.model = editorGroupService.getStacksModel(); @@ -151,8 +149,9 @@ export class OpenEditorsView extends ViewsViewletPanel { new EditorGroupRenderer(this.keybindingService, this.instantiationService, this.editorGroupService), new OpenEditorRenderer(getSelectedElements, this.instantiationService, this.keybindingService, this.configurationService, this.editorGroupService) ], { - identityProvider: element => element instanceof OpenEditor ? element.getId() : element.id.toString() - }); + identityProvider: (element: OpenEditor | EditorGroup) => element instanceof OpenEditor ? element.getId() : element.id.toString(), + selectOnMouseDown: false /* disabled to better support DND */ + }) as WorkbenchList; this.contributedContextMenu = this.menuService.createMenu(MenuId.OpenEditorsContext, this.list.contextKeyService); this.disposables.push(this.contributedContextMenu); @@ -287,13 +286,21 @@ export class OpenEditorsView extends ViewsViewletPanel { } */ this.telemetryService.publicLog('workbenchActionExecuted', { id: 'workbench.files.openFile', from: 'openEditors' }); + let position = this.model.positionOfGroup(element.group); if (options.sideBySide && position !== Position.THREE) { position++; } - this.editorGroupService.activateGroup(this.model.groupAt(position)); - this.editorService.openEditor(element.editor, options, position) - .done(() => this.editorGroupService.activateGroup(this.model.groupAt(position)), errors.onUnexpectedError); + + const preserveActivateGroup = options.sideBySide && options.preserveFocus; // needed for https://github.com/Microsoft/vscode/issues/42399 + if (!preserveActivateGroup) { + this.editorGroupService.activateGroup(this.model.groupAt(position)); // needed for https://github.com/Microsoft/vscode/issues/6672 + } + this.editorService.openEditor(element.editor, options, position).done(() => { + if (!preserveActivateGroup) { + this.editorGroupService.activateGroup(this.model.groupAt(position)); + } + }, errors.onUnexpectedError); } } @@ -302,7 +309,7 @@ export class OpenEditorsView extends ViewsViewletPanel { this.contextMenuService.showContextMenu({ getAnchor: () => e.anchor, getActions: () => { - const actions = []; + const actions: IAction[] = []; fillInActions(this.contributedContextMenu, { shouldForwardArgs: true, arg: element instanceof OpenEditor ? element.editor.getResource() : {} }, actions, this.contextMenuService); return TPromise.as(actions); }, @@ -389,7 +396,7 @@ export class OpenEditorsView extends ViewsViewletPanel { } private computeMinExpandedBodySize(visibleOpenEditors = OpenEditorsView.DEFAULT_VISIBLE_OPEN_EDITORS): number { - const itemsToShow = Math.min(Math.max(visibleOpenEditors, 1), this.elementCount); + const itemsToShow = Math.min(Math.max(visibleOpenEditors, 0), this.elementCount); return itemsToShow * OpenEditorsDelegate.ITEM_HEIGHT; } @@ -441,6 +448,8 @@ class OpenEditorsDelegate implements IDelegate { class EditorGroupRenderer implements IRenderer { static readonly ID = 'editorgroup'; + private transfer = LocalSelectionTransfer.getInstance(); + constructor( private keybindingService: IKeybindingService, private instantiationService: IInstantiationService, @@ -465,21 +474,24 @@ class EditorGroupRenderer implements IRenderer { - if (OpenEditorRenderer.DRAGGED_OPEN_EDITORS) { - dom.addClass(container, 'focused'); - } + dom.addClass(container, 'focused'); })); editorGroupTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_LEAVE, (e: DragEvent) => { dom.removeClass(container, 'focused'); })); - editorGroupTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DROP, () => { + editorGroupTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DROP, e => { dom.removeClass(container, 'focused'); - if (OpenEditorRenderer.DRAGGED_OPEN_EDITORS) { - const model = this.editorGroupService.getStacksModel(); - const positionOfTargetGroup = model.positionOfGroup(editorGroupTemplate.editorGroup); - OpenEditorRenderer.DRAGGED_OPEN_EDITORS.forEach(oe => + + const model = this.editorGroupService.getStacksModel(); + const positionOfTargetGroup = model.positionOfGroup(editorGroupTemplate.editorGroup); + + if (this.transfer.hasData(OpenEditor.prototype)) { + this.transfer.getData(OpenEditor.prototype).forEach(oe => this.editorGroupService.moveEditor(oe.editor, model.positionOfGroup(oe.group), positionOfTargetGroup, { preserveFocus: true })); this.editorGroupService.activateGroup(positionOfTargetGroup); + } else { + const dropHandler = this.instantiationService.createInstance(ResourcesDropHandler, { allowWorkspaceOpen: false }); + dropHandler.handleDrop(e, () => this.editorGroupService.activateGroup(positionOfTargetGroup), positionOfTargetGroup); } })); @@ -500,7 +512,8 @@ class EditorGroupRenderer implements IRenderer { static readonly ID = 'openeditor'; - public static DRAGGED_OPEN_EDITORS: OpenEditor[]; + + private transfer = LocalSelectionTransfer.getInstance(); constructor( private getSelectedElements: () => (OpenEditor | IEditorGroup)[], @@ -531,55 +544,45 @@ class OpenEditorRenderer implements IRenderer { + const dragged = this.getSelectedElements().filter(e => e instanceof OpenEditor && !!e.getResource()); const dragImage = document.createElement('div'); e.dataTransfer.effectAllowed = 'copyMove'; dragImage.className = 'monaco-tree-drag-image'; - dragImage.textContent = editorTemplate.openEditor.editor.getName(); + dragImage.textContent = dragged.length === 1 ? editorTemplate.openEditor.editor.getName() : String(dragged.length); document.body.appendChild(dragImage); e.dataTransfer.setDragImage(dragImage, -10, -10); setTimeout(() => document.body.removeChild(dragImage), 0); - const dragged = this.getSelectedElements().filter(e => e instanceof OpenEditor && !!e.getResource()); - OpenEditorRenderer.DRAGGED_OPEN_EDITORS = dragged; + this.transfer.setData(dragged, OpenEditor.prototype); if (editorTemplate.openEditor && editorTemplate.openEditor.editor) { - // enables dropping editor resource path into text controls - e.dataTransfer.setData(DataTransfers.TEXT, dragged.map(d => d.getResource()).map(resource => resource.scheme === 'file' ? getPathLabel(resource) : resource.toString()).join('\n')); - - if (dragged.length === 1) { - const resource = dragged[0].getResource(); - e.dataTransfer.setData(DataTransfers.URL, resource.toString()); // enables dropping editor into editor area - if (resource.scheme === 'file') { - e.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, getBaseLabel(resource), resource.toString()].join(':')); // enables support to drag an editor as file to desktop - } - } else { - e.dataTransfer.setData(DataTransfers.URLS, JSON.stringify(dragged.map(s => s.getResource().toString()))); - } + this.instantiationService.invokeFunction(fillResourceDataTransfers, dragged.map(d => d.getResource()), e); } })); editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_OVER, () => { - if (OpenEditorRenderer.DRAGGED_OPEN_EDITORS) { - dom.addClass(container, 'focused'); - } + dom.addClass(container, 'focused'); })); editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_LEAVE, () => { dom.removeClass(container, 'focused'); })); editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DROP, (e: DragEvent) => { dom.removeClass(container, 'focused'); - if (OpenEditorRenderer.DRAGGED_OPEN_EDITORS) { - const model = this.editorGroupService.getStacksModel(); - const positionOfTargetGroup = model.positionOfGroup(editorTemplate.openEditor.group); - const index = editorTemplate.openEditor.group.indexOf(editorTemplate.openEditor.editor); + const model = this.editorGroupService.getStacksModel(); + const positionOfTargetGroup = model.positionOfGroup(editorTemplate.openEditor.group); + const index = editorTemplate.openEditor.group.indexOf(editorTemplate.openEditor.editor); - OpenEditorRenderer.DRAGGED_OPEN_EDITORS.forEach(oe => + if (this.transfer.hasData(OpenEditor.prototype)) { + this.transfer.getData(OpenEditor.prototype).forEach(oe => this.editorGroupService.moveEditor(oe.editor, model.positionOfGroup(oe.group), positionOfTargetGroup, { index, preserveFocus: true })); this.editorGroupService.activateGroup(positionOfTargetGroup); + } else { + const dropHandler = this.instantiationService.createInstance(ResourcesDropHandler, { allowWorkspaceOpen: false }); + dropHandler.handleDrop(e, () => this.editorGroupService.activateGroup(positionOfTargetGroup), positionOfTargetGroup, index); } })); editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_END, () => { - OpenEditorRenderer.DRAGGED_OPEN_EDITORS = undefined; + this.transfer.clearData(); })); return editorTemplate; diff --git a/src/vs/workbench/parts/localizations/browser/localizations.contribution.ts b/src/vs/workbench/parts/localizations/browser/localizations.contribution.ts new file mode 100644 index 00000000000..9af94e32e96 --- /dev/null +++ b/src/vs/workbench/parts/localizations/browser/localizations.contribution.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. + *--------------------------------------------------------------------------------------------*/ + +import { localize } from 'vs/nls'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { IWorkbenchContribution, Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; +import { IJSONContributionRegistry, Extensions as JSONExtensions } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; +import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions'; +import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; +import { Disposable } from 'vs/base/common/lifecycle'; +import { ConfigureLocaleAction } from 'vs/workbench/parts/localizations/browser/localizationsActions'; +import { ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry'; +import { ILocalizationsService } from 'vs/platform/localizations/common/localizations'; +import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; +import { language } from 'vs/base/common/platform'; + +// Register action to configure locale and related settings +const registry = Registry.as(Extensions.WorkbenchActions); +registry.registerWorkbenchAction(new SyncActionDescriptor(ConfigureLocaleAction, ConfigureLocaleAction.ID, ConfigureLocaleAction.LABEL), 'Configure Language'); + +export class LocalesSchemaUpdater extends Disposable implements IWorkbenchContribution { + constructor( + @ILocalizationsService private localizationService: ILocalizationsService + ) { + super(); + this.update(); + this._register(this.localizationService.onDidLanguagesChange(() => this.update())); + } + + private update(): void { + this.localizationService.getLanguageIds() + .then(languageIds => registerLocaleDefinitionSchema(languageIds)); + } +} + +function registerLocaleDefinitionSchema(languages: string[]): void { + const localeDefinitionFileSchemaId = 'vscode://schemas/locale'; + const jsonRegistry = Registry.as(JSONExtensions.JSONContribution); + // Keep en-US since we generated files with that content. + jsonRegistry.registerSchema(localeDefinitionFileSchemaId, { + id: localeDefinitionFileSchemaId, + allowComments: true, + description: 'Locale Definition file', + type: 'object', + default: { + 'locale': 'en' + }, + required: ['locale'], + properties: { + locale: { + type: 'string', + enum: languages, + description: localize('JsonSchema.locale', 'The UI Language to use.') + } + } + }); +} + +registerLocaleDefinitionSchema([language]); +const workbenchRegistry = Registry.as(WorkbenchExtensions.Workbench); +workbenchRegistry.registerWorkbenchContribution(LocalesSchemaUpdater, LifecyclePhase.Eventually); + +ExtensionsRegistry.registerExtensionPoint('localizations', [], { + description: localize('vscode.extension.contributes.localizations', "Contributes localizations to the editor"), + type: 'array', + default: [], + items: { + type: 'object', + required: ['languageId', 'translations'], + defaultSnippets: [{ body: { languageId: '', languageName: '', languageNameLocalized: '', translations: [{ id: 'vscode', path: '' }] } }], + properties: { + languageId: { + description: localize('vscode.extension.contributes.localizations.languageId', 'Id of the language into which the display strings are translated.'), + type: 'string' + }, + languageName: { + description: localize('vscode.extension.contributes.localizations.languageName', 'Name of the language in English.'), + type: 'string' + }, + languageNameLocalized: { + description: localize('vscode.extension.contributes.localizations.languageNameLocalized', 'Name of the language in contributed language.'), + type: 'string' + }, + translations: { + description: localize('vscode.extension.contributes.localizations.translations', 'List of translations associated to the language.'), + type: 'array', + default: [{ id: 'vscode', path: '' }], + items: { + type: 'object', + required: ['id', 'path'], + properties: { + id: { + type: 'string', + description: localize('vscode.extension.contributes.localizations.translations.id', "Id of VS Code or Extension for which this translation is contributed to. Id of VS Code is always `vscode` and of extension should be in format `publisherId.extensionName`."), + pattern: '^((vscode)|([a-z0-9A-Z][a-z0-9\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\-A-Z]*))$', + patternErrorMessage: localize('vscode.extension.contributes.localizations.translations.id.pattern', "Id should be `vscode` or in format `publisherId.extensionName` for translating VS code or an extension respectively.") + }, + path: { + type: 'string', + description: localize('vscode.extension.contributes.localizations.translations.path', "A relative path to a file containing translations for the language.") + } + }, + defaultSnippets: [{ body: { id: '', path: '' } }], + }, + } + } + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/localizations/browser/localizationsActions.ts b/src/vs/workbench/parts/localizations/browser/localizationsActions.ts new file mode 100644 index 00000000000..06d969dd98e --- /dev/null +++ b/src/vs/workbench/parts/localizations/browser/localizationsActions.ts @@ -0,0 +1,59 @@ +/*--------------------------------------------------------------------------------------------- + * 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 { Action } from 'vs/base/common/actions'; +import { IFileService } from 'vs/platform/files/common/files'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IEditor } from 'vs/platform/editor/common/editor'; +import { join } from 'vs/base/common/paths'; +import URI from 'vs/base/common/uri'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { getPathLabel } from 'vs/base/common/labels'; +import { language } from 'vs/base/common/platform'; + +export class ConfigureLocaleAction extends Action { + public static readonly ID = 'workbench.action.configureLocale'; + public static readonly LABEL = localize('configureLocale', "Configure Language"); + + private static DEFAULT_CONTENT: string = [ + '{', + `\t// ${localize('displayLanguage', 'Defines VSCode\'s display language.')}`, + `\t// ${localize('doc', 'See {0} for a list of supported languages.', 'https://go.microsoft.com/fwlink/?LinkId=761051')}`, + `\t// ${localize('restart', 'Changing the value requires restarting VSCode.')}`, + `\t"locale":"${language}"`, + '}' + ].join('\n'); + + constructor(id: string, label: string, + @IFileService private fileService: IFileService, + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IEnvironmentService private environmentService: IEnvironmentService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService + ) { + super(id, label); + } + + public run(event?: any): TPromise { + const file = URI.file(join(this.environmentService.appSettingsHome, 'locale.json')); + return this.fileService.resolveFile(file).then(null, (error) => { + return this.fileService.createFile(file, ConfigureLocaleAction.DEFAULT_CONTENT); + }).then((stat) => { + if (!stat) { + return undefined; + } + return this.editorService.openEditor({ + resource: stat.resource, + options: { + forceOpen: true + } + }); + }, (error) => { + throw new Error(localize('fail.createSettings', "Unable to create '{0}' ({1}).", getPathLabel(file, this.contextService), error)); + }); + } +} \ No newline at end of file diff --git a/src/vs/workbench/parts/logs/electron-browser/logsActions.ts b/src/vs/workbench/parts/logs/electron-browser/logsActions.ts index 3e8c16aa6e4..9e24987fa44 100644 --- a/src/vs/workbench/parts/logs/electron-browser/logsActions.ts +++ b/src/vs/workbench/parts/logs/electron-browser/logsActions.ts @@ -101,7 +101,7 @@ export class OpenLogFileAction extends Action { export class SetLogLevelAction extends Action { static ID = 'workbench.action.setLogLevel'; - static LABEL = nls.localize('setLogLevel', "Set Log Level"); + static LABEL = nls.localize('setLogLevel', "Set Log Level..."); constructor(id: string, label: string, @IQuickOpenService private quickOpenService: IQuickOpenService, diff --git a/src/vs/workbench/parts/markers/browser/markersPanel.ts b/src/vs/workbench/parts/markers/browser/markersPanel.ts index eef2a33b0d7..84b9cb51aae 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanel.ts @@ -28,10 +28,10 @@ import Messages from 'vs/workbench/parts/markers/common/messages'; import { RangeHighlightDecorations } from 'vs/workbench/browser/parts/editor/rangeDecorations'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { debounceEvent } from 'vs/base/common/event'; -import { SimpleFileResourceDragAndDrop } from 'vs/base/parts/tree/browser/treeDnd'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { TreeResourceNavigator, WorkbenchTree } from 'vs/platform/list/browser/listService'; import { IMarkersWorkbenchService } from 'vs/workbench/parts/markers/common/markers'; +import { SimpleFileResourceDragAndDrop } from 'vs/workbench/browser/dnd'; export class MarkersPanel extends Panel { @@ -193,8 +193,8 @@ export class MarkersPanel extends Panel { this.treeContainer = dom.append(parent, dom.$('.tree-container')); dom.addClass(this.treeContainer, 'show-file-icons'); const renderer = this.instantiationService.createInstance(Viewer.Renderer); - const dnd = new SimpleFileResourceDragAndDrop(obj => obj instanceof Resource ? obj.uri : void 0); - let controller = this.instantiationService.createInstance(Controller); + const dnd = this.instantiationService.createInstance(SimpleFileResourceDragAndDrop, obj => obj instanceof Resource ? obj.uri : void 0); + const controller = this.instantiationService.createInstance(Controller); this.tree = this.instantiationService.createInstance(WorkbenchTree, this.treeContainer, { dataSource: new Viewer.DataSource(), renderer, diff --git a/src/vs/workbench/parts/markers/browser/markersTreeController.ts b/src/vs/workbench/parts/markers/browser/markersTreeController.ts index a460210a923..548b3fb7b6b 100644 --- a/src/vs/workbench/parts/markers/browser/markersTreeController.ts +++ b/src/vs/workbench/parts/markers/browser/markersTreeController.ts @@ -7,7 +7,6 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as mouse from 'vs/base/browser/mouseEvent'; import tree = require('vs/base/parts/tree/browser/tree'); -import treedefaults = require('vs/base/parts/tree/browser/treeDefaults'); import { MarkersModel } from 'vs/workbench/parts/markers/common/markersModel'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IMenuService, MenuId } from 'vs/platform/actions/common/actions'; @@ -25,7 +24,7 @@ export class Controller extends WorkbenchTreeController { @IKeybindingService private _keybindingService: IKeybindingService, @IConfigurationService configurationService: IConfigurationService ) { - super({ clickBehavior: treedefaults.ClickBehavior.ON_MOUSE_DOWN, keyboardSupport: false }, configurationService); + super({}, configurationService); } protected onLeftClick(tree: tree.ITree, element: any, event: mouse.IMouseEvent): boolean { diff --git a/src/vs/workbench/parts/markers/common/messages.ts b/src/vs/workbench/parts/markers/common/messages.ts index bd2ce9fc63b..1440aa6eed0 100644 --- a/src/vs/workbench/parts/markers/common/messages.ts +++ b/src/vs/workbench/parts/markers/common/messages.ts @@ -40,7 +40,7 @@ export default class Messages { public static readonly MARKERS_PANEL_AT_LINE_COL_NUMBER = (ln: number, col: number): string => { return nls.localize('markers.panel.at.ln.col.number', "({0}, {1})", '' + ln, '' + col); }; - public static readonly MARKERS_TREE_ARIA_LABEL_RESOURCE = (fileName, noOfProblems): string => { return nls.localize('problems.tree.aria.label.resource', "{0} with {1} problems", fileName, noOfProblems); }; + public static readonly MARKERS_TREE_ARIA_LABEL_RESOURCE = (fileName: string, noOfProblems: number): string => { return nls.localize('problems.tree.aria.label.resource', "{0} with {1} problems", fileName, noOfProblems); }; public static readonly MARKERS_TREE_ARIA_LABEL_MARKER = (marker: IMarker): string => { switch (marker.severity) { case Severity.Error: diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index ed19a1dd716..2b642f95a58 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -44,26 +44,25 @@ import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; const OUTPUT_ACTIVE_CHANNEL_KEY = 'output.activechannel'; let watchingOutputDir = false; -let callbacks = []; +let callbacks: ((eventType: string, fileName: string) => void)[] = []; function watchOutputDirectory(outputDir: string, logService: ILogService, onChange: (eventType: string, fileName: string) => void): IDisposable { callbacks.push(onChange); if (!watchingOutputDir) { - try { - const watcher = extfs.watch(outputDir, (eventType, fileName) => { - for (const callback of callbacks) { - callback(eventType, fileName); - } - }); - watcher.on('error', (code: number, signal: string) => logService.error(`Error watching ${outputDir}: (${code}, ${signal})`)); - watchingOutputDir = true; - return toDisposable(() => { - callbacks = []; + const watcher = extfs.watch(outputDir, (eventType, fileName) => { + for (const callback of callbacks) { + callback(eventType, fileName); + } + }, (error: string) => { + logService.error(error); + }); + watchingOutputDir = true; + return toDisposable(() => { + callbacks = []; + if (watcher) { watcher.removeAllListeners(); watcher.close(); - }); - } catch (error) { - logService.error(`Error watching ${outputDir}: (${error.toString()})`); - } + } + }); } return toDisposable(() => { }); } @@ -530,7 +529,7 @@ export class OutputService extends Disposable implements IOutputService, ITextMo } private createChannel(id: string): OutputChannel { - const channelDisposables = []; + const channelDisposables: IDisposable[] = []; const channel = this.instantiateChannel(id); channel.onDidAppendedContent(() => { if (!channel.scrollLock) { @@ -631,7 +630,7 @@ export class LogContentProvider { const id = resource.path; let channel = this.channels.get(id); if (!channel) { - const channelDisposables = []; + const channelDisposables: IDisposable[] = []; channel = this.instantiationService.createInstance(FileOutputChannel, { id, label: '', file: resource.with({ scheme: Schemas.file }) }, resource); channel.onDispose(() => dispose(channelDisposables), channelDisposables); this.channels.set(id, channel); diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index 930c3457765..68b0c733cce 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -333,7 +333,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor this.keybindingsListContainer = DOM.append(parent, $('.keybindings-list-container')); this.keybindingsList = this._register(this.instantiationService.createInstance(WorkbenchList, this.keybindingsListContainer, new Delegate(), [new KeybindingHeaderRenderer(), new KeybindingItemRenderer(this, this.keybindingsService)], - { identityProvider: e => e.id, mouseSupport: true, ariaLabel: localize('keybindingsLabel', "Keybindings") })); + { identityProvider: e => e.id, mouseSupport: true, ariaLabel: localize('keybindingsLabel', "Keybindings") })) as WorkbenchList; this._register(this.keybindingsList.onContextMenu(e => this.onContextMenu(e))); this._register(this.keybindingsList.onFocusChange(e => this.onFocusChange(e))); this._register(this.keybindingsList.onDidFocus(() => { diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index 73bdf48cc59..49d0798d3bf 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -61,6 +61,7 @@ import { IHashService } from 'vs/workbench/services/hash/common/hashService'; import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; import { IStringDictionary } from 'vs/base/common/collections'; import { IProgressService } from 'vs/platform/progress/common/progress'; +import { ILogService } from 'vs/platform/log/common/log'; export class PreferencesEditorInput extends SideBySideEditorInput { public static ID: string = 'workbench.editorinputs.preferencesEditorInput'; @@ -402,7 +403,8 @@ class PreferencesRenderersController extends Disposable { @IPreferencesSearchService private preferencesSearchService: IPreferencesSearchService, @ITelemetryService private telemetryService: ITelemetryService, @IPreferencesService private preferencesService: IPreferencesService, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService + @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, + @ILogService private logService: ILogService ) { super(); } @@ -501,7 +503,11 @@ class PreferencesRenderersController extends Disposable { filterPs.push(this.searchAllSettingsTargets(query, searchProvider, groupId, groupLabel, groupOrder)); return TPromise.join(filterPs).then(results => { - const [editableFilterResult, defaultFilterResult] = results; + let [editableFilterResult, defaultFilterResult] = results; + + if (!defaultFilterResult && editableContentOnly) { + defaultFilterResult = this.lastFilterResult; + } this.consolidateAndUpdate(defaultFilterResult, editableFilterResult); if (defaultFilterResult) { @@ -617,9 +623,10 @@ class PreferencesRenderersController extends Disposable { } */ const message = getErrorMessage(err).trim(); - if (message) { - // Empty message = any generic network error + if (message && message !== 'Error') { + // "Error" = any generic network error this.telemetryService.publicLog('defaultSettings.searchError', { message, filter }); + this.logService.info('Setting search error: ' + message); } return null; } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index 85cb33132aa..805bbbd8eba 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -18,7 +18,7 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { Range, IRange } from 'vs/editor/common/core/range'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope, IConfigurationPropertySchema } from 'vs/platform/configuration/common/configurationRegistry'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IPreferencesService, ISettingsGroup, ISetting, IPreferencesEditorModel, IFilterResult, ISettingsEditorModel, IScoredResults, IWorkbenchSettingsConfiguration, IExtensionSetting } from 'vs/workbench/parts/preferences/common/preferences'; +import { IPreferencesService, ISettingsGroup, ISetting, IPreferencesEditorModel, IFilterResult, ISettingsEditorModel, IWorkbenchSettingsConfiguration, IExtensionSetting, IScoredResults } from 'vs/workbench/parts/preferences/common/preferences'; import { SettingsEditorModel, DefaultSettingsEditorModel, WorkspaceConfigurationEditorModel } from 'vs/workbench/parts/preferences/common/preferencesModels'; import { ICodeEditor, IEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { IContextMenuService, ContextSubMenu } from 'vs/platform/contextview/browser/contextView'; @@ -26,8 +26,7 @@ import { SettingsGroupTitleWidget, EditPreferenceWidget, SettingsHeaderWidget, D import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { RangeHighlightDecorations } from 'vs/workbench/browser/parts/editor/rangeDecorations'; import { IMarkerService, IMarkerData } from 'vs/platform/markers/common/markers'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { Severity, IMessageService } from 'vs/platform/message/common/message'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { ModelDecorationOptions } from 'vs/editor/common/model/textModel'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; @@ -38,6 +37,10 @@ import { ITextModel, IModelDeltaDecoration, TrackedRangeStickiness } from 'vs/ed import { CodeLensProviderRegistry, CodeLensProvider, ICodeLensSymbol } from 'vs/editor/common/modes'; import { CancellationToken } from 'vs/base/common/cancellation'; import { getDomNodePagePosition } from 'vs/base/browser/dom'; +import { IssueType, ISettingsSearchIssueReporterData, ISettingSearchResult } from 'vs/platform/issue/common/issue'; +import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; export interface IPreferencesRenderer extends IDisposable { readonly preferencesModel: IPreferencesEditorModel; @@ -247,6 +250,7 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR private filteredMatchesRenderer: FilteredMatchesRenderer; private hiddenAreasRenderer: HiddenAreasRenderer; private editSettingActionRenderer: EditSettingRenderer; + private issueWidgetRenderer: IssueWidgetRenderer; private feedbackWidgetRenderer: FeedbackWidgetRenderer; private bracesHidingRenderer: BracesHidingRenderer; private extensionCodelensRenderer: ExtensionCodelensRenderer; @@ -263,7 +267,8 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR constructor(protected editor: ICodeEditor, public readonly preferencesModel: DefaultSettingsEditorModel, @IPreferencesService protected preferencesService: IPreferencesService, - @IInstantiationService protected instantiationService: IInstantiationService + @IInstantiationService protected instantiationService: IInstantiationService, + @IConfigurationService private configurationService: IConfigurationService ) { super(); this.settingHighlighter = this._register(instantiationService.createInstance(SettingHighlighter, editor, this._onFocusPreference, this._onClearFocusPreference)); @@ -271,6 +276,7 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR this.settingsGroupTitleRenderer = this._register(instantiationService.createInstance(SettingsGroupTitleRenderer, editor)); this.filteredMatchesRenderer = this._register(instantiationService.createInstance(FilteredMatchesRenderer, editor)); this.editSettingActionRenderer = this._register(instantiationService.createInstance(EditSettingRenderer, editor, preferencesModel, this.settingHighlighter)); + this.issueWidgetRenderer = this._register(instantiationService.createInstance(IssueWidgetRenderer, editor)); this.feedbackWidgetRenderer = this._register(instantiationService.createInstance(FeedbackWidgetRenderer, editor)); this.bracesHidingRenderer = this._register(instantiationService.createInstance(BracesHidingRenderer, editor, preferencesModel)); this.hiddenAreasRenderer = this._register(instantiationService.createInstance(HiddenAreasRenderer, editor, [this.settingsGroupTitleRenderer, this.filteredMatchesRenderer, this.bracesHidingRenderer])); @@ -293,6 +299,7 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR public render() { this.settingsGroupTitleRenderer.render(this.preferencesModel.settingsGroups); this.editSettingActionRenderer.render(this.preferencesModel.settingsGroups, this._associatedPreferencesModel); + this.issueWidgetRenderer.render(null); this.feedbackWidgetRenderer.render(null); this.settingHighlighter.clear(true); this.bracesHidingRenderer.render(null, this.preferencesModel.settingsGroups); @@ -306,7 +313,7 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR if (filterResult) { this.filteredMatchesRenderer.render(filterResult, this.preferencesModel.settingsGroups); this.settingsGroupTitleRenderer.render(null); - this.feedbackWidgetRenderer.render(filterResult); + this.renderIssueWidget(filterResult); this.settingsHeaderRenderer.render(filterResult); this.settingHighlighter.clear(true); this.bracesHidingRenderer.render(filterResult, this.preferencesModel.settingsGroups); @@ -315,7 +322,7 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR } else { this.settingHighlighter.clear(true); this.filteredMatchesRenderer.render(null, this.preferencesModel.settingsGroups); - this.feedbackWidgetRenderer.render(null); + this.renderIssueWidget(null); this.settingsHeaderRenderer.render(null); this.settingsGroupTitleRenderer.render(this.preferencesModel.settingsGroups); this.settingsGroupTitleRenderer.showGroup(0); @@ -327,6 +334,17 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR this.hiddenAreasRenderer.render(); } + private renderIssueWidget(filterResult: IFilterResult): void { + const workbenchSettings = this.configurationService.getValue().workbench.settings; + if (workbenchSettings.enableNaturalLanguageSearchFeedback) { + this.issueWidgetRenderer.render(null); + this.feedbackWidgetRenderer.render(filterResult); + } else { + this.feedbackWidgetRenderer.render(null); + this.issueWidgetRenderer.render(filterResult); + } + } + public focusPreference(s: ISetting): void { const setting = this.getSetting(s); if (setting) { @@ -594,9 +612,8 @@ export class FeedbackWidgetRenderer extends Disposable { } public render(result: IFilterResult): void { - const workbenchSettings = this.configurationService.getValue().workbench.settings; this._currentResult = result; - if (result && result.metadata && workbenchSettings.enableNaturalLanguageSearchFeedback) { + if (result && result.metadata) { this.showWidget(); } else if (this._feedbackWidget) { this.disposeWidget(); @@ -762,7 +779,88 @@ export class FeedbackWidgetRenderer extends Disposable { public dispose() { this.disposeWidget(); + super.dispose(); + } +} +export class IssueWidgetRenderer extends Disposable { + private _issueWidget: FloatingClickWidget; + private _currentResult: IFilterResult; + + constructor(private editor: ICodeEditor, + @IInstantiationService private instantiationService: IInstantiationService, + @IWorkbenchIssueService private issueService: IWorkbenchIssueService, + @IEnvironmentService private environmentService: IEnvironmentService + ) { + super(); + } + + public render(result: IFilterResult): void { + this._currentResult = result; + if (result && result.metadata && this.environmentService.appQuality !== 'stable') { + this.showWidget(); + } else if (this._issueWidget) { + this.disposeWidget(); + } + } + + private showWidget(): void { + if (!this._issueWidget) { + this._issueWidget = this._register(this.instantiationService.createInstance(FloatingClickWidget, this.editor, nls.localize('reportSettingsSearchIssue', "Report Issue"), null)); + this._register(this._issueWidget.onClick(() => this.showIssueReporter())); + this._issueWidget.render(); + } + } + + private showIssueReporter(): TPromise { + const nlpMetadata = this._currentResult.metadata['nlpResult']; + const results = nlpMetadata.scoredResults; + + const enabledExtensions = nlpMetadata.extensions; + const issueResults = Object.keys(results) + .map(key => ({ + key: key.split('##')[1], + extensionId: results[key].packageId === 'core' ? + 'core' : + this.getExtensionIdByGuid(enabledExtensions, results[key].packageId), + score: results[key].score + })) + .slice(0, 20); + + const issueReporterData: Partial = { + enabledExtensions, + issueType: IssueType.SettingsSearchIssue, + actualSearchResults: issueResults, + filterResultCount: this.getFilterResultCount(), + query: this._currentResult.query + }; + + return this.issueService.openReporter(issueReporterData); + } + + private getFilterResultCount(): number { + const filterResultGroup = arrays.first(this._currentResult.filteredGroups, group => group.id === 'filterResult'); + return filterResultGroup ? + filterResultGroup.sections[0].settings.length : + 0; + } + + private getExtensionIdByGuid(extensions: ILocalExtension[], guid: string): string { + const match = arrays.first(extensions, ext => ext.identifier.uuid === guid); + + // identifier.id includes the version, not needed here + return match && `${match.manifest.publisher}.${match.manifest.name}`; + } + + private disposeWidget(): void { + if (this._issueWidget) { + this._issueWidget.dispose(); + this._issueWidget = null; + } + } + + public dispose() { + this.disposeWidget(); super.dispose(); } } diff --git a/src/vs/workbench/parts/preferences/common/preferences.ts b/src/vs/workbench/parts/preferences/common/preferences.ts index 54ee6366022..ece19a824cb 100644 --- a/src/vs/workbench/parts/preferences/common/preferences.ts +++ b/src/vs/workbench/parts/preferences/common/preferences.ts @@ -17,6 +17,7 @@ import { join } from 'vs/base/common/paths'; import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; import Event from 'vs/base/common/event'; import { IStringDictionary } from 'vs/base/common/collections'; +import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; export interface IWorkbenchSettingsConfiguration { workbench: { @@ -110,6 +111,9 @@ export interface IFilterMetadata { timestamp: number; duration: number; scoredResults: IScoredResults; + extensions?: ILocalExtension[]; + + /** The number of requests made, since requests are split by number of filters */ requestCount?: number; /** The name of the server that actually served the request */ diff --git a/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts b/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts index 95dfdc1d9b6..17246c5d28c 100644 --- a/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts +++ b/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts @@ -42,8 +42,11 @@ export class PreferencesSearchService extends Disposable implements IPreferences // This request goes to the shared process but results won't change during a window's lifetime, so cache the results. this._installedExtensions = this.extensionManagementService.getInstalled(LocalExtensionType.User).then(exts => { - // Filter to enabled extensions - return exts.filter(ext => this.extensionEnablementService.isEnabled(ext.identifier)); + // Filter to enabled extensions that have settings + return exts + .filter(ext => this.extensionEnablementService.isEnabled(ext.identifier)) + .filter(ext => ext.manifest.contributes && ext.manifest.contributes.configuration) + .filter(ext => !!ext.identifier.uuid); }); } @@ -86,10 +89,13 @@ export class PreferencesSearchService extends Disposable implements IPreferences } export class LocalSearchProvider implements ISearchProvider { - private _filter: string; - - constructor(filter: string) { - this._filter = filter; + constructor(private _filter: string) { + // Remove " and : which are likely to be copypasted as part of a setting name. + // Leave other special characters which the user might want to search for. + this._filter = this._filter + .replace(/[":]/g, ' ') + .replace(/ /g, ' ') + .trim(); } searchModel(preferencesModel: ISettingsEditorModel): TPromise { @@ -132,6 +138,7 @@ interface IBingRequestDetails { url: string; body?: string; hasMoreFilters?: boolean; + extensions?: ILocalExtension[]; } class RemoteSearchProvider implements ISearchProvider { @@ -280,7 +287,8 @@ class RemoteSearchProvider implements ISearchProvider { duration, timestamp, scoredResults, - context: result['@odata.context'] + context: result['@odata.context'], + extensions: details.extensions }; }); } @@ -315,9 +323,10 @@ class RemoteSearchProvider implements ISearchProvider { url += `${API_VERSION}&${QUERY_TYPE}`; } + const extensions = await this.installedExtensions; const filters = this.options.newExtensionsOnly ? [`diminish eq 'latest'`] : - await this.getVersionFilters(this.environmentService.settingsSearchBuildId); + this.getVersionFilters(extensions, this.environmentService.settingsSearchBuildId); const filterStr = filters .slice(filterPage * RemoteSearchProvider.MAX_REQUEST_FILTERS, (filterPage + 1) * RemoteSearchProvider.MAX_REQUEST_FILTERS) @@ -333,23 +342,22 @@ class RemoteSearchProvider implements ISearchProvider { return { url, body, - hasMoreFilters + hasMoreFilters, + extensions }; } - private getVersionFilters(buildNumber?: number): TPromise { - return this.installedExtensions.then(exts => { - // Only search extensions that contribute settings - const filters = exts - .filter(ext => ext.manifest.contributes && ext.manifest.contributes.configuration) - .map(ext => this.getExtensionFilter(ext)); + private getVersionFilters(exts: ILocalExtension[], buildNumber?: number): string[] { + // Only search extensions that contribute settings + const filters = exts + .filter(ext => ext.manifest.contributes && ext.manifest.contributes.configuration) + .map(ext => this.getExtensionFilter(ext)); - if (buildNumber) { - filters.push(`(packageid eq 'core' and startbuildno le '${buildNumber}' and endbuildno ge '${buildNumber}')`); - } + if (buildNumber) { + filters.push(`(packageid eq 'core' and startbuildno le '${buildNumber}' and endbuildno ge '${buildNumber}')`); + } - return filters; - }); + return filters; } private getExtensionFilter(ext: ILocalExtension): string { diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index c276b8019b9..bd82579039d 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -53,6 +53,7 @@ import { IMarginData } from 'vs/editor/browser/controller/mouseTarget'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; import { ISplice } from 'vs/base/common/sequence'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; +import { createStyleSheet } from '../../../../base/browser/dom'; // TODO@Joao // Need to subclass MenuItemActionItem in order to respect @@ -433,6 +434,76 @@ export class ShowNextChangeAction extends EditorAction { } registerEditorAction(ShowNextChangeAction); +export class MoveToPreviousChangeAction extends EditorAction { + + constructor() { + super({ + id: 'workbench.action.editor.previousChange', + label: nls.localize('move to previous change', "Move to Previous Change"), + alias: 'Move to Previous Change', + precondition: null, + kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F5 } + }); + } + + run(accessor: ServicesAccessor, editor: ICodeEditor): void { + const outerEditor = getOuterEditorFromDiffEditor(accessor); + + if (!outerEditor) { + return; + } + + const controller = DirtyDiffController.get(outerEditor); + + if (!controller || !controller.modelRegistry) { + return; + } + + const lineNumber = outerEditor.getPosition().lineNumber; + const model = controller.modelRegistry.getModel(outerEditor.getModel()); + const index = model.findPreviousClosestChange(lineNumber, false); + const change = model.changes[index]; + + outerEditor.setPosition(new Position(change.modifiedStartLineNumber, 1)); + } +} +registerEditorAction(MoveToPreviousChangeAction); + +export class MoveToNextChangeAction extends EditorAction { + + constructor() { + super({ + id: 'workbench.action.editor.nextChange', + label: nls.localize('move to next change', "Move to Next Change"), + alias: 'Move to Next Change', + precondition: null, + kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.Alt | KeyCode.F5 } + }); + } + + run(accessor: ServicesAccessor, editor: ICodeEditor): void { + const outerEditor = getOuterEditorFromDiffEditor(accessor); + + if (!outerEditor) { + return; + } + + const controller = DirtyDiffController.get(outerEditor); + + if (!controller || !controller.modelRegistry) { + return; + } + + const lineNumber = outerEditor.getPosition().lineNumber; + const model = controller.modelRegistry.getModel(outerEditor.getModel()); + const index = model.findNextClosestChange(lineNumber, false); + const change = model.changes[index]; + + outerEditor.setPosition(new Position(change.modifiedStartLineNumber, 1)); + } +} +registerEditorAction(MoveToNextChangeAction); + KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'closeDirtyDiff', weight: KeybindingsRegistry.WEIGHT.editorContrib(50), @@ -504,7 +575,7 @@ export class DirtyDiffController implements IEditorContribution { } if (typeof lineNumber === 'number' || this.currentIndex === -1) { - this.currentIndex = this.findNextClosestChange(typeof lineNumber === 'number' ? lineNumber : this.editor.getPosition().lineNumber); + this.currentIndex = this.model.findNextClosestChange(typeof lineNumber === 'number' ? lineNumber : this.editor.getPosition().lineNumber); } else { this.currentIndex = rot(this.currentIndex + 1, this.model.changes.length); } @@ -518,7 +589,7 @@ export class DirtyDiffController implements IEditorContribution { } if (typeof lineNumber === 'number' || this.currentIndex === -1) { - this.currentIndex = this.findPreviousClosestChange(typeof lineNumber === 'number' ? lineNumber : this.editor.getPosition().lineNumber); + this.currentIndex = this.model.findPreviousClosestChange(typeof lineNumber === 'number' ? lineNumber : this.editor.getPosition().lineNumber); } else { this.currentIndex = rot(this.currentIndex - 1, this.model.changes.length); } @@ -678,30 +749,6 @@ export class DirtyDiffController implements IEditorContribution { } } - private findNextClosestChange(lineNumber: number): number { - for (let i = 0; i < this.model.changes.length; i++) { - const change = this.model.changes[i]; - - if (lineIntersectsChange(lineNumber, change)) { - return i; - } - } - - return 0; - } - - private findPreviousClosestChange(lineNumber: number): number { - for (let i = this.model.changes.length - 1; i >= 0; i--) { - const change = this.model.changes[i]; - - if (change.modifiedStartLineNumber <= lineNumber) { - return i; - } - } - - return 0; - } - dispose(): void { return; } @@ -981,6 +1028,42 @@ export class DirtyDiffModel { return null; } + findNextClosestChange(lineNumber: number, inclusive = true): number { + for (let i = 0; i < this.changes.length; i++) { + const change = this.changes[i]; + + if (inclusive) { + if (getModifiedEndLineNumber(change) >= lineNumber) { + return i; + } + } else { + if (change.modifiedStartLineNumber > lineNumber) { + return i; + } + } + } + + return 0; + } + + findPreviousClosestChange(lineNumber: number, inclusive = true): number { + for (let i = this.changes.length - 1; i >= 0; i--) { + const change = this.changes[i]; + + if (inclusive) { + if (change.modifiedStartLineNumber <= lineNumber) { + return i; + } + } else { + if (getModifiedEndLineNumber(change) < lineNumber) { + return i; + } + } + } + + return this.changes.length - 1; + } + dispose(): void { this.disposables = dispose(this.disposables); @@ -1013,6 +1096,7 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, private models: ITextModel[] = []; private items: { [modelId: string]: DirtyDiffItem; } = Object.create(null); private transientDisposables: IDisposable[] = []; + private stylesheet: HTMLStyleElement; private disposables: IDisposable[] = []; constructor( @@ -1021,9 +1105,16 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, @IInstantiationService private instantiationService: IInstantiationService, @IConfigurationService private configurationService: IConfigurationService ) { + this.stylesheet = createStyleSheet(); + this.disposables.push(toDisposable(() => this.stylesheet.parentElement.removeChild(this.stylesheet))); + const onDidChangeConfiguration = filterEvent(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.diffDecorations')); onDidChangeConfiguration(this.onDidChangeConfiguration, this, this.disposables); this.onDidChangeConfiguration(); + + const onDidChangeDiffWidthConfiguration = filterEvent(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.diffDecorationsGutterWidth')); + onDidChangeDiffWidthConfiguration(this.onDidChangeDiffWidthConfiguration, this); + this.onDidChangeDiffWidthConfiguration(); } private onDidChangeConfiguration(): void { @@ -1036,6 +1127,16 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, } } + private onDidChangeDiffWidthConfiguration(): void { + let width = this.configurationService.getValue('scm.diffDecorationsGutterWidth'); + + if (isNaN(width) || width <= 0 || width > 5) { + width = 3; + } + + this.stylesheet.innerHTML = `.monaco-editor .dirty-diff-modified,.monaco-editor .dirty-diff-added{border-left-width:${width}px;}`; + } + private enable(): void { if (this.enabled) { this.disable(); 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 b451d5f00d4..ffbfd4d29d3 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -79,6 +79,12 @@ Registry.as(ConfigurationExtensions.Configuration).regis enum: ['all', 'gutter', 'overview', 'none'], default: 'all', description: localize('diffDecorations', "Controls diff decorations in the editor.") + }, + 'scm.diffDecorationsGutterWidth': { + type: 'number', + enum: [1, 2, 3, 4, 5], + default: 3, + description: localize('diffGutterWidth', "Controls the width(px) of diff decorations in gutter (added & modified).") } } }); \ No newline at end of file diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index 6b3199a8177..2ebc0f2cf79 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -37,7 +37,7 @@ import { fillInActions, ContextAwareMenuItemActionItem } from 'vs/platform/actio import { SCMMenus } from './scmMenus'; import { ActionBar, IActionItemProvider, Separator, ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { IThemeService, LIGHT } from 'vs/platform/theme/common/themeService'; -import { isSCMResource } from './scmUtil'; +import { isSCMResource, getSCMResourceContextKey } from './scmUtil'; import { attachBadgeStyler, attachInputBoxStyler } from 'vs/platform/theme/common/styler'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; @@ -167,7 +167,7 @@ class ProviderRenderer implements IRenderer dispose(actions); disposables.push({ dispose: disposeActions }); @@ -212,9 +212,10 @@ class MainPanel extends ViewletPanel { @ISCMService protected scmService: ISCMService, @IInstantiationService private instantiationService: IInstantiationService, @IContextKeyService private contextKeyService: IContextKeyService, - @IMenuService private menuService: IMenuService + @IMenuService private menuService: IMenuService, + @IConfigurationService configurationService: IConfigurationService ) { - super(localize('scm providers', "Source Control Providers"), {}, keybindingService, contextMenuService); + super(localize('scm providers', "Source Control Providers"), {}, keybindingService, contextMenuService, configurationService); this.updateBodySize(); } @@ -245,7 +246,7 @@ class MainPanel extends ViewletPanel { this.list = this.instantiationService.createInstance(WorkbenchList, container, delegate, [renderer], { identityProvider: repository => repository.provider.id - }); + }) as WorkbenchList; this.disposables.push(this.list); this.list.onSelectionChange(this.onListSelectionChange, this, this.disposables); @@ -350,6 +351,7 @@ class MainPanel extends ViewletPanel { } this.list.setSelection(selection); + this.list.setFocus([selection[0]]); } } @@ -367,9 +369,11 @@ class ResourceGroupRenderer implements IRenderer { + const primary: IAction[] = []; + const secondary: IAction[] = []; + const result = { primary, secondary }; + fillInActions(menu, { shouldForwardArgs: true }, result, this.contextMenuService, g => /^inline/.test(g)); + + template.actionBar.clear(); + template.actionBar.push(primary, { icon: true, label: false }); + }; + + menu.onDidChange(updateActions, null, disposables); + updateActions(); const updateCount = () => template.count.setCount(group.elements.length); - template.elementDisposable = group.onDidSplice(updateCount); + group.onDidSplice(updateCount, null, disposables); updateCount(); + + template.elementDisposable = combinedDisposable(disposables); } disposeTemplate(template: ResourceGroupTemplate): void { @@ -446,12 +475,13 @@ class ResourceRenderer implements IRenderer { get templateId(): string { return ResourceRenderer.TEMPLATE_ID; } constructor( - private scmMenus: SCMMenus, private actionItemProvider: IActionItemProvider, private getSelectedResources: () => ISCMResource[], - @IThemeService private themeService: IThemeService, - @IInstantiationService private instantiationService: IInstantiationService, - @IConfigurationService private configurationService: IConfigurationService + private themeService: IThemeService, + private instantiationService: IInstantiationService, + private contextKeyService: IContextKeyService, + private contextMenuService: IContextMenuService, + private menuService: IMenuService ) { } renderTemplate(container: HTMLElement): ResourceTemplate { @@ -483,12 +513,28 @@ class ResourceRenderer implements IRenderer { template.fileLabel.setFile(resource.sourceUri, { fileDecorations: { colors: false, badges: !icon, data: resource.decorations } }); template.actionBar.context = resource; + const disposables: IDisposable[] = []; + + const contextKeyService = this.contextKeyService.createScoped(); + disposables.push(contextKeyService); + + contextKeyService.createKey('scmProvider', resource.resourceGroup.provider.contextValue); + contextKeyService.createKey('scmResourceGroup', getSCMResourceContextKey(resource.resourceGroup)); + + const menu = this.menuService.createMenu(MenuId.SCMResourceContext, contextKeyService); + disposables.push(menu); + const updateActions = () => { + const primary: IAction[] = []; + const secondary: IAction[] = []; + const result = { primary, secondary }; + fillInActions(menu, { shouldForwardArgs: true }, result, this.contextMenuService, g => /^inline/.test(g)); + template.actionBar.clear(); - template.actionBar.push(this.scmMenus.getResourceActions(resource), { icon: true, label: false }); + template.actionBar.push(primary, { icon: true, label: false }); }; - template.elementDisposable = this.configurationService.onDidChangeConfiguration(updateActions); + menu.onDidChange(updateActions, null, disposables); updateActions(); toggleClass(template.name, 'strike-through', resource.decorations.strikeThrough); @@ -504,6 +550,7 @@ class ResourceRenderer implements IRenderer { } template.element.setAttribute('data-tooltip', resource.decorations.tooltip); + template.elementDisposable = combinedDisposable(disposables); } disposeTemplate(template: ResourceTemplate): void { @@ -687,6 +734,10 @@ export class RepositoryPanel extends ViewletPanel { private menus: SCMMenus; private visibilityDisposables: IDisposable[] = []; + get onDidChangeTitle(): Event { + return this.menus.onDidChangeTitle; + } + constructor( readonly repository: ISCMRepository, private viewModel: IViewModel, @@ -699,9 +750,11 @@ export class RepositoryPanel extends ViewletPanel { @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, @IEditorGroupService protected editorGroupService: IEditorGroupService, @IInstantiationService protected instantiationService: IInstantiationService, - @IConfigurationService protected configurationService: IConfigurationService + @IConfigurationService protected configurationService: IConfigurationService, + @IContextKeyService protected contextKeyService: IContextKeyService, + @IMenuService protected menuService: IMenuService ) { - super(repository.provider.label, {}, keybindingService, contextMenuService); + super(repository.provider.label, {}, keybindingService, contextMenuService, configurationService); this.menus = instantiationService.createInstance(SCMMenus, repository.provider); } @@ -811,13 +864,13 @@ export class RepositoryPanel extends ViewletPanel { const actionItemProvider = (action: IAction) => this.getActionItem(action); const renderers = [ - new ResourceGroupRenderer(this.menus, actionItemProvider, this.themeService), - this.instantiationService.createInstance(ResourceRenderer, this.menus, actionItemProvider, () => this.getSelectedResources()), + new ResourceGroupRenderer(actionItemProvider, this.themeService, this.contextKeyService, this.contextMenuService, this.menuService), + new ResourceRenderer(actionItemProvider, () => this.getSelectedResources(), this.themeService, this.instantiationService, this.contextKeyService, this.contextMenuService, this.menuService) ]; this.list = this.instantiationService.createInstance(WorkbenchList, this.listContainer, delegate, renderers, { identityProvider: scmResourceIdentityProvider - }); + }) as WorkbenchList; chain(this.list.onOpen) .map(e => e.elements[0]) @@ -978,6 +1031,7 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { private mainPanelDisposable: IDisposable = EmptyDisposable; private _repositories: ISCMRepository[] = []; private repositoryPanels: RepositoryPanel[] = []; + private singleRepositoryPanelTitleActionsDisposable: IDisposable = EmptyDisposable; private disposables: IDisposable[] = []; private _onDidSplice = new Emitter>(); @@ -1162,6 +1216,8 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { } private onSelectionChange(repositories: ISCMRepository[]): void { + const wasSingleView = this.isSingleView(); + // Collect unselected panels const panelsToRemove = this.repositoryPanels .filter(p => repositories.every(r => p.repository !== r)); @@ -1195,10 +1251,20 @@ export class SCMViewlet extends PanelViewlet implements IViewModel { const height = typeof this.height === 'number' ? this.height : 1000; const mainPanelHeight = this.getPanelSize(this.mainPanel); const size = (height - mainPanelHeight) / repositories.length; - for (const panel of this.repositoryPanels) { this.resizePanel(panel, size); } + + // React to menu changes for single view mode + if (wasSingleView !== this.isSingleView()) { + this.singleRepositoryPanelTitleActionsDisposable.dispose(); + + if (this.isSingleView()) { + this.singleRepositoryPanelTitleActionsDisposable = this.repositoryPanels[0].onDidChangeTitle(this.updateTitleArea, this); + } + + this.updateTitleArea(); + } } protected isSingleView(): boolean { diff --git a/src/vs/workbench/parts/search/browser/openFileHandler.ts b/src/vs/workbench/parts/search/browser/openFileHandler.ts index 04e8cad5150..4fd687bbdba 100644 --- a/src/vs/workbench/parts/search/browser/openFileHandler.ts +++ b/src/vs/workbench/parts/search/browser/openFileHandler.ts @@ -13,7 +13,7 @@ import * as objects from 'vs/base/common/objects'; import { defaultGenerator } from 'vs/base/common/idGenerator'; import URI from 'vs/base/common/uri'; import * as resources from 'vs/base/common/resources'; -import { IIconLabelOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; +import { IIconLabelValueOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; import { IModeService } from 'vs/editor/common/services/modeService'; import { getIconClasses } from 'vs/workbench/browser/labels'; import { IModelService } from 'vs/editor/common/services/modelService'; @@ -62,7 +62,7 @@ export class FileEntry extends EditorQuickOpenEntry { return this.name; } - public getLabelOptions(): IIconLabelOptions { + public getLabelOptions(): IIconLabelValueOptions { return { extraClasses: getIconClasses(this.modelService, this.modeService, this.resource) }; diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 0a844d5bfe3..2bdf4b6c125 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -55,10 +55,10 @@ import { IThemeService, ITheme, ICssStyleCollector, registerThemingParticipant } import { editorFindMatchHighlight, diffInserted, diffRemoved, diffInsertedOutline, diffRemovedOutline, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { getOutOfWorkspaceEditorResources } from 'vs/workbench/parts/search/common/search'; import { PreferencesEditor } from 'vs/workbench/parts/preferences/browser/preferencesEditor'; -import { SimpleFileResourceDragAndDrop } from 'vs/base/parts/tree/browser/treeDnd'; import { isDiffEditor, isCodeEditor, ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { TreeResourceNavigator, WorkbenchTree } from 'vs/platform/list/browser/listService'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; +import { SimpleFileResourceDragAndDrop } from 'vs/workbench/browser/dnd'; export class SearchViewlet extends Viewlet { @@ -494,7 +494,7 @@ export class SearchViewlet extends Viewlet { let renderer = this.instantiationService.createInstance(SearchRenderer, this.getActionRunner(), this); this.toUnbind.push(renderer); - let dnd = new SimpleFileResourceDragAndDrop(obj => obj instanceof FileMatch ? obj.resource() : void 0); + let dnd = this.instantiationService.createInstance(SimpleFileResourceDragAndDrop, (obj: any) => obj instanceof FileMatch ? obj.resource() : void 0); this.tree = this.instantiationService.createInstance(WorkbenchTree, div.getHTMLElement(), { dataSource: dataSource, @@ -525,16 +525,24 @@ export class SearchViewlet extends Viewlet { } })); + let treeHasFocus = false; + this.tree.onDidFocus(() => { + treeHasFocus = true; + }); + this.toUnbind.push(this.tree.onDidChangeFocus((e: IFocusEvent) => { - const focus = e.focus; - this.firstMatchFocused.set(this.tree.getNavigator().first() === focus); - this.fileMatchOrMatchFocused.set(true); - this.fileMatchFocused.set(focus instanceof FileMatch); - this.folderMatchFocused.set(focus instanceof FolderMatch); - this.matchFocused.set(focus instanceof Match); + if (treeHasFocus) { + const focus = e.focus; + this.firstMatchFocused.set(this.tree.getNavigator().first() === focus); + this.fileMatchOrMatchFocused.set(true); + this.fileMatchFocused.set(focus instanceof FileMatch); + this.folderMatchFocused.set(focus instanceof FolderMatch); + this.matchFocused.set(focus instanceof Match); + } })); this.toUnbind.push(this.tree.onDidBlur(e => { + treeHasFocus = false; this.firstMatchFocused.reset(); this.fileMatchOrMatchFocused.reset(); this.fileMatchFocused.reset(); @@ -911,7 +919,7 @@ export class SearchViewlet extends Viewlet { } public searchInFolders(resources: URI[], pathToRelative: (from: string, to: string) => string): void { - const folderPaths = []; + const folderPaths: string[] = []; const workspace = this.contextService.getWorkspace(); if (resources) { diff --git a/src/vs/workbench/parts/search/electron-browser/search.contribution.ts b/src/vs/workbench/parts/search/electron-browser/search.contribution.ts index 6bbbe979990..f2c681f8ada 100644 --- a/src/vs/workbench/parts/search/electron-browser/search.contribution.ts +++ b/src/vs/workbench/parts/search/electron-browser/search.contribution.ts @@ -51,6 +51,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { IFileService } from 'vs/platform/files/common/files'; import { distinct } from 'vs/base/common/arrays'; import { getMultiSelectedResources } from 'vs/workbench/parts/files/browser/files'; +import { Schemas } from 'vs/base/common/network'; registerSingleton(ISearchWorkbenchService, SearchWorkbenchService); replaceContributions(); @@ -233,7 +234,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { id: FIND_IN_FOLDER_ID, title: nls.localize('findInFolder', "Find in Folder...") }, - when: ContextKeyExpr.and(ExplorerFolderContext, ResourceContextKey.Scheme.isEqualTo('file')) + when: ContextKeyExpr.and(ExplorerFolderContext, ResourceContextKey.Scheme.isEqualTo(Schemas.file)) // todo@remote }); MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts index 00b48690743..f1695bc6c63 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts @@ -235,11 +235,13 @@ class SnippetsService implements ISnippetsService { this._files.delete(filepath); } }); - }); + }, (error: string) => this._logService.error(error)); this._disposables.push({ dispose: () => { - watcher.removeAllListeners(); - watcher.close(); + if (watcher) { + watcher.removeAllListeners(); + watcher.close(); + } } }); diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index 69dd267dd4d..78bb4ad8a6f 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -5,7 +5,6 @@ 'use strict'; import Event from 'vs/base/common/event'; -import platform = require('vs/base/common/platform'); import { IDisposable } from 'vs/base/common/lifecycle'; import { RawContextKey, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -15,8 +14,6 @@ export const TERMINAL_PANEL_ID = 'workbench.panel.terminal'; export const TERMINAL_SERVICE_ID = 'terminalService'; -export const TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE = platform.isWindows; - /** A context key that is set when the integrated terminal has focus. */ export const KEYBINDING_CONTEXT_TERMINAL_FOCUS = new RawContextKey('terminalFocus', undefined); /** A context key that is set when the integrated terminal does not have focus. */ @@ -63,7 +60,7 @@ export interface ITerminalConfiguration { windows: string[]; }; macOptionIsMeta: boolean; - rightClickCopyPaste: boolean; + rightClickBehavior: 'default' | 'copyPaste' | 'selectWord'; cursorBlinking: boolean; cursorStyle: string; fontFamily: string; @@ -152,7 +149,6 @@ export interface ITerminalService { onActiveInstanceChanged: Event; onInstanceDisposed: Event; onInstanceProcessIdReady: Event; - onInstanceData: Event<{ instance: ITerminalInstance, data: string }>; onInstancesChanged: Event; onInstanceTitleChanged: Event; terminalInstances: ITerminalInstance[]; diff --git a/src/vs/workbench/parts/terminal/common/terminalService.ts b/src/vs/workbench/parts/terminal/common/terminalService.ts index ff96db819ac..c8da8c1253d 100644 --- a/src/vs/workbench/parts/terminal/common/terminalService.ts +++ b/src/vs/workbench/parts/terminal/common/terminalService.ts @@ -22,7 +22,6 @@ export abstract class TerminalService implements ITerminalService { protected _onInstancesChanged: Emitter; protected _onInstanceDisposed: Emitter; protected _onInstanceProcessIdReady: Emitter; - protected _onInstanceData: Emitter<{ instance: ITerminalInstance, data: string }>; protected _onInstanceTitleChanged: Emitter; protected _terminalInstances: ITerminalInstance[]; @@ -33,7 +32,6 @@ export abstract class TerminalService implements ITerminalService { public get onActiveInstanceChanged(): Event { return this._onActiveInstanceChanged.event; } public get onInstanceDisposed(): Event { return this._onInstanceDisposed.event; } public get onInstanceProcessIdReady(): Event { return this._onInstanceProcessIdReady.event; } - public get onInstanceData(): Event<{ instance: ITerminalInstance, data: string }> { return this._onInstanceData.event; } public get onInstanceTitleChanged(): Event { return this._onInstanceTitleChanged.event; } public get onInstancesChanged(): Event { return this._onInstancesChanged.event; } public get terminalInstances(): ITerminalInstance[] { return this._terminalInstances; } @@ -53,7 +51,6 @@ export abstract class TerminalService implements ITerminalService { this._onActiveInstanceChanged = new Emitter(); this._onInstanceDisposed = new Emitter(); this._onInstanceProcessIdReady = new Emitter(); - this._onInstanceData = new Emitter<{ instance: ITerminalInstance, data: string }>(); this._onInstanceTitleChanged = new Emitter(); this._onInstancesChanged = new Emitter(); 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 f7df128dd32..51db98bf363 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 * as terminalCommands from 'vs/workbench/parts/terminal/electron-browser/terminalCommands'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; -import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED, 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 { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, TerminalCursorStyle } from 'vs/workbench/parts/terminal/common/terminal'; import { TERMINAL_DEFAULT_SHELL_UNIX_LIKE, TERMINAL_DEFAULT_SHELL_WINDOWS } from 'vs/workbench/parts/terminal/electron-browser/terminal'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, CreateNewInActiveWorkspaceTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, ShowNextFindTermTerminalFindWidgetAction, ShowPreviousFindTermTerminalFindWidgetAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, QuickOpenActionTermContributor, QuickOpenTermAction, TERMINAL_PICKER_PREFIX } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; +import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, CreateNewInActiveWorkspaceTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, ShowNextFindTermTerminalFindWidgetAction, ShowPreviousFindTermTerminalFindWidgetAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, QuickOpenActionTermContributor, QuickOpenTermAction, TERMINAL_PICKER_PREFIX, MoveToLineStartTerminalAction, MoveToLineEndTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Registry } from 'vs/platform/registry/common/platform'; import { ShowAllCommandsAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; @@ -120,11 +120,6 @@ configurationRegistry.registerConfiguration({ 'type': 'boolean', 'default': false }, - 'terminal.integrated.rightClickCopyPaste': { - 'description': nls.localize('terminal.integrated.rightClickCopyPaste', "When set, this will prevent the context menu from appearing when right clicking within the terminal, instead it will copy when there is a selection and paste when there is no selection."), - 'type': 'boolean', - 'default': TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE - }, 'terminal.integrated.copyOnSelection': { 'description': nls.localize('terminal.integrated.copyOnSelection', "When set, text selected in the terminal will be copied to the clipboard."), 'type': 'boolean', @@ -153,13 +148,13 @@ configurationRegistry.registerConfiguration({ 'terminal.integrated.fontWeight': { 'type': 'string', 'enum': ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'], - 'description': nls.localize('terminal.integrated.fontWeight', "The font weight to use within the termianl for non-bold text."), + 'description': nls.localize('terminal.integrated.fontWeight', "The font weight to use within the terminal for non-bold text."), 'default': 'normal' }, 'terminal.integrated.fontWeightBold': { 'type': 'string', 'enum': ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'], - 'description': nls.localize('terminal.integrated.fontWeightBold', "The font weight to use within the termianl for bold text."), + 'description': nls.localize('terminal.integrated.fontWeightBold', "The font weight to use within the terminal for bold text."), 'default': 'bold' }, 'terminal.integrated.cursorBlinking': { @@ -182,6 +177,12 @@ configurationRegistry.registerConfiguration({ 'type': 'boolean', 'default': platform.isMacintosh }, + 'terminal.integrated.rightClickBehavior': { + 'type': 'string', + 'enum': ['default', 'copyPaste', 'selectWord'], + default: platform.isMacintosh ? 'selectWord' : platform.isWindows ? 'copyPaste' : 'default', + description: nls.localize('terminal.integrated.rightClickBehavior', "Controls how terminal reacts to right click, possibilities are 'default', 'copyPaste', and 'selectWord'. 'default' will show the context menu, 'copyPaste' will copy when there is a selection otherwise paste, 'selectWord' will select the word under the cursor and show the context menu.") + }, 'terminal.integrated.cwd': { 'description': nls.localize('terminal.integrated.cwd', "An explicit start path where the terminal will be launched, this is used as the current working directory (cwd) for the shell process. This may be particularly useful in workspace settings if the root directory is not a convenient cwd."), 'type': 'string', @@ -268,6 +269,8 @@ configurationRegistry.registerConfiguration({ NavigateLeftAction.ID, DeleteWordLeftTerminalAction.ID, DeleteWordRightTerminalAction.ID, + MoveToLineStartTerminalAction.ID, + MoveToLineEndTerminalAction.ID, TogglePanelAction.ID, 'workbench.action.quickOpenView' ].sort() @@ -398,6 +401,14 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DeleteWordRightT primary: KeyMod.CtrlCmd | KeyCode.Delete, mac: { primary: KeyMod.Alt | KeyCode.Delete } }, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Delete Word Right', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(MoveToLineStartTerminalAction, MoveToLineStartTerminalAction.ID, MoveToLineStartTerminalAction.LABEL, { + primary: null, + mac: { primary: KeyMod.CtrlCmd | KeyCode.LeftArrow } +}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Move To Line Start', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(MoveToLineEndTerminalAction, MoveToLineEndTerminalAction.ID, MoveToLineEndTerminalAction.LABEL, { + primary: null, + mac: { primary: KeyMod.CtrlCmd | KeyCode.RightArrow } +}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Move To Line End', category); terminalCommands.setup(); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 8ab6467d691..001c4303a1f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -152,47 +152,78 @@ export class SelectAllTerminalAction extends Action { } } -export class DeleteWordLeftTerminalAction extends Action { - - public static readonly ID = 'workbench.action.terminal.deleteWordLeft'; - public static readonly LABEL = nls.localize('workbench.action.terminal.deleteWordLeft', "Delete Word Left"); - +export abstract class BaseSendTextTerminalAction extends Action { constructor( - id: string, label: string, - @ITerminalService private terminalService: ITerminalService + id: string, + label: string, + private _text: string, + @ITerminalService private _terminalService: ITerminalService ) { super(id, label); } public run(event?: any): TPromise { - let terminalInstance = this.terminalService.getActiveInstance(); + let terminalInstance = this._terminalService.getActiveInstance(); if (terminalInstance) { - // Send ctrl+W - terminalInstance.sendText(String.fromCharCode('W'.charCodeAt(0) - 64), false); + terminalInstance.sendText(this._text, false); } return TPromise.as(void 0); } } -export class DeleteWordRightTerminalAction extends Action { +export class DeleteWordLeftTerminalAction extends BaseSendTextTerminalAction { + public static readonly ID = 'workbench.action.terminal.deleteWordLeft'; + public static readonly LABEL = nls.localize('workbench.action.terminal.deleteWordLeft', "Delete Word Left"); + constructor( + id: string, + label: string, + @ITerminalService terminalService: ITerminalService + ) { + // Send ctrl+W + super(id, label, String.fromCharCode('W'.charCodeAt(0) - 64), terminalService); + } +} + +export class DeleteWordRightTerminalAction extends BaseSendTextTerminalAction { public static readonly ID = 'workbench.action.terminal.deleteWordRight'; public static readonly LABEL = nls.localize('workbench.action.terminal.deleteWordRight', "Delete Word Right"); constructor( - id: string, label: string, - @ITerminalService private terminalService: ITerminalService + id: string, + label: string, + @ITerminalService terminalService: ITerminalService ) { - super(id, label); + // Send alt+D + super(id, label, '\x1bD', terminalService); } +} - public run(event?: any): TPromise { - let terminalInstance = this.terminalService.getActiveInstance(); - if (terminalInstance) { - // Send alt+D - terminalInstance.sendText('\x1bD', false); - } - return TPromise.as(void 0); +export class MoveToLineStartTerminalAction extends BaseSendTextTerminalAction { + public static readonly ID = 'workbench.action.terminal.moveToLineStart'; + public static readonly LABEL = nls.localize('workbench.action.terminal.moveToLineStart', "Move To Line Start"); + + constructor( + id: string, + label: string, + @ITerminalService terminalService: ITerminalService + ) { + // Send ctrl+A + super(id, label, String.fromCharCode('A'.charCodeAt(0) - 64), terminalService); + } +} + +export class MoveToLineEndTerminalAction extends BaseSendTextTerminalAction { + public static readonly ID = 'workbench.action.terminal.moveToLineEnd'; + public static readonly LABEL = nls.localize('workbench.action.terminal.moveToLineEnd', "Move To Line End"); + + constructor( + id: string, + label: string, + @ITerminalService terminalService: ITerminalService + ) { + // Send ctrl+E + super(id, label, String.fromCharCode('E'.charCodeAt(0) - 64), terminalService); } } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 01d3979bd42..63c8088d148 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -78,7 +78,6 @@ export class TerminalInstance implements ITerminalInstance { private _processReady: TPromise; private _isDisposed: boolean; private _onDisposed: Emitter; - private _onDataForApi: Emitter<{ instance: ITerminalInstance, data: string }>; private _onProcessIdReady: Emitter; private _onTitleChanged: Emitter; private _process: cp.ChildProcess; @@ -106,7 +105,6 @@ export class TerminalInstance implements ITerminalInstance { public get id(): number { return this._id; } public get processId(): number { return this._processId; } public get onDisposed(): Event { return this._onDisposed.event; } - public get onDataForApi(): Event<{ instance: ITerminalInstance, data: string }> { return this._onDataForApi.event; } public get onProcessIdReady(): Event { return this._onProcessIdReady.event; } public get onTitleChanged(): Event { return this._onTitleChanged.event; } public get title(): string { return this._title; } @@ -144,7 +142,6 @@ export class TerminalInstance implements ITerminalInstance { this._preLaunchInputQueue = ''; this._onDisposed = new Emitter(); - this._onDataForApi = new Emitter<{ instance: ITerminalInstance, data: string }>(); this._onProcessIdReady = new Emitter(); this._onTitleChanged = new Emitter(); @@ -274,7 +271,7 @@ export class TerminalInstance implements ITerminalInstance { // Localize strings Terminal.strings.blankLine = nls.localize('terminal.integrated.a11yBlankLine', 'Blank line'); Terminal.strings.promptLabel = nls.localize('terminal.integrated.a11yPromptLabel', 'Terminal input'); - Terminal.strings.tooMuchOutput = nls.localize('terminal.integrated.a11yTooMuchOutput', 'Too much output to announce,navigate to rows manually to read'); + Terminal.strings.tooMuchOutput = nls.localize('terminal.integrated.a11yTooMuchOutput', 'Too much output to announce, navigate to rows manually to read'); } const accessibilitySupport = this._configurationService.getValue('editor').accessibilitySupport; const font = this._configHelper.getFont(true); @@ -288,7 +285,8 @@ export class TerminalInstance implements ITerminalInstance { lineHeight: font.lineHeight, bellStyle: this._configHelper.config.enableBell ? 'sound' : 'none', screenReaderMode: accessibilitySupport === 'on', - macOptionIsMeta: this._configHelper.config.macOptionIsMeta + macOptionIsMeta: this._configHelper.config.macOptionIsMeta, + rightClickSelectsWord: this._configHelper.config.rightClickBehavior === 'selectWord' }); if (this._shellLaunchConfig.initialText) { this._xterm.writeln(this._shellLaunchConfig.initialText); @@ -783,6 +781,12 @@ export class TerminalInstance implements ITerminalInstance { private _attachPressAnyKeyToCloseListener() { this._processDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'keydown', (event: KeyboardEvent) => { + switch (event.key) { + case 'Meta': + case 'Shift': + case 'Alt': + case 'Control': return; + } this.dispose(); event.preventDefault(); })); @@ -988,6 +992,7 @@ export class TerminalInstance implements ITerminalInstance { this._setScrollback(this._configHelper.config.scrollback); this._setEnableBell(this._configHelper.config.enableBell); this._setMacOptionIsMeta(this._configHelper.config.macOptionIsMeta); + this._setRightClickSelectsWord(this._configHelper.config.rightClickBehavior === 'selectWord'); } public updateAccessibilitySupport(): void { @@ -1026,6 +1031,12 @@ export class TerminalInstance implements ITerminalInstance { } } + private _setRightClickSelectsWord(value: boolean): void { + if (this._xterm && this._xterm.getOption('rightClickSelectsWord') !== value) { + this._xterm.setOption('rightClickSelectsWord', value); + } + } + private _setEnableBell(isEnabled: boolean): void { if (this._xterm) { if (this._xterm.getOption('bellStyle') === 'sound') { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts index 75905551cd3..bb1bbe0019f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts @@ -91,7 +91,7 @@ export class TerminalLinkHandler { return this._xterm.registerLinkMatcher(regex, this._wrapLinkHandler(handler), { matchIndex, validationCallback: (uri: string, callback: (isValid: boolean) => void) => validationCallback(uri, callback), - tooltipCallback: (e: MouseEvent, u) => this._widgetManager.showMessage(e.offsetX, e.offsetY, this._getLinkHoverString()), + tooltipCallback: (e: MouseEvent) => this._widgetManager.showMessage(e.offsetX, e.offsetY, this._getLinkHoverString()), leaveCallback: () => this._widgetManager.closeMessage(), willLinkActivate: (e: MouseEvent) => this._isLinkActivationModifierDown(e), priority: CUSTOM_LINK_PRIORITY @@ -105,7 +105,7 @@ export class TerminalLinkHandler { return this._xterm.registerLinkMatcher(this._localLinkRegex, wrappedHandler, { validationCallback: (uri: string, callback: (isValid: boolean) => void) => this._validateLocalLink(uri, callback), - tooltipCallback: (e: MouseEvent, u) => this._widgetManager.showMessage(e.offsetX, e.offsetY, this._getLinkHoverString()), + tooltipCallback: (e: MouseEvent) => this._widgetManager.showMessage(e.offsetX, e.offsetY, this._getLinkHoverString()), leaveCallback: () => this._widgetManager.closeMessage(), willLinkActivate: (e: MouseEvent) => this._isLinkActivationModifierDown(e), priority: LOCAL_LINK_PRIORITY diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 797ae1d1a3a..b4958a95fbb 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -207,7 +207,7 @@ export class TerminalPanel extends Panel { // occurs on the selection itself. this._terminalService.getActiveInstance().focus(); } else if (event.which === 3) { - if (this._terminalService.configHelper.config.rightClickCopyPaste) { + if (this._terminalService.configHelper.config.rightClickBehavior === 'copyPaste') { let terminal = this._terminalService.getActiveInstance(); if (terminal.hasSelection()) { terminal.copySelection(); @@ -276,21 +276,22 @@ export class TerminalPanel extends Panel { return; } - // Check if the file was dragged from the tree explorer - let uri = e.dataTransfer.getData(DataTransfers.URL); - if (uri) { - uri = URI.parse(uri).path; + // Check if files were dragged from the tree explorer + let path: string; + let resources = e.dataTransfer.getData(DataTransfers.RESOURCES); + if (resources) { + path = URI.parse(JSON.parse(resources)[0]).path; } else if (e.dataTransfer.files.length > 0) { // Check if the file was dragged from the filesystem - uri = URI.file(e.dataTransfer.files[0].path).fsPath; + path = URI.file(e.dataTransfer.files[0].path).fsPath; } - if (!uri) { + if (!path) { return; } const terminal = this._terminalService.getActiveInstance(); - terminal.sendText(TerminalPanel.preparePathForTerminal(uri), false); + terminal.sendText(TerminalPanel.preparePathForTerminal(path), false); } })); } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts index eb2eb94177d..53d7571edef 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts @@ -53,7 +53,6 @@ export class TerminalService extends AbstractTerminalService implements ITermina shell); terminalInstance.addDisposable(terminalInstance.onTitleChanged(this._onInstanceTitleChanged.fire, this._onInstanceTitleChanged)); terminalInstance.addDisposable(terminalInstance.onDisposed(this._onInstanceDisposed.fire, this._onInstanceDisposed)); - terminalInstance.addDisposable(terminalInstance.onDataForApi(this._onInstanceData.fire, this._onInstanceData)); terminalInstance.addDisposable(terminalInstance.onProcessIdReady(this._onInstanceProcessIdReady.fire, this._onInstanceProcessIdReady)); this.terminalInstances.push(terminalInstance); if (this.terminalInstances.length === 1) { diff --git a/src/vs/workbench/parts/terminal/node/terminalProcess.ts b/src/vs/workbench/parts/terminal/node/terminalProcess.ts index b46132c8d78..bf9d8890bb8 100644 --- a/src/vs/workbench/parts/terminal/node/terminalProcess.ts +++ b/src/vs/workbench/parts/terminal/node/terminalProcess.ts @@ -45,8 +45,8 @@ if (cols && rows) { var ptyProcess = pty.fork(shell, args, options); -var closeTimeout; -var exitCode; +var closeTimeout: number; +var exitCode: number; // Allow any trailing data events to be sent before the exit event is sent. // See https://github.com/Tyriar/node-pty/issues/72 @@ -129,7 +129,7 @@ function cleanEnv() { } } -function setupPlanB(parentPid) { +function setupPlanB(parentPid: number) { setInterval(function () { try { process.kill(parentPid, 0); // throws an exception if the main process doesn't exist anymore. 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 b533e60a755..c0fb85b7c64 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts @@ -7,6 +7,7 @@ import * as nls from 'vs/nls'; import 'vs/css!./media/update.contribution'; +import 'vs/platform/update/node/update.config.contribution'; import { Registry } from 'vs/platform/registry/common/platform'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { ReleaseNotesEditor } from 'vs/workbench/parts/update/electron-browser/releaseNotesEditor'; @@ -15,7 +16,6 @@ import { IGlobalActivityRegistry, GlobalActivityExtensions } from 'vs/workbench/ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; -import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import { ShowCurrentReleaseNotesAction, ProductContribution, UpdateContribution, Win3264BitContribution } from './update'; import { EditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor'; import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; @@ -43,25 +43,3 @@ Registry.as(EditorExtensions.Editors) Registry.as(ActionExtensions.WorkbenchActions) .registerWorkbenchAction(new SyncActionDescriptor(ShowCurrentReleaseNotesAction, ShowCurrentReleaseNotesAction.ID, ShowCurrentReleaseNotesAction.LABEL), 'Show Release Notes'); - -// Configuration: Update -const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); -configurationRegistry.registerConfiguration({ - 'id': 'update', - 'order': 15, - 'title': nls.localize('updateConfigurationTitle', "Update"), - 'type': 'object', - 'properties': { - 'update.channel': { - 'type': 'string', - 'enum': ['none', 'default'], - 'default': 'default', - 'description': nls.localize('updateChannel', "Configure whether you receive automatic updates from an update channel. Requires a restart after change.") - }, - 'update.enableWindowsBackgroundUpdates': { - 'type': 'boolean', - 'default': false, - 'description': nls.localize('enableWindowsBackgroundUpdates', "Enables Windows background updates.") - } - } -}); diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index 380a3c068eb..6b702d8667e 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -263,8 +263,8 @@ export class Win3264BitContribution implements IWorkbenchContribution { message: nls.localize('64bitisavailable', "{0} for 64-bit Windows is now available!", product.nameShort), actions: [ LinkAction('update.show64bitreleasenotes', nls.localize('learn more', "Learn More"), url), - CloseAction, - neverShowAgain.action + neverShowAgain.action, + CloseAction ] }); } @@ -420,7 +420,7 @@ export class UpdateContribution implements IGlobalActivity { this.messageService.show(severity.Info, { message: nls.localize('updateInstalling', "{0} {1} is being installed in the background, we'll let you know when it's done.", product.nameLong, update.productVersion), - actions: [CloseAction, neverShowAgain.action] + actions: [neverShowAgain.action, CloseAction] }); } 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 2b9552200f4..048787bcf7d 100644 --- a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts +++ b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts @@ -22,6 +22,7 @@ import { Workspace, toWorkspaceFolders } from 'vs/platform/workspace/common/work import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; import { DefaultEndOfLine } from 'vs/editor/common/model'; import { snapshotToString } from 'vs/platform/files/common/files'; +import { Schemas } from 'vs/base/common/network'; const parentDir = getRandomTestPath(os.tmpdir(), 'vsctests', 'backupfileservice'); const backupHome = path.join(parentDir, 'Backups'); @@ -31,7 +32,7 @@ const workspaceResource = Uri.file(platform.isWindows ? 'c:\\workspace' : '/work const workspaceBackupPath = path.join(backupHome, crypto.createHash('md5').update(workspaceResource.fsPath).digest('hex')); const fooFile = Uri.file(platform.isWindows ? 'c:\\Foo' : '/Foo'); const barFile = Uri.file(platform.isWindows ? 'c:\\Bar' : '/Bar'); -const untitledFile = Uri.from({ scheme: 'untitled', path: 'Untitled-1' }); +const untitledFile = Uri.from({ scheme: Schemas.untitled, path: 'Untitled-1' }); const fooBackupPath = path.join(workspaceBackupPath, 'file', crypto.createHash('md5').update(fooFile.fsPath).digest('hex')); const barBackupPath = path.join(workspaceBackupPath, 'file', crypto.createHash('md5').update(barFile.fsPath).digest('hex')); const untitledBackupPath = path.join(workspaceBackupPath, 'untitled', crypto.createHash('md5').update(untitledFile.fsPath).digest('hex')); @@ -80,7 +81,7 @@ suite('BackupFileService', () => { test('should get the correct backup path for untitled files', () => { // Format should be: /// - const backupResource = Uri.from({ scheme: 'untitled', path: 'Untitled-1' }); + const backupResource = Uri.from({ scheme: Schemas.untitled, path: 'Untitled-1' }); const workspaceHash = crypto.createHash('md5').update(workspaceResource.fsPath).digest('hex'); const filePathHash = crypto.createHash('md5').update(backupResource.fsPath).digest('hex'); const expectedPath = Uri.file(path.join(backupHome, workspaceHash, 'untitled', filePathHash)).fsPath; diff --git a/src/vs/workbench/services/configuration/node/configurationService.ts b/src/vs/workbench/services/configuration/node/configurationService.ts index 577c4f78dcd..920a1980fd2 100644 --- a/src/vs/workbench/services/configuration/node/configurationService.ts +++ b/src/vs/workbench/services/configuration/node/configurationService.ts @@ -5,9 +5,8 @@ '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 { dirname } from 'path'; +import { dirname, basename } from 'path'; import * as assert from 'vs/base/common/assert'; import Event, { Emitter } from 'vs/base/common/event'; import { StrictResourceMap } from 'vs/base/common/map'; @@ -16,7 +15,7 @@ import { Disposable } from 'vs/base/common/lifecycle'; import { Queue } from 'vs/base/common/async'; import { stat, writeFile } from 'vs/base/node/pfs'; import { IJSONContributionRegistry, Extensions as JSONExtensions } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; -import { IWorkspaceContextService, Workspace, WorkbenchState, IWorkspaceFolder, toWorkspaceFolders, IWorkspaceFoldersChangeEvent } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, Workspace, WorkbenchState, IWorkspaceFolder, toWorkspaceFolders, IWorkspaceFoldersChangeEvent, WorkspaceFolder } from 'vs/platform/workspace/common/workspace'; import { FileChangesEvent } from 'vs/platform/files/common/files'; import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -111,13 +110,16 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat } public addFolders(foldersToAdd: IWorkspaceFolderCreationData[], index?: number): TPromise { - assert.ok(this.jsonEditingService, 'Workbench is not initialized yet'); - return this.workspaceEditingQueue.queue(() => this.doAddFolders(foldersToAdd, index)); + return this.updateFolders(foldersToAdd, [], index); } public removeFolders(foldersToRemove: URI[]): TPromise { + return this.updateFolders([], foldersToRemove); + } + + public updateFolders(foldersToAdd: IWorkspaceFolderCreationData[], foldersToRemove: URI[], index?: number): TPromise { assert.ok(this.jsonEditingService, 'Workbench is not initialized yet'); - return this.workspaceEditingQueue.queue(() => this.doRemoveFolders(foldersToRemove)); + return this.workspaceEditingQueue.queue(() => this.doUpdateFolders(foldersToAdd, foldersToRemove, index)); } public isInsideWorkspace(resource: URI): boolean { @@ -134,72 +136,20 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat return false; } - private doAddFolders(foldersToAdd: IWorkspaceFolderCreationData[], index?: number): TPromise { + private doUpdateFolders(foldersToAdd: IWorkspaceFolderCreationData[], foldersToRemove: URI[], index?: number): TPromise { if (this.getWorkbenchState() !== WorkbenchState.WORKSPACE) { return TPromise.as(void 0); // we need a workspace to begin with } - const currentWorkspaceFolders = this.getWorkspace().folders; - const currentWorkspaceFolderUris = currentWorkspaceFolders.map(folder => folder.uri); - const currentStoredFolders = currentWorkspaceFolders.map(folder => folder.raw); - - const storedFoldersToAdd: IStoredWorkspaceFolder[] = []; - - const workspaceConfigFolder = dirname(this.getWorkspace().configuration.fsPath); - - foldersToAdd.forEach(folderToAdd => { - if (this.contains(currentWorkspaceFolderUris, folderToAdd.uri)) { - return; // already existing - } - - let storedFolder: IStoredWorkspaceFolder; - - // File resource: use "path" property - if (folderToAdd.uri.scheme === Schemas.file) { - storedFolder = { - path: massageFolderPathForWorkspace(folderToAdd.uri.fsPath, workspaceConfigFolder, currentStoredFolders) - }; - } - - // Any other resource: use "uri" property - else { - storedFolder = { - uri: folderToAdd.uri.toString(true) - }; - } - - if (folderToAdd.name) { - storedFolder.name = folderToAdd.name; - } - - storedFoldersToAdd.push(storedFolder); - }); - - if (storedFoldersToAdd.length > 0) { - let newStoredWorkspaceFolders: IStoredWorkspaceFolder[] = []; - - if (typeof index === 'number' && index >= 0 && index < currentStoredFolders.length) { - newStoredWorkspaceFolders = currentStoredFolders.slice(0); - newStoredWorkspaceFolders.splice(index, 0, ...storedFoldersToAdd); - } else { - newStoredWorkspaceFolders = [...currentStoredFolders, ...storedFoldersToAdd]; - } - - return this.setFolders(newStoredWorkspaceFolders); + if (foldersToAdd.length + foldersToRemove.length === 0) { + return TPromise.as(void 0); // nothing to do } - return TPromise.as(void 0); - } + let foldersHaveChanged = false; - private doRemoveFolders(foldersToRemove: URI[]): TPromise { - if (this.getWorkbenchState() !== WorkbenchState.WORKSPACE) { - return TPromise.as(void 0); // we need a workspace to begin with - } - - const currentWorkspaceFolders = this.getWorkspace().folders; - const currentStoredFolders = currentWorkspaceFolders.map(folder => folder.raw); - - const newStoredFolders: IStoredWorkspaceFolder[] = currentStoredFolders.filter((folder, index) => { + // Remove first (if any) + let currentWorkspaceFolders = this.getWorkspace().folders; + let newStoredFolders: IStoredWorkspaceFolder[] = currentWorkspaceFolders.map(f => f.raw).filter((folder, index) => { if (!isStoredWorkspaceFolder(folder)) { return true; // keep entries which are unrelated } @@ -207,7 +157,61 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat return !this.contains(foldersToRemove, currentWorkspaceFolders[index].uri); // keep entries which are unrelated }); - if (newStoredFolders.length !== currentStoredFolders.length) { + foldersHaveChanged = currentWorkspaceFolders.length !== newStoredFolders.length; + + // Add afterwards (if any) + if (foldersToAdd.length) { + + // Recompute current workspace folders if we have folders to add + const workspaceConfigFolder = dirname(this.getWorkspace().configuration.fsPath); + currentWorkspaceFolders = toWorkspaceFolders(newStoredFolders, URI.file(workspaceConfigFolder)); + const currentWorkspaceFolderUris = currentWorkspaceFolders.map(folder => folder.uri); + + const storedFoldersToAdd: IStoredWorkspaceFolder[] = []; + + foldersToAdd.forEach(folderToAdd => { + if (this.contains(currentWorkspaceFolderUris, folderToAdd.uri)) { + return; // already existing + } + + let storedFolder: IStoredWorkspaceFolder; + + // File resource: use "path" property + if (folderToAdd.uri.scheme === Schemas.file) { + storedFolder = { + path: massageFolderPathForWorkspace(folderToAdd.uri.fsPath, workspaceConfigFolder, newStoredFolders) + }; + } + + // Any other resource: use "uri" property + else { + storedFolder = { + uri: folderToAdd.uri.toString(true) + }; + } + + if (folderToAdd.name) { + storedFolder.name = folderToAdd.name; + } + + storedFoldersToAdd.push(storedFolder); + }); + + // Apply to array of newStoredFolders + if (storedFoldersToAdd.length > 0) { + foldersHaveChanged = true; + + if (typeof index === 'number' && index >= 0 && index < newStoredFolders.length) { + newStoredFolders = newStoredFolders.slice(0); + newStoredFolders.splice(index, 0, ...storedFoldersToAdd); + } else { + newStoredFolders = [...newStoredFolders, ...storedFoldersToAdd]; + } + } + } + + // Set folders if we recorded a change + if (foldersHaveChanged) { return this.setFolders(newStoredFolders); } @@ -331,7 +335,7 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat const workspaceConfigPath = URI.file(workspaceIdentifier.configPath); return this.workspaceConfiguration.load(workspaceConfigPath) .then(() => { - const workspaceFolders = toWorkspaceFolders(this.workspaceConfiguration.getFolders(), URI.file(paths.dirname(workspaceConfigPath.fsPath))); + const workspaceFolders = toWorkspaceFolders(this.workspaceConfiguration.getFolders(), URI.file(dirname(workspaceConfigPath.fsPath))); const workspaceId = workspaceIdentifier.id; const workspaceName = getWorkspaceLabel({ id: workspaceId, configPath: workspaceConfigPath.fsPath }, this.environmentService); return new Workspace(workspaceId, workspaceName, workspaceFolders, workspaceConfigPath); @@ -350,15 +354,15 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat } private createEmptyWorkspace(configuration: IWindowConfiguration): TPromise { - let id = configuration.backupPath ? URI.from({ path: paths.basename(configuration.backupPath), scheme: 'empty' }).toString() : ''; + let id = configuration.backupPath ? URI.from({ path: basename(configuration.backupPath), scheme: 'empty' }).toString() : ''; return TPromise.as(new Workspace(id)); } private updateWorkspaceAndInitializeConfiguration(workspace: Workspace): TPromise { const hasWorkspaceBefore = !!this.workspace; - let previousState; - let previousWorkspacePath; - let previousFolders; + let previousState: WorkbenchState; + let previousWorkspacePath: string; + let previousFolders: WorkspaceFolder[]; if (hasWorkspaceBefore) { previousState = this.getWorkbenchState(); @@ -391,7 +395,7 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat } private compareFolders(currentFolders: IWorkspaceFolder[], newFolders: IWorkspaceFolder[]): IWorkspaceFoldersChangeEvent { - const result = { added: [], removed: [], changed: [] }; + const result = { added: [], removed: [], changed: [] } as IWorkspaceFoldersChangeEvent; result.added = newFolders.filter(newFolder => !currentFolders.some(currentFolder => newFolder.uri.toString() === currentFolder.uri.toString())); for (let currentIndex = 0; currentIndex < currentFolders.length; currentIndex++) { let currentFolder = currentFolders[currentIndex]; @@ -506,7 +510,7 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat private onWorkspaceConfigurationChanged(): TPromise { if (this.workspace && this.workspace.configuration && this._configuration) { const workspaceConfigurationChangeEvent = this._configuration.compareAndUpdateWorkspaceConfiguration(this.workspaceConfiguration.getConfiguration()); - let configuredFolders = toWorkspaceFolders(this.workspaceConfiguration.getFolders(), URI.file(paths.dirname(this.workspace.configuration.fsPath))); + let configuredFolders = toWorkspaceFolders(this.workspaceConfiguration.getFolders(), URI.file(dirname(this.workspace.configuration.fsPath))); const changes = this.compareFolders(this.workspace.folders, configuredFolders); if (changes.added.length || changes.removed.length || changes.changed.length) { this.workspace.folders = configuredFolders; 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 6563fd4a42c..2ef62d58898 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts @@ -274,6 +274,55 @@ suite('WorkspaceContextService - Workspace', () => { }); }); + test('update folders (remove last and add to end)', () => { + const target = sinon.spy(); + testObject.onDidChangeWorkspaceFolders(target); + const workspaceDir = path.dirname(testObject.getWorkspace().folders[0].uri.fsPath); + const addedFolders = [{ uri: URI.file(path.join(workspaceDir, 'd')) }, { uri: URI.file(path.join(workspaceDir, 'c')) }]; + const removedFolders = [testObject.getWorkspace().folders[1]].map(f => f.uri); + return testObject.updateFolders(addedFolders, removedFolders) + .then(() => { + assert.ok(target.calledOnce); + const actual = target.args[0][0]; + assert.deepEqual(actual.added.map(r => r.uri.toString()), addedFolders.map(a => a.uri.toString())); + assert.deepEqual(actual.removed.map(r => r.uri.toString()), removedFolders.map(a => a.toString())); + assert.deepEqual(actual.changed, []); + }); + }); + + test('update folders (rename first via add and remove)', () => { + const target = sinon.spy(); + testObject.onDidChangeWorkspaceFolders(target); + const workspaceDir = path.dirname(testObject.getWorkspace().folders[0].uri.fsPath); + const addedFolders = [{ uri: URI.file(path.join(workspaceDir, 'a')), name: 'The Folder' }]; + const removedFolders = [testObject.getWorkspace().folders[0]].map(f => f.uri); + return testObject.updateFolders(addedFolders, removedFolders, 0) + .then(() => { + assert.ok(target.calledOnce); + const actual = target.args[0][0]; + assert.deepEqual(actual.added, []); + assert.deepEqual(actual.removed, []); + assert.deepEqual(actual.changed.map(r => r.uri.toString()), removedFolders.map(a => a.toString())); + }); + }); + + test('update folders (remove first and add to end)', () => { + const target = sinon.spy(); + testObject.onDidChangeWorkspaceFolders(target); + const workspaceDir = path.dirname(testObject.getWorkspace().folders[0].uri.fsPath); + const addedFolders = [{ uri: URI.file(path.join(workspaceDir, 'd')) }, { uri: URI.file(path.join(workspaceDir, 'c')) }]; + const removedFolders = [testObject.getWorkspace().folders[0]].map(f => f.uri); + const changedFolders = [testObject.getWorkspace().folders[1]].map(f => f.uri); + return testObject.updateFolders(addedFolders, removedFolders) + .then(() => { + assert.ok(target.calledOnce); + const actual = target.args[0][0]; + assert.deepEqual(actual.added.map(r => r.uri.toString()), addedFolders.map(a => a.uri.toString())); + assert.deepEqual(actual.removed.map(r => r.uri.toString()), removedFolders.map(a => a.toString())); + assert.deepEqual(actual.changed.map(r => r.uri.toString()), changedFolders.map(a => a.toString())); + }); + }); + test('reorder folders trigger change event', () => { const target = sinon.spy(); testObject.onDidChangeWorkspaceFolders(target); diff --git a/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts b/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts index e2dc0febf79..2ef8daf1ccd 100644 --- a/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts +++ b/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts @@ -13,7 +13,6 @@ export const IConfigurationResolverService = createDecorator): IStringDictionary; diff --git a/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts index 79af4c46715..81c7529c9a5 100644 --- a/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts @@ -20,11 +20,10 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { relative } from 'path'; import { IProcessEnvironment, isWindows } from 'vs/base/common/platform'; import { normalizeDriveLetter } from 'vs/base/common/labels'; +import { Schemas } from 'vs/base/common/network'; class VariableResolver { static VARIABLE_REGEXP = /\$\{(.*?)\}/g; - static ENV_PREFIX = 'env:'; - static CONFIG_PREFIX = 'config:'; private envVariables: IProcessEnvironment; constructor( @@ -147,7 +146,7 @@ class VariableResolver { input = input.modifiedInput; } - const fileResource = toResource(input, { filter: 'file' }); + const fileResource = toResource(input, { filter: Schemas.file }); if (!fileResource) { return undefined; } diff --git a/src/vs/workbench/services/editor/common/editorService.ts b/src/vs/workbench/services/editor/common/editorService.ts index b34c179fee1..641fda6e89e 100644 --- a/src/vs/workbench/services/editor/common/editorService.ts +++ b/src/vs/workbench/services/editor/common/editorService.ts @@ -9,12 +9,11 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { createDecorator, ServiceIdentifier, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IEditorService, IEditor, IEditorInput, IEditorOptions, ITextEditorOptions, Position, Direction, IResourceInput, IResourceDiffInput, IResourceSideBySideInput, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; import URI from 'vs/base/common/uri'; -import network = require('vs/base/common/network'); import { Registry } from 'vs/platform/registry/common/platform'; -import { basename, dirname } from 'vs/base/common/paths'; +import { basename } from 'vs/base/common/paths'; import { EditorInput, EditorOptions, TextEditorOptions, Extensions as EditorExtensions, SideBySideEditorInput, IFileEditorInput, IFileInputFactory, IEditorInputFactoryRegistry } from 'vs/workbench/common/editor'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; -import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import nls = require('vs/nls'); @@ -24,6 +23,7 @@ import { once } from 'vs/base/common/event'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IFileService } from 'vs/platform/files/common/files'; import { DataUriEditorInput } from 'vs/workbench/common/editor/dataUriEditorInput'; +import { Schemas } from 'vs/base/common/network'; export const IWorkbenchEditorService = createDecorator('editorService'); @@ -191,7 +191,7 @@ export class WorkbenchEditorService implements IWorkbenchEditorService { const resourceInput = input; if (resourceInput.resource instanceof URI) { const schema = resourceInput.resource.scheme; - if (schema === network.Schemas.http || schema === network.Schemas.https) { + if (schema === Schemas.http || schema === Schemas.https) { window.open(resourceInput.resource.toString(true)); return TPromise.wrap(null); @@ -314,28 +314,14 @@ 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)) { + if (!untitledInput.resource || typeof untitledInput.filePath === 'string' || (untitledInput.resource instanceof URI && untitledInput.resource.scheme === Schemas.untitled)) { return this.untitledEditorService.createOrGet(untitledInput.filePath ? URI.file(untitledInput.filePath) : untitledInput.resource, untitledInput.language, untitledInput.contents, untitledInput.encoding); } + // Resource Editor Support const resourceInput = input; - - // Files / Data URI support - if (resourceInput.resource instanceof URI && (resourceInput.resource.scheme === network.Schemas.file || resourceInput.resource.scheme === network.Schemas.data)) { - return this.createOrGet(resourceInput.resource, this.instantiationService, resourceInput.label, resourceInput.description, resourceInput.encoding); - } - - // Any other resource - else if (resourceInput.resource instanceof URI) { - const label = resourceInput.label || basename(resourceInput.resource.fsPath); - let description: string; - if (typeof resourceInput.description === 'string') { - description = resourceInput.description; - } else if (resourceInput.resource.scheme === network.Schemas.file) { - description = dirname(resourceInput.resource.fsPath); - } - - return this.createOrGet(resourceInput.resource, this.instantiationService, label, description); + if (resourceInput.resource instanceof URI) { + return this.createOrGet(resourceInput.resource, this.instantiationService, resourceInput.label || basename(resourceInput.resource.fsPath), resourceInput.description, resourceInput.encoding); } return null; @@ -357,12 +343,12 @@ export class WorkbenchEditorService implements IWorkbenchEditorService { let input: ICachedEditorInput; // File - if (resource.scheme === network.Schemas.file || this.fileService.canHandleResource(resource)) { + if (this.fileService.canHandleResource(resource)) { input = this.fileInputFactory.createFileInput(resource, encoding, instantiationService); } // Data URI - else if (resource.scheme === network.Schemas.data) { + else if (resource.scheme === Schemas.data) { input = instantiationService.createInstance(DataUriEditorInput, label, description, resource); } @@ -383,7 +369,7 @@ export class WorkbenchEditorService implements IWorkbenchEditorService { const res = input.getResource(); // Do not try to extract any paths from simple untitled editors - if (res.scheme === 'untitled' && !this.untitledEditorService.hasAssociatedFilePath(res)) { + if (res.scheme === Schemas.untitled && !this.untitledEditorService.hasAssociatedFilePath(res)) { return input.getName(); } diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index e0d15b0ad05..0b93a411e49 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -16,11 +16,11 @@ import * as pfs from 'vs/base/node/pfs'; import URI from 'vs/base/common/uri'; import * as platform from 'vs/base/common/platform'; import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/node/extensionDescriptionRegistry'; -import { IMessage, IExtensionDescription, IExtensionsStatus, IExtensionService, ExtensionPointContribution, ActivationTimes, IExtensionHostInformation, ProfileSession, USER_MANIFEST_CACHE_FILE, BUILTIN_MANIFEST_CACHE_FILE, MANIFEST_CACHE_FOLDER } from 'vs/platform/extensions/common/extensions'; +import { IMessage, IExtensionDescription, IExtensionsStatus, IExtensionService, ExtensionPointContribution, ActivationTimes, ProfileSession, USER_MANIFEST_CACHE_FILE, BUILTIN_MANIFEST_CACHE_FILE, MANIFEST_CACHE_FOLDER } from 'vs/platform/extensions/common/extensions'; import { IExtensionEnablementService, IExtensionIdentifier, EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement'; import { areSameExtensions, BetterMergeId, BetterMergeDisabledNowKey } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionsRegistry, ExtensionPoint, IExtensionPointUser, ExtensionMessageCollector, IExtensionPoint } from 'vs/platform/extensions/common/extensionsRegistry'; -import { ExtensionScanner, ILog, ExtensionScannerInput, IExtensionResolver, IExtensionReference, Translations } from 'vs/workbench/services/extensions/electron-browser/extensionPoints'; +import { ExtensionScanner, ILog, ExtensionScannerInput, IExtensionResolver, IExtensionReference, Translations } from 'vs/workbench/services/extensions/node/extensionPoints'; import { IMessageService, CloseAction } from 'vs/platform/message/common/message'; import { ProxyIdentifier } from 'vs/workbench/services/extensions/node/proxyIdentifier'; import { ExtHostContext, ExtHostExtensionServiceShape, IExtHostContext, MainContext } from 'vs/workbench/api/node/extHost.protocol'; @@ -197,15 +197,6 @@ export class ExtensionService extends Disposable implements IExtensionService { return this._onDidRegisterExtensions.event; } - public getExtensionHostInformation(): IExtensionHostInformation { - if (!this._extensionHostProcessWorker) { - throw errors.illegalState(); - } - return { - inspectPort: this._extensionHostProcessWorker.getInspectPort() - }; - } - public restartExtensionHost(): void { this._stopExtensionHostProcess(); this._startExtensionHostProcess(Object.keys(this._allRequestedActivateEvents)); diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts b/src/vs/workbench/services/extensions/node/extensionPoints.ts similarity index 99% rename from src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts rename to src/vs/workbench/services/extensions/node/extensionPoints.ts index 4154fae5f8f..476e5c76088 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionPoints.ts +++ b/src/vs/workbench/services/extensions/node/extensionPoints.ts @@ -429,7 +429,7 @@ export class ExtensionScanner { /** * Scan a list of extensions defined in `absoluteFolderPath` */ - public static async scanExtensions(input: ExtensionScannerInput, log: ILog, resolver?: IExtensionResolver): TPromise { + public static async scanExtensions(input: ExtensionScannerInput, log: ILog, resolver: IExtensionResolver = null): TPromise { const absoluteFolderPath = input.absoluteFolderPath; const isBuiltin = input.isBuiltin; diff --git a/src/vs/workbench/services/files/electron-browser/fileService.ts b/src/vs/workbench/services/files/electron-browser/fileService.ts index e97cc0ffd1d..99b4e90c588 100644 --- a/src/vs/workbench/services/files/electron-browser/fileService.ts +++ b/src/vs/workbench/services/files/electron-browser/fileService.ts @@ -21,11 +21,11 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import Event, { Emitter } from 'vs/base/common/event'; - import { shell } from 'electron'; import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { isMacintosh } from 'vs/base/common/platform'; import product from 'vs/platform/node/product'; +import { Schemas } from 'vs/base/common/network'; export class FileService implements IFileService { @@ -35,6 +35,9 @@ export class FileService implements IFileService { private static readonly NET_VERSION_ERROR = 'System.MissingMethodException'; private static readonly NET_VERSION_ERROR_IGNORE_KEY = 'ignoreNetVersionError'; + private static readonly ENOSPC_ERROR = 'ENOSPC'; + private static readonly ENOSPC_ERROR_IGNORE_KEY = 'ignoreEnospcError'; + private raw: NodeFileService; private toUnbind: IDisposable[]; @@ -95,13 +98,17 @@ export class FileService implements IFileService { return this._onAfterOperation.event; } - private onFileServiceError(msg: string): void { + private onFileServiceError(error: string | Error): void { + const msg = error ? error.toString() : void 0; + if (!msg) { + return; + } // Forward to unexpected error handler errors.onUnexpectedError(msg); // Detect if we run < .NET Framework 4.5 (TODO@ben remove with new watcher impl) - if (typeof msg === 'string' && msg.indexOf(FileService.NET_VERSION_ERROR) >= 0 && !this.storageService.getBoolean(FileService.NET_VERSION_ERROR_IGNORE_KEY, StorageScope.WORKSPACE)) { + if (msg.indexOf(FileService.NET_VERSION_ERROR) >= 0 && !this.storageService.getBoolean(FileService.NET_VERSION_ERROR_IGNORE_KEY, StorageScope.WORKSPACE)) { this.messageService.show(Severity.Warning, { message: nls.localize('netVersionError', "The Microsoft .NET Framework 4.5 is required. Please follow the link to install it."), actions: [ @@ -119,6 +126,26 @@ export class FileService implements IFileService { ] }); } + + // Detect if we run into ENOSPC issues (TODO@ben remove with new watcher impl) + if (msg.indexOf(FileService.ENOSPC_ERROR) >= 0 && !this.storageService.getBoolean(FileService.ENOSPC_ERROR_IGNORE_KEY, StorageScope.WORKSPACE)) { + this.messageService.show(Severity.Warning, { + message: nls.localize('enospcError', "{0} is running out of file handles. Please follow the instructions link to resolve this issue.", product.nameLong), + actions: [ + new Action('learnMore', nls.localize('learnMore', "Instructions"), null, true, () => { + window.open('https://go.microsoft.com/fwlink/?linkid=867693'); + + return TPromise.as(true); + }), + new Action('enospc.error.ignore', nls.localize('neverShowAgain', "Don't Show Again"), '', true, () => { + this.storageService.store(FileService.ENOSPC_ERROR_IGNORE_KEY, true, StorageScope.WORKSPACE); + + return TPromise.as(null); + }), + CloseAction + ] + }); + } } private registerListeners(): void { @@ -243,7 +270,7 @@ export class FileService implements IFileService { return; } - if (resource.scheme !== 'file') { + if (resource.scheme !== Schemas.file) { return; // only support files } diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index b27a7f781b3..402c8956b53 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -42,6 +42,7 @@ import { getBaseLabel } from 'vs/base/common/labels'; import { assign } from 'vs/base/common/objects'; import { Readable } from 'stream'; import { IWriteFileOptions } from 'vs/base/node/extfs'; +import { Schemas } from 'vs/base/common/network'; export interface IEncodingOverride { resource: uri; @@ -260,7 +261,7 @@ export class FileService implements IFileService { public resolveStreamContent(resource: uri, options?: IResolveContentOptions): TPromise { // Guard early against attempts to resolve an invalid file path - if (resource.scheme !== 'file' || !resource.fsPath) { + if (resource.scheme !== Schemas.file || !resource.fsPath) { return TPromise.wrapError(new FileOperationError( nls.localize('fileInvalidPath', "Invalid file resource ({0})", resource.toString(true)), FileOperationResult.FILE_INVALID_PATH, @@ -279,7 +280,7 @@ export class FileService implements IFileService { const contentResolverToken = new CancellationTokenSource(); - const onStatError = error => { + const onStatError = (error: Error) => { // error: stop reading the file the stat and content resolve call // usually race, mostly likely the stat call will win and cancel @@ -426,7 +427,7 @@ export class FileService implements IFileService { } }; - const handleChunk = (bytesRead) => { + const handleChunk = (bytesRead: number) => { if (token.isCancellationRequested) { // cancellation -> finish finish(new Error('cancelled')); @@ -881,7 +882,7 @@ export class FileService implements IFileService { resource = (arg1).resource; } - assert.ok(resource && resource.scheme === 'file', 'Invalid resource: ' + resource); + assert.ok(resource && resource.scheme === Schemas.file, `Invalid resource: ${resource}`); return paths.normalize(resource.fsPath); } @@ -1018,7 +1019,7 @@ export class FileService implements IFileService { } public watchFileChanges(resource: uri): void { - assert.ok(resource && resource.scheme === 'file', `Invalid resource for watching: ${resource}`); + assert.ok(resource && resource.scheme === Schemas.file, `Invalid resource for watching: ${resource}`); // Create or get watcher for provided path let watcher = this.activeFileChangesWatchers.get(resource); @@ -1026,59 +1027,52 @@ export class FileService implements IFileService { const fsPath = resource.fsPath; const fsName = paths.basename(resource.fsPath); - try { - watcher = extfs.watch(fsPath, (eventType: string, filename: string) => { - const renamedOrDeleted = ((filename && filename !== fsName) || eventType === 'rename'); + watcher = extfs.watch(fsPath, (eventType: string, filename: string) => { + const renamedOrDeleted = ((filename && filename !== fsName) || eventType === 'rename'); - // The file was either deleted or renamed. Many tools apply changes to files in an - // atomic way ("Atomic Save") by first renaming the file to a temporary name and then - // renaming it back to the original name. Our watcher will detect this as a rename - // and then stops to work on Mac and Linux because the watcher is applied to the - // inode and not the name. The fix is to detect this case and trying to watch the file - // again after a certain delay. - // In addition, we send out a delete event if after a timeout we detect that the file - // does indeed not exist anymore. - if (renamedOrDeleted) { + // The file was either deleted or renamed. Many tools apply changes to files in an + // atomic way ("Atomic Save") by first renaming the file to a temporary name and then + // renaming it back to the original name. Our watcher will detect this as a rename + // and then stops to work on Mac and Linux because the watcher is applied to the + // inode and not the name. The fix is to detect this case and trying to watch the file + // again after a certain delay. + // In addition, we send out a delete event if after a timeout we detect that the file + // does indeed not exist anymore. + if (renamedOrDeleted) { - // Very important to dispose the watcher which now points to a stale inode - this.unwatchFileChanges(resource); + // Very important to dispose the watcher which now points to a stale inode + this.unwatchFileChanges(resource); - // Wait a bit and try to install watcher again, assuming that the file was renamed quickly ("Atomic Save") - setTimeout(() => { - this.existsFile(resource).done(exists => { + // Wait a bit and try to install watcher again, assuming that the file was renamed quickly ("Atomic Save") + setTimeout(() => { + this.existsFile(resource).done(exists => { - // File still exists, so reapply the watcher - if (exists) { - this.watchFileChanges(resource); - } + // File still exists, so reapply the watcher + if (exists) { + this.watchFileChanges(resource); + } - // File seems to be really gone, so emit a deleted event - else { - this.onRawFileChange({ - type: FileChangeType.DELETED, - path: fsPath - }); - } - }); - }, FileService.FS_REWATCH_DELAY); - } + // File seems to be really gone, so emit a deleted event + else { + this.onRawFileChange({ + type: FileChangeType.DELETED, + path: fsPath + }); + } + }); + }, FileService.FS_REWATCH_DELAY); + } - // Handle raw file change - this.onRawFileChange({ - type: FileChangeType.UPDATED, - path: fsPath - }); + // Handle raw file change + this.onRawFileChange({ + type: FileChangeType.UPDATED, + path: fsPath }); - } catch (error) { - return; // the path might not exist anymore, ignore this error and return + }, (error: string) => this.options.errorLogger(error)); + + if (watcher) { + this.activeFileChangesWatchers.set(resource, watcher); } - - this.activeFileChangesWatchers.set(resource, watcher); - - // Errors - watcher.on('error', (error: string) => { - this.options.errorLogger(error); - }); } } @@ -1141,10 +1135,10 @@ export class StatResolver { private name: string; private etag: string; private size: number; - private errorLogger: (msg) => void; + private errorLogger: (error: Error | string) => void; - constructor(resource: uri, isDirectory: boolean, mtime: number, size: number, errorLogger?: (msg) => void) { - assert.ok(resource && resource.scheme === 'file', 'Invalid resource: ' + resource); + constructor(resource: uri, isDirectory: boolean, mtime: number, size: number, errorLogger?: (error: Error | string) => void) { + assert.ok(resource && resource.scheme === Schemas.file, `Invalid resource: ${resource}`); this.resource = resource; this.isDirectory = isDirectory; diff --git a/src/vs/workbench/services/files/node/watcher/common.ts b/src/vs/workbench/services/files/node/watcher/common.ts index aa0559b3e77..d191df60178 100644 --- a/src/vs/workbench/services/files/node/watcher/common.ts +++ b/src/vs/workbench/services/files/node/watcher/common.ts @@ -97,7 +97,7 @@ class EventNormalizer { // 2.) sort short deleted paths to the top // 3.) for each DELETE, check if there is a deleted parent and ignore the event in that case return this.normalized.filter(e => { - if (e.type !== 2) { + if (e.type !== FileChangeType.DELETED) { addedChangeEvents.push(e); return false; // remove ADD / CHANGE } @@ -116,4 +116,4 @@ class EventNormalizer { return true; }).concat(addedChangeEvents); } -} \ No newline at end of file +} 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 3e17fc59357..e874ca74002 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -10,7 +10,7 @@ import * as platform from 'vs/base/common/platform'; 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/nsfw/watcher'; -import { TPromise, ProgressCallback, TValueCallback } from 'vs/base/common/winjs.base'; +import { TPromise, ProgressCallback, TValueCallback, ErrorCallback } from 'vs/base/common/winjs.base'; import { ThrottledDelayer } from 'vs/base/common/async'; import { FileChangeType } from 'vs/platform/files/common/files'; import { normalizeNFC } from 'vs/base/common/strings'; @@ -37,13 +37,16 @@ export class NsfwWatcherService implements IWatcherService { private _pathWatchers: { [watchPath: string]: IPathWatcher } = {}; private _watcherPromise: TPromise; private _progressCallback: ProgressCallback; + private _errorCallback: ErrorCallback; private _verboseLogging: boolean; - + private enospcErrorLogged: boolean; public initialize(verboseLogging: boolean): TPromise { - this._verboseLogging = verboseLogging; + this._verboseLogging = true; this._watcherPromise = new TPromise((c, e, p) => { + this._errorCallback = e; this._progressCallback = p; + }); return this._watcherPromise; } @@ -58,6 +61,19 @@ export class NsfwWatcherService implements IWatcherService { ignored: request.ignored }; + process.on('uncaughtException', e => { + + // Specially handle ENOSPC errors that can happen when + // the watcher consumes so many file descriptors that + // we are running into a limit. We only want to warn + // once in this case to avoid log spam. + // See https://github.com/Microsoft/vscode/issues/7950 + if (e === 'Inotify limit reached' && !this.enospcErrorLogged) { + this.enospcErrorLogged = true; + this._errorCallback(new Error('Inotify limit reached (ENOSPC)')); + } + }); + nsfw(request.basePath, events => { for (let i = 0; i < events.length; i++) { const e = events[i]; 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 808b863f0cc..80265380b4c 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts @@ -18,7 +18,7 @@ import strings = require('vs/base/common/strings'); 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'; +import { IWatcherRequest, IWatcherService } from 'vs/workbench/services/files/node/watcher/unix/watcher'; export class ChokidarWatcherService implements IWatcherService { @@ -27,6 +27,7 @@ export class ChokidarWatcherService implements IWatcherService { private spamCheckStartTime: number; private spamWarningLogged: boolean; + private enospcErrorLogged: boolean; public watch(request: IWatcherRequest): TPromise { const watcherOpts: chokidar.IOptions = { @@ -138,7 +139,20 @@ export class ChokidarWatcherService implements IWatcherService { chokidarWatcher.on('error', (error: Error) => { if (error) { - console.error(error.toString()); + + // Specially handle ENOSPC errors that can happen when + // the watcher consumes so many file descriptors that + // we are running into a limit. We only want to warn + // once in this case to avoid log spam. + // See https://github.com/Microsoft/vscode/issues/7950 + if ((error).code === 'ENOSPC') { + if (!this.enospcErrorLogged) { + this.enospcErrorLogged = true; + e(new Error('Inotify limit reached (ENOSPC)')); + } + } else { + console.error(error.toString()); + } } }); }, () => { diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcherIpc.ts b/src/vs/workbench/services/files/node/watcher/unix/watcherIpc.ts index f949ab0e6fe..9fcd515708f 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcherIpc.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/watcherIpc.ts @@ -7,7 +7,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; -import { IWatcherRequest, IWatcherService } from './watcher'; +import { IWatcherRequest, IWatcherService } from 'vs/workbench/services/files/node/watcher/unix/watcher'; export interface IWatcherChannel extends IChannel { call(command: 'watch', request: IWatcherRequest): TPromise; diff --git a/src/vs/workbench/services/history/electron-browser/history.ts b/src/vs/workbench/services/history/electron-browser/history.ts index c4e2ebda591..09012bee37b 100644 --- a/src/vs/workbench/services/history/electron-browser/history.ts +++ b/src/vs/workbench/services/history/electron-browser/history.ts @@ -10,7 +10,7 @@ import errors = require('vs/base/common/errors'); import URI from 'vs/base/common/uri'; import { IEditor } from 'vs/editor/common/editorCommon'; import { IEditor as IBaseEditor, IEditorInput, ITextEditorOptions, IResourceInput, ITextEditorSelection, Position as GroupPosition } from 'vs/platform/editor/common/editor'; -import { Extensions as EditorExtensions, EditorInput, IEditorCloseEvent, IEditorGroup, IEditorInputFactoryRegistry, toResource } from 'vs/workbench/common/editor'; +import { Extensions as EditorExtensions, EditorInput, IEditorCloseEvent, IEditorGroup, IEditorInputFactoryRegistry, toResource, Extensions as EditorInputExtensions, IFileInputFactory } 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, FILES_EXCLUDE_CONFIG } from 'vs/platform/files/common/files'; @@ -30,6 +30,7 @@ import { IExpression } from 'vs/base/common/glob'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ResourceGlobMatcher } from 'vs/workbench/electron-browser/resources'; +import { Schemas } from 'vs/base/common/network'; /** * Stores the selection & view state of an editor and allows to compare it to other selection states. @@ -125,6 +126,8 @@ export class HistoryService implements IHistoryService { private loaded: boolean; private resourceFilter: ResourceGlobMatcher; + private fileInputFactory: IFileInputFactory; + constructor( @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IEditorGroupService private editorGroupService: IEditorGroupService, @@ -139,6 +142,8 @@ export class HistoryService implements IHistoryService { this.toUnbind = []; this.activeEditorListeners = []; + this.fileInputFactory = Registry.as(EditorInputExtensions.EditorInputFactories).getFileInputFactory(); + this.index = -1; this.lastIndex = -1; this.stack = []; @@ -572,10 +577,8 @@ export class HistoryService implements IHistoryService { } private preferResourceInput(input: IEditorInput): IEditorInput | IResourceInput { - const resource = input ? input.getResource() : void 0; - const preferResourceInput = resource && this.fileService.canHandleResource(resource); // file'ish things prefer resources - if (preferResourceInput) { - return { resource }; + if (this.fileInputFactory.isFileInput(input)) { + return { resource: input.getResource() }; } return input; @@ -720,7 +723,7 @@ export class HistoryService implements IHistoryService { const entriesRaw = this.storageService.get(HistoryService.STORAGE_KEY, StorageScope.WORKSPACE); if (entriesRaw) { - entries = JSON.parse(entriesRaw).filter(entry => !!entry); + entries = JSON.parse(entriesRaw).filter((entry: object) => !!entry); } const registry = Registry.as(EditorExtensions.EditorInputFactories); @@ -806,12 +809,12 @@ export class HistoryService implements IHistoryService { const input = history[i]; if (input instanceof EditorInput) { - resource = toResource(input, { filter: 'file' }); + resource = toResource(input, { filter: Schemas.file }); } else { resource = (input as IResourceInput).resource; } - if (resource && resource.scheme === 'file') { + if (resource && resource.scheme === Schemas.file) { return resource; } } diff --git a/src/vs/workbench/services/issue/common/issue.ts b/src/vs/workbench/services/issue/common/issue.ts new file mode 100644 index 00000000000..b998241ce1c --- /dev/null +++ b/src/vs/workbench/services/issue/common/issue.ts @@ -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. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { IssueReporterData } from 'vs/platform/issue/common/issue'; + +export const IWorkbenchIssueService = createDecorator('workbenchIssueService'); + +export interface IWorkbenchIssueService { + _serviceBrand: any; + openReporter(dataOverrides?: Partial): TPromise; +} diff --git a/src/vs/workbench/services/issue/electron-browser/workbenchIssueService.ts b/src/vs/workbench/services/issue/electron-browser/workbenchIssueService.ts new file mode 100644 index 00000000000..3905d9542d1 --- /dev/null +++ b/src/vs/workbench/services/issue/electron-browser/workbenchIssueService.ts @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------------------------- + * 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 { IssueReporterStyles, IIssueService, IssueReporterData } from 'vs/platform/issue/common/issue'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; +import { textLinkForeground, inputBackground, inputBorder, inputForeground, buttonBackground, buttonHoverBackground, buttonForeground, inputValidationErrorBorder, foreground, inputActiveOptionBorder, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground } from 'vs/platform/theme/common/colorRegistry'; +import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; +import { IExtensionManagementService, IExtensionEnablementService, LocalExtensionType } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { getGalleryExtensionIdFromLocal } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { webFrame } from 'electron'; +import { assign } from 'vs/base/common/objects'; +import { IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue'; + +export class WorkbenchIssueService implements IWorkbenchIssueService { + _serviceBrand: any; + + constructor( + @IIssueService private issueService: IIssueService, + @IThemeService private themeService: IThemeService, + @IExtensionManagementService private extensionManagementService: IExtensionManagementService, + @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService + ) { + } + + openReporter(dataOverrides: Partial = {}): TPromise { + return this.extensionManagementService.getInstalled(LocalExtensionType.User).then(extensions => { + const enabledExtensions = extensions.filter(extension => this.extensionEnablementService.isEnabled({ id: getGalleryExtensionIdFromLocal(extension) })); + const theme = this.themeService.getTheme(); + const issueReporterData: IssueReporterData = assign( + { + styles: getIssueReporterStyles(theme), + zoomLevel: webFrame.getZoomLevel(), + enabledExtensions + }, + dataOverrides); + + return this.issueService.openReporter(issueReporterData); + }); + } +} + +export function getIssueReporterStyles(theme: ITheme): IssueReporterStyles { + return { + backgroundColor: theme.getColor(SIDE_BAR_BACKGROUND) && theme.getColor(SIDE_BAR_BACKGROUND).toString(), + color: theme.getColor(foreground).toString(), + textLinkColor: theme.getColor(textLinkForeground) && theme.getColor(textLinkForeground).toString(), + inputBackground: theme.getColor(inputBackground) && theme.getColor(inputBackground).toString(), + inputForeground: theme.getColor(inputForeground) && theme.getColor(inputForeground).toString(), + inputBorder: theme.getColor(inputBorder) && theme.getColor(inputBorder).toString(), + inputActiveBorder: theme.getColor(inputActiveOptionBorder) && theme.getColor(inputActiveOptionBorder).toString(), + inputErrorBorder: theme.getColor(inputValidationErrorBorder) && theme.getColor(inputValidationErrorBorder).toString(), + buttonBackground: theme.getColor(buttonBackground) && theme.getColor(buttonBackground).toString(), + buttonForeground: theme.getColor(buttonForeground) && theme.getColor(buttonForeground).toString(), + buttonHoverBackground: theme.getColor(buttonHoverBackground) && theme.getColor(buttonHoverBackground).toString(), + sliderActiveColor: theme.getColor(scrollbarSliderActiveBackground) && theme.getColor(scrollbarSliderActiveBackground).toString(), + sliderBackgroundColor: theme.getColor(scrollbarSliderBackground) && theme.getColor(scrollbarSliderBackground).toString(), + sliderHoverColor: theme.getColor(scrollbarSliderHoverBackground) && theme.getColor(scrollbarSliderHoverBackground).toString() + }; +} diff --git a/src/vs/workbench/services/progress/browser/progressService2.ts b/src/vs/workbench/services/progress/browser/progressService2.ts index ad8d9889ea9..cf356213af6 100644 --- a/src/vs/workbench/services/progress/browser/progressService2.ts +++ b/src/vs/workbench/services/progress/browser/progressService2.ts @@ -73,6 +73,8 @@ export class ProgressService2 implements IProgressService2 { switch (location) { case ProgressLocation.Window: return this._withWindowProgress(options, task); + case ProgressLocation.Explorer: + return this._withViewletProgress('workbench.view.explorer', task); case ProgressLocation.Scm: return this._withViewletProgress('workbench.view.scm', task); case ProgressLocation.Extensions: diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index a38556247ef..3351afcca3c 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -160,15 +160,20 @@ export function rgErrorMsgForDisplay(msg: string): string | undefined { return firstLine.charAt(0).toUpperCase() + firstLine.substr(1); } + if (strings.startsWith(firstLine, 'Literal ')) { + // e.g. "Literal \n not allowed" + return firstLine; + } + return undefined; } export class RipgrepParser extends EventEmitter { - private static readonly RESULT_REGEX = /^\u001b\[m(\d+)\u001b\[m:(.*)(\r?)/; - private static readonly FILE_REGEX = /^\u001b\[m(.+)\u001b\[m$/; + private static readonly RESULT_REGEX = /^\u001b\[0m(\d+)\u001b\[0m:(.*)(\r?)/; + private static readonly FILE_REGEX = /^\u001b\[0m(.+)\u001b\[0m$/; - public static readonly MATCH_START_MARKER = '\u001b[m\u001b[31m'; - public static readonly MATCH_END_MARKER = '\u001b[m'; + public static readonly MATCH_START_MARKER = '\u001b[0m\u001b[31m'; + public static readonly MATCH_END_MARKER = '\u001b[0m'; private fileMatch: FileMatch; private remainder: string; diff --git a/src/vs/workbench/services/search/node/searchService.ts b/src/vs/workbench/services/search/node/searchService.ts index 2f71778178a..74dc6cccde9 100644 --- a/src/vs/workbench/services/search/node/searchService.ts +++ b/src/vs/workbench/services/search/node/searchService.ts @@ -158,7 +158,7 @@ export class SearchService implements ISearchService { } // Support untitled files - if (resource.scheme === 'untitled') { + if (resource.scheme === Schemas.untitled) { if (!this.untitledEditorService.exists(resource)) { return; } @@ -168,7 +168,7 @@ export class SearchService implements ISearchService { // todo@remote // why is that? we should search for resources from other // schemes - else if (resource.scheme !== 'file') { + else if (resource.scheme !== Schemas.file) { return; } @@ -197,7 +197,7 @@ export class SearchService implements ISearchService { private matches(resource: uri, query: ISearchQuery): boolean { // file pattern if (query.filePattern) { - if (resource.scheme !== 'file') { + if (resource.scheme !== Schemas.file) { return false; // if we match on file pattern, we have to ignore non file resources } @@ -208,7 +208,7 @@ export class SearchService implements ISearchService { // includes if (query.includePattern) { - if (resource.scheme !== 'file') { + if (resource.scheme !== Schemas.file) { return false; // if we match on file patterns, we have to ignore non file resources } } 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 71b2546f9a7..6f430e397a2 100644 --- a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts +++ b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts @@ -20,11 +20,11 @@ suite('RipgrepParser', () => { const fileSectionEnd = '\n'; function getFileLine(relativePath: string): string { - return `\u001b\[m${relativePath}\u001b\[m`; + return `\u001b\[0m${relativePath}\u001b\[0m`; } function getMatchLine(lineNum: number, matchParts: string[]): string { - let matchLine = `\u001b\[m${lineNum}\u001b\[m:` + + let matchLine = `\u001b\[0m${lineNum}\u001b\[0m:` + `${matchParts.shift()}${RipgrepParser.MATCH_START_MARKER}${matchParts.shift()}${RipgrepParser.MATCH_END_MARKER}${matchParts.shift()}`; while (matchParts.length) { @@ -156,21 +156,21 @@ suite('RipgrepParser', () => { }); 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'; + const text = getFileLine('foo/bar') + '\n' + getMatchLine(0, ['before漢', 'match', 'after']) + '\n'; + const buf = new Buffer(text); - // 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))]) - ]; + // Split the buffer at every possible position - it should still be parsed correctly + for (let i = 0; i < buf.length; i++) { + const inputBufs = [ + buf.slice(0, i), + buf.slice(i) + ]; - 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]]); + 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]]); + } }); }); 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 2a18075876d..c50c1e9e158 100644 --- a/src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts +++ b/src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts @@ -61,7 +61,7 @@ function doLegacySearchTest(config: IRawSearch, expectedResultCount: number | Fu }); } -function doRipgrepSearchTest(config: IRawSearch, expectedResultCount: number): TPromise { +function doRipgrepSearchTest(config: IRawSearch, expectedResultCount: number | Function): TPromise { return new TPromise((resolve, reject) => { let engine = new RipgrepEngine(config); diff --git a/src/vs/workbench/services/textMate/electron-browser/TMHelper.ts b/src/vs/workbench/services/textMate/electron-browser/TMHelper.ts index 877f4885fc1..7d3e2f188d4 100644 --- a/src/vs/workbench/services/textMate/electron-browser/TMHelper.ts +++ b/src/vs/workbench/services/textMate/electron-browser/TMHelper.ts @@ -7,11 +7,11 @@ import { IColorTheme, ITokenColorizationSetting } from 'vs/workbench/services/themes/common/workbenchThemeService'; -export function findMatchingThemeRule(theme: IColorTheme, scopes: string[]): ThemeRule { +export function findMatchingThemeRule(theme: IColorTheme, scopes: string[], onlyColorRules: boolean = true): ThemeRule { for (let i = scopes.length - 1; i >= 0; i--) { let parentScopes = scopes.slice(0, i); let scope = scopes[i]; - let r = findMatchingThemeRule2(theme, scope, parentScopes); + let r = findMatchingThemeRule2(theme, scope, parentScopes, onlyColorRules); if (r) { return r; } @@ -19,13 +19,13 @@ export function findMatchingThemeRule(theme: IColorTheme, scopes: string[]): The return null; } -function findMatchingThemeRule2(theme: IColorTheme, scope: string, parentScopes: string[]): ThemeRule { +function findMatchingThemeRule2(theme: IColorTheme, scope: string, parentScopes: string[], onlyColorRules: boolean): ThemeRule { let result: ThemeRule = null; // Loop backwards, to ensure the last most specific rule wins for (let i = theme.tokenColors.length - 1; i >= 0; i--) { let rule = theme.tokenColors[i]; - if (!rule.settings.foreground) { + if (onlyColorRules && !rule.settings.foreground) { continue; } diff --git a/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts b/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts index 4a4003ddab8..94dbc8c6197 100644 --- a/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts +++ b/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts @@ -145,7 +145,7 @@ export class TextMateService implements ITextMateService { let defaultBackground: Color = Color.transparent; for (let i = 0, len = colorTheme.tokenColors.length; i < len; i++) { let rule = colorTheme.tokenColors[i]; - if (!rule.scope) { + if (!rule.scope && rule.settings) { if (rule.settings.foreground) { defaultForeground = Color.fromHex(rule.settings.foreground); } diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 42f1d466370..6aa4e0f9073 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -22,7 +22,7 @@ import { IFileService, IResolveContentOptions, IFilesConfiguration, FileOperatio import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IUntitledEditorService } 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'; @@ -231,9 +231,9 @@ export abstract class TextFileService implements ITextFileService { const filesToBackup: ITextFileEditorModel[] = []; const untitledToBackup: URI[] = []; dirtyToBackup.forEach(s => { - if (s.scheme === Schemas.file) { + if (this.fileService.canHandleResource(s)) { filesToBackup.push(textFileEditorModelManager.get(s)); - } else if (s.scheme === UNTITLED_SCHEMA) { + } else if (s.scheme === Schemas.untitled) { untitledToBackup.push(s); } }); @@ -390,7 +390,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 === Schemas.file && !this.isDirty(resource)) { + if (options && options.force && this.fileService.canHandleResource(resource) && !this.isDirty(resource)) { const model = this._models.get(resource); if (model) { model.save({ force: true, reason: SaveReason.EXPLICIT }).then(() => !model.isDirty()); @@ -416,7 +416,7 @@ export abstract class TextFileService implements ITextFileService { const filesToSave: URI[] = []; const untitledToSave: URI[] = []; toSave.forEach(s => { - if ((Array.isArray(arg1) || arg1 === true /* includeUntitled */) && s.scheme === UNTITLED_SCHEMA) { + if ((Array.isArray(arg1) || arg1 === true /* includeUntitled */) && s.scheme === Schemas.untitled) { untitledToSave.push(s); } else { filesToSave.push(s); @@ -540,7 +540,7 @@ export abstract class TextFileService implements ITextFileService { targetPromise = TPromise.wrap(target); } else { let dialogPath = resource.fsPath; - if (resource.scheme === UNTITLED_SCHEMA) { + if (resource.scheme === Schemas.untitled) { dialogPath = this.suggestFileName(resource); } @@ -572,9 +572,9 @@ export abstract class TextFileService implements ITextFileService { // Retrieve text model from provided resource if any let modelPromise: TPromise = TPromise.as(null); - if (resource.scheme === Schemas.file) { + if (this.fileService.canHandleResource(resource)) { modelPromise = TPromise.as(this._models.get(resource)); - } else if (resource.scheme === UNTITLED_SCHEMA && this.untitledEditorService.exists(resource)) { + } else if (resource.scheme === Schemas.untitled && this.untitledEditorService.exists(resource)) { modelPromise = this.untitledEditorService.loadOrCreate({ resource }); } diff --git a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts index 129a84d5081..7c9c4ada5f3 100644 --- a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts +++ b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts @@ -15,7 +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 { ITextModelService, ITextModelContentProvider, ITextEditorModel } from 'vs/editor/common/services/resolverService'; -import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel'; class ResourceModelCollection extends ReferenceCollection> { @@ -119,7 +119,7 @@ export class TextModelResolverService implements ITextModelService { // Untitled Schema: go through cached input // TODO ImmortalReference is a hack - if (resource.scheme === UNTITLED_SCHEMA) { + if (resource.scheme === network.Schemas.untitled) { return this.untitledEditorService.loadOrCreate({ resource }).then(model => new ImmortalReference(model)); } diff --git a/src/vs/workbench/services/themes/common/colorThemeSchema.ts b/src/vs/workbench/services/themes/common/colorThemeSchema.ts index bfaae07ad34..afad62e2e4c 100644 --- a/src/vs/workbench/services/themes/common/colorThemeSchema.ts +++ b/src/vs/workbench/services/themes/common/colorThemeSchema.ts @@ -130,12 +130,13 @@ export const tokenColorizationSettingSchema: IJSONSchema = { }, fontStyle: { type: 'string', - description: nls.localize('schema.token.fontStyle', 'Font style of the rule: One or a combination of \'italic\', \'bold\' and \'underline\''), + description: nls.localize('schema.token.fontStyle', 'Font style of the rule: \'italic\', \'bold\' or \'underline\' or a combination. The empty string unsets inherited settings.'), pattern: '^(\\s*\\b(italic|bold|underline))*\\s*$', - patternErrorMessage: nls.localize('schema.fontStyle.error', 'Font style must be a combination of \'italic\', \'bold\' and \'underline\''), - defaultSnippets: [{ body: 'italic' }, { body: 'bold' }, { body: 'underline' }, { body: 'italic bold' }, { body: 'italic underline' }, { body: 'bold underline' }, { body: 'italic bold underline' }] + patternErrorMessage: nls.localize('schema.fontStyle.error', 'Font style must be \'italic\', \'bold\' or \'underline\' or a combination or the empty string.'), + defaultSnippets: [{ label: nls.localize('schema.token.fontStyle.none', 'None (clear inherited style)'), bodyText: '""' }, { body: 'italic' }, { body: 'bold' }, { body: 'underline' }, { body: 'italic bold' }, { body: 'italic underline' }, { body: 'bold underline' }, { body: 'italic bold underline' }] } }, + additionalProperties: false, defaultSnippets: [{ body: { foreground: '${1:#FF0000}', fontStyle: '${2:bold}' } }] }; @@ -175,8 +176,12 @@ export function tokenColorsSchema(description: string): IJSONSchema { } ] }, - settings: tokenColorizationSettingSchema - } + settings: tokenColorizationSettingSchema, + }, + required: [ + 'settings', 'scope' + ], + additionalProperties: false } }; } diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index fd7ad73cded..88ef1ca355d 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -81,11 +81,10 @@ export class ColorThemeData implements IColorTheme { public setCustomColors(colors: IColorCustomizations) { this.customColorMap = {}; this.overwriteCustomColors(colors); - if (`[${this.settingsId}]` in colors) { - const themeSpecificColors = (colors[`[${this.settingsId}]`] || {}) as IColorCustomizations; - if (types.isObject(themeSpecificColors)) { - this.overwriteCustomColors(themeSpecificColors); - } + + const themeSpecificColors = colors[`[${this.settingsId}]`] as IColorCustomizations; + if (types.isObject(themeSpecificColors)) { + this.overwriteCustomColors(themeSpecificColors); } if (this.themeTokenColors && this.themeTokenColors.length) { updateDefaultRuleSettings(this.themeTokenColors[0], this); @@ -103,43 +102,38 @@ export class ColorThemeData implements IColorTheme { public setCustomTokenColors(customTokenColors: ITokenColorCustomizations) { this.customTokenColors = []; - let customTokenColorsWithoutThemeSpecific: ITokenColorCustomizations = {}; - for (let key in customTokenColors) { - if (key[0] !== '[') { - customTokenColorsWithoutThemeSpecific[key] = customTokenColors[key]; - } - } - this.addCustomTokenColors(customTokenColorsWithoutThemeSpecific); - if (`[${this.settingsId}]` in customTokenColors) { - const themeSpecificTokenColors: ITokenColorCustomizations = customTokenColors[`[${this.settingsId}]`]; - if (types.isObject(themeSpecificTokenColors)) { - this.addCustomTokenColors(themeSpecificTokenColors); - } + // first add the non-theme specific settings + this.addCustomTokenColors(customTokenColors); + + // append theme specific settings. Last rules will win. + const themeSpecificTokenColors = customTokenColors[`[${this.settingsId}]`] as ITokenColorCustomizations; + if (types.isObject(themeSpecificTokenColors)) { + this.addCustomTokenColors(themeSpecificTokenColors); } } private addCustomTokenColors(customTokenColors: ITokenColorCustomizations) { - let generalRules: ITokenColorizationRule[] = []; - - Object.keys(tokenGroupToScopesMap).forEach(key => { - let value = customTokenColors[key]; - if (value) { - let settings = typeof value === 'string' ? { foreground: value } : value; - let scopes = tokenGroupToScopesMap[key]; - for (let scope of scopes) { - generalRules.push({ - scope, - settings - }); - } - } - }); - - const textMateRules: ITokenColorizationRule[] = customTokenColors.textMateRules || []; - // Put the general customizations such as comments, strings, etc. first so that // they can be overridden by specific customizations like "string.interpolated" - this.customTokenColors = this.customTokenColors.concat(generalRules, textMateRules); + for (let tokenGroup in tokenGroupToScopesMap) { + let value = customTokenColors[tokenGroup]; + if (value) { + let settings = typeof value === 'string' ? { foreground: value } : value; + let scopes = tokenGroupToScopesMap[tokenGroup]; + for (let scope of scopes) { + this.customTokenColors.push({ scope, settings }); + } + } + } + + // specific customizations + if (Array.isArray(customTokenColors.textMateRules)) { + for (let rule of customTokenColors.textMateRules) { + if (rule.scope && rule.settings) { + this.customTokenColors.push(rule); + } + } + } } public ensureLoaded(themeService: WorkbenchThemeService): TPromise { @@ -155,13 +149,13 @@ export class ColorThemeData implements IColorTheme { } /** - * Place the default settings first and add add the token-info rules + * Place the default settings first and add the token-info rules */ private sanitizeTokenColors() { let hasDefaultTokens = false; let updatedTokenColors: ITokenColorizationRule[] = [updateDefaultRuleSettings({ settings: {} }, this)]; - this.tokenColors.forEach(rule => { - if (rule.scope) { + this.themeTokenColors.forEach(rule => { + if (rule.scope && rule.settings) { if (rule.scope === 'token.info-token') { hasDefaultTokens = true; } diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 44674eadfef..6aff720a1c3 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -119,7 +119,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { // 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 themeData: ColorThemeData = null; let persistedThemeData = this.storageService.get(PERSISTED_THEME_STORAGE_KEY); if (persistedThemeData) { themeData = ColorThemeData.fromStorageData(persistedThemeData); diff --git a/src/vs/workbench/services/untitled/common/untitledEditorService.ts b/src/vs/workbench/services/untitled/common/untitledEditorService.ts index 6806f656748..fed40daa61a 100644 --- a/src/vs/workbench/services/untitled/common/untitledEditorService.ts +++ b/src/vs/workbench/services/untitled/common/untitledEditorService.ts @@ -18,8 +18,6 @@ import { Schemas } from 'vs/base/common/network'; export const IUntitledEditorService = createDecorator('untitledEditorService'); -export const UNTITLED_SCHEMA = 'untitled'; - export interface IModelLoadOrCreateOptions { resource?: URI; modeId?: string; @@ -204,7 +202,7 @@ export class UntitledEditorService implements IUntitledEditorService { let hasAssociatedFilePath = false; if (resource) { hasAssociatedFilePath = (resource.scheme === Schemas.file); - resource = resource.with({ scheme: UNTITLED_SCHEMA }); // ensure we have the right scheme + resource = resource.with({ scheme: Schemas.untitled }); // ensure we have the right scheme if (hasAssociatedFilePath) { this.mapResourceToAssociatedFilePath.set(resource, true); // remember for future lookups @@ -226,7 +224,7 @@ export class UntitledEditorService implements IUntitledEditorService { // Create new taking a resource URI that is not already taken let counter = this.mapResourceToInput.size + 1; do { - resource = URI.from({ scheme: UNTITLED_SCHEMA, path: `Untitled-${counter}` }); + resource = URI.from({ scheme: Schemas.untitled, path: `Untitled-${counter}` }); counter++; } while (this.mapResourceToInput.has(resource)); } diff --git a/src/vs/workbench/services/viewlet/browser/viewletService.ts b/src/vs/workbench/services/viewlet/browser/viewletService.ts index 81fb34c7881..414a9b65990 100644 --- a/src/vs/workbench/services/viewlet/browser/viewletService.ts +++ b/src/vs/workbench/services/viewlet/browser/viewletService.ts @@ -13,6 +13,11 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { ViewletDescriptor, ViewletRegistry, Extensions as ViewletExtensions } from 'vs/workbench/browser/viewlet'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IProgressService } from 'vs/platform/progress/common/progress'; +import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { dispose, IDisposable } from 'vs/base/common/lifecycle'; + +const ActiveViewletContextId = 'activeViewlet'; +export const ActiveViewletContext = new RawContextKey(ActiveViewletContextId, ''); export class ViewletService implements IViewletService { @@ -24,20 +29,40 @@ export class ViewletService implements IViewletService { private extensionViewlets: ViewletDescriptor[]; private extensionViewletsLoaded: TPromise; private extensionViewletsLoadedPromiseComplete: ValueCallback; + private activeViewletContextKey: IContextKey; + private disposables: IDisposable[] = []; public get onDidViewletOpen(): Event { return this.sidebarPart.onDidViewletOpen; } public get onDidViewletClose(): Event { return this.sidebarPart.onDidViewletClose; } constructor( sidebarPart: SidebarPart, - @IExtensionService private extensionService: IExtensionService + @IExtensionService private extensionService: IExtensionService, + @IContextKeyService contextKeyService: IContextKeyService ) { this.sidebarPart = sidebarPart; this.viewletRegistry = Registry.as(ViewletExtensions.Viewlets); + this.activeViewletContextKey = ActiveViewletContext.bindTo(contextKeyService); + + this.onDidViewletOpen(this._onDidViewletOpen, this, this.disposables); + this.onDidViewletClose(this._onDidViewletClose, this, this.disposables); + this.loadExtensionViewlets(); } + private _onDidViewletOpen(viewlet: IViewlet): void { + this.activeViewletContextKey.set(viewlet.getId()); + } + + private _onDidViewletClose(viewlet: IViewlet): void { + const id = viewlet.getId(); + + if (this.activeViewletContextKey.get() === id) { + this.activeViewletContextKey.set(''); + } + } + private loadExtensionViewlets(): void { this.extensionViewlets = []; @@ -104,4 +129,8 @@ export class ViewletService implements IViewletService { public getProgressIndicator(id: string): IProgressService { return this.sidebarPart.getProgressIndicator(id); } + + dispose(): void { + this.disposables = dispose(this.disposables); + } } diff --git a/src/vs/workbench/services/workspace/node/workspaceEditingService.ts b/src/vs/workbench/services/workspace/node/workspaceEditingService.ts index c35254fc87f..6cf2752ff79 100644 --- a/src/vs/workbench/services/workspace/node/workspaceEditingService.ts +++ b/src/vs/workbench/services/workspace/node/workspaceEditingService.ts @@ -73,15 +73,28 @@ export class WorkspaceEditingService implements IWorkspaceEditingService { } // Add & Delete Folders - if (this.includesSingleFolderWorkspace(foldersToDelete)) { + else { + // if we are in single-folder state and the folder is replaced with // other folders, we handle this specially and just enter workspace // mode with the folders that are being added. - return this.createAndEnterWorkspace(foldersToAdd); - } + if (this.includesSingleFolderWorkspace(foldersToDelete)) { + return this.createAndEnterWorkspace(foldersToAdd); + } - // Make sure to first remove folders and then add them to account for folders being updated - return this.removeFolders(foldersToDelete).then(() => this.doAddFolders(foldersToAdd, index, donotNotifyError)); + // if we are not in workspace-state, we just add the folders + if (this.contextService.getWorkbenchState() !== WorkbenchState.WORKSPACE) { + return this.doAddFolders(foldersToAdd, index, donotNotifyError); + } + + // finally, update folders within the workspace + return this.doUpdateFolders(foldersToAdd, foldersToDelete, index, donotNotifyError); + } + } + + private doUpdateFolders(foldersToAdd: IWorkspaceFolderCreationData[], foldersToDelete: URI[], index?: number, donotNotifyError: boolean = false): TPromise { + return this.contextService.updateFolders(foldersToAdd, foldersToDelete, index) + .then(() => null, error => donotNotifyError ? TPromise.wrapError(error) : this.handleWorkspaceConfigurationEditingError(error)); } public addFolders(foldersToAdd: IWorkspaceFolderCreationData[], donotNotifyError: boolean = false): TPromise { diff --git a/src/vs/workbench/test/common/editor/editor.test.ts b/src/vs/workbench/test/common/editor/editor.test.ts index fecaf291d09..f1f983df23b 100644 --- a/src/vs/workbench/test/common/editor/editor.test.ts +++ b/src/vs/workbench/test/common/editor/editor.test.ts @@ -14,6 +14,7 @@ import URI from 'vs/base/common/uri'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { workbenchInstantiationService } from 'vs/workbench/test/workbenchTestServices'; +import { Schemas } from 'vs/base/common/network'; class ServiceAccessor { constructor( @IUntitledEditorService public untitledEditorService: UntitledEditorService) { @@ -63,26 +64,26 @@ suite('Workbench - Editor', () => { assert.equal(toResource(untitled).toString(), untitled.getResource().toString()); assert.equal(toResource(untitled, { supportSideBySide: true }).toString(), untitled.getResource().toString()); - assert.equal(toResource(untitled, { filter: 'untitled' }).toString(), untitled.getResource().toString()); - assert.equal(toResource(untitled, { filter: ['file', 'untitled'] }).toString(), untitled.getResource().toString()); - assert.ok(!toResource(untitled, { filter: 'file' })); + assert.equal(toResource(untitled, { filter: Schemas.untitled }).toString(), untitled.getResource().toString()); + assert.equal(toResource(untitled, { filter: [Schemas.file, Schemas.untitled] }).toString(), untitled.getResource().toString()); + assert.ok(!toResource(untitled, { filter: Schemas.file })); const file = new FileEditorInput(URI.file('/some/path.txt')); assert.equal(toResource(file).toString(), file.getResource().toString()); assert.equal(toResource(file, { supportSideBySide: true }).toString(), file.getResource().toString()); - assert.equal(toResource(file, { filter: 'file' }).toString(), file.getResource().toString()); - assert.equal(toResource(file, { filter: ['file', 'untitled'] }).toString(), file.getResource().toString()); - assert.ok(!toResource(file, { filter: 'untitled' })); + assert.equal(toResource(file, { filter: Schemas.file }).toString(), file.getResource().toString()); + assert.equal(toResource(file, { filter: [Schemas.file, Schemas.untitled] }).toString(), file.getResource().toString()); + assert.ok(!toResource(file, { filter: Schemas.untitled })); const diffEditorInput = new DiffEditorInput('name', 'description', untitled, file); assert.ok(!toResource(diffEditorInput)); - assert.ok(!toResource(diffEditorInput, { filter: 'file' })); + assert.ok(!toResource(diffEditorInput, { filter: Schemas.file })); assert.ok(!toResource(diffEditorInput, { supportSideBySide: false })); assert.equal(toResource(file, { supportSideBySide: true }).toString(), file.getResource().toString()); - assert.equal(toResource(file, { supportSideBySide: true, filter: 'file' }).toString(), file.getResource().toString()); - assert.equal(toResource(file, { supportSideBySide: true, filter: ['file', 'untitled'] }).toString(), file.getResource().toString()); + assert.equal(toResource(file, { supportSideBySide: true, filter: Schemas.file }).toString(), file.getResource().toString()); + assert.equal(toResource(file, { supportSideBySide: true, filter: [Schemas.file, Schemas.untitled] }).toString(), file.getResource().toString()); }); }); \ No newline at end of file diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts index 8ec74bfb073..d50d46f226a 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts @@ -298,7 +298,7 @@ suite('ExtHostDocumentSaveParticipant', () => { let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) { // concurrent change from somewhere - documents.$acceptModelChanged(resource.toString(), { + documents.$acceptModelChanged(resource, { changes: [{ range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 }, rangeLength: undefined, @@ -332,7 +332,7 @@ suite('ExtHostDocumentSaveParticipant', () => { const { resource, edits } = edit; const uri = URI.revive(resource); for (const { text, range } of edits) { - documents.$acceptModelChanged(uri.toString(), { + documents.$acceptModelChanged(uri, { changes: [{ range, text, diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts index b171ace99f9..aab5a265951 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts @@ -52,7 +52,7 @@ suite('ExtHostDocumentsAndEditors', () => { }); editors.$acceptDocumentsAndEditorsDelta({ - removedDocuments: ['foo:bar'] + removedDocuments: [URI.parse('foo:bar')] }); }); 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 ed06fa678dc..8b5142d85ee 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts @@ -11,6 +11,30 @@ import { MainThreadMessageService } from 'vs/workbench/api/electron-browser/main import { TPromise as Promise } from 'vs/base/common/winjs.base'; import { IMessageService, IChoiceService } from 'vs/platform/message/common/message'; +const emptyChoiceService = new class implements IChoiceService { + _serviceBrand: 'choiceService'; + choose(severity, message, options, modal): never { + throw new Error('not implemented'); + } +}; + + +const emptyMesssageService = new class implements IMessageService { + _serviceBrand: 'messageService'; + show(...args: any[]): never { + throw new Error('not implemented'); + } + hideAll(): void { + throw new Error('not implemented.'); + } + confirm(confirmation): never { + throw new Error('not implemented.'); + } + confirmWithCheckbox(confirmation): never { + throw new Error('not implemented.'); + } +}; + suite('ExtHostMessageService', function () { test('propagte handle on select', function () { @@ -21,11 +45,7 @@ suite('ExtHostMessageService', function () { setImmediate(() => m.actions[0].run()); return () => { }; } - } as IMessageService, { - choose(severity, message, options, modal) { - throw new Error('not implemented'); - } - } as IChoiceService); + } as IMessageService, emptyChoiceService); return service.$showMessage(1, 'h', {}, [{ handle: 42, title: 'a thing', isCloseAffordance: true }]).then(handle => { assert.equal(handle, 42); @@ -39,11 +59,7 @@ suite('ExtHostMessageService', function () { show(sev: number, m: { actions: Action[] }) { actions = m.actions; } - } as IMessageService, { - choose(severity, message, options, modal) { - throw new Error('not implemented'); - } - } as IChoiceService); + } as IMessageService, emptyChoiceService); // default close action service.$showMessage(1, '', {}, [{ title: 'a thing', isCloseAffordance: false, handle: 0 }]); @@ -71,11 +87,7 @@ suite('ExtHostMessageService', function () { c += 1; }; } - } as IMessageService, { - choose(severity, message, options, modal) { - throw new Error('not implemented'); - } - } as IChoiceService); + } as IMessageService, emptyChoiceService); service.$showMessage(1, '', {}, [{ title: 'a thing', isCloseAffordance: true, handle: 0 }]); assert.equal(actions.length, 1); @@ -86,11 +98,7 @@ suite('ExtHostMessageService', function () { suite('modal', () => { test('calls choice service', () => { - const service = new MainThreadMessageService(null, { - show(sev: number, m: { actions: Action[] }) { - throw new Error('not implemented'); - } - } as IMessageService, { + const service = new MainThreadMessageService(null, emptyMesssageService, { choose(severity, message, options, modal) { assert.equal(severity, 1); assert.equal(message, 'h'); @@ -106,11 +114,7 @@ suite('ExtHostMessageService', function () { }); test('returns undefined when cancelled', () => { - const service = new MainThreadMessageService(null, { - show(sev: number, m: { actions: Action[] }) { - throw new Error('not implemented'); - } - } as IMessageService, { + const service = new MainThreadMessageService(null, emptyMesssageService, { choose(severity, message, options, modal) { return Promise.as(1); } @@ -122,11 +126,7 @@ suite('ExtHostMessageService', function () { }); test('hides Cancel button when not needed', () => { - const service = new MainThreadMessageService(null, { - show(sev: number, m: { actions: Action[] }) { - throw new Error('not implemented'); - } - } as IMessageService, { + const service = new MainThreadMessageService(null, emptyMesssageService, { choose(severity, message, options, modal) { assert.equal(options.length, 1); return Promise.as(0); diff --git a/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts b/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts index 71dea5ec0fd..38e3479a08e 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts @@ -27,7 +27,7 @@ suite('ExtHostTreeView', function () { onRefresh = new Emitter<{ [treeItemHandle: string]: ITreeItem }>(); - $registerView(treeViewId: string): void { + $registerTreeViewDataProvider(treeViewId: string): void { } $refresh(viewId: string, itemsToRefresh?: { [treeItemHandle: string]: ITreeItem }): void { @@ -72,7 +72,7 @@ suite('ExtHostTreeView', function () { testObject.registerTreeDataProvider('testNodeTreeProvider', aNodeTreeDataProvider()); testObject.registerTreeDataProvider('testNodeWithIdTreeProvider', aNodeWithIdTreeDataProvider()); - testObject.$getElements('testNodeTreeProvider').then(elements => { + testObject.$getChildren('testNodeTreeProvider').then(elements => { for (const element of elements) { testObject.$getChildren('testNodeTreeProvider', element.handle); } @@ -80,7 +80,7 @@ suite('ExtHostTreeView', function () { }); test('construct node tree', () => { - return testObject.$getElements('testNodeTreeProvider') + return testObject.$getChildren('testNodeTreeProvider') .then(elements => { const actuals = elements.map(e => e.handle); assert.deepEqual(actuals, ['0/0:a', '0/0:b']); @@ -108,7 +108,7 @@ suite('ExtHostTreeView', function () { }); test('construct id tree', () => { - return testObject.$getElements('testNodeWithIdTreeProvider') + return testObject.$getChildren('testNodeWithIdTreeProvider') .then(elements => { const actuals = elements.map(e => e.handle); assert.deepEqual(actuals, ['1/a', '1/b']); @@ -139,7 +139,7 @@ suite('ExtHostTreeView', function () { tree['a'] = { 'a': {} }; - return testObject.$getElements('testNodeWithIdTreeProvider') + return testObject.$getChildren('testNodeWithIdTreeProvider') .then(elements => { const actuals = elements.map(e => e.handle); assert.deepEqual(actuals, ['1/a', '1/b']); @@ -300,7 +300,7 @@ suite('ExtHostTreeView', function () { onDidChangeTreeNode.fire(); - return testObject.$getElements('testNodeTreeProvider') + return testObject.$getChildren('testNodeTreeProvider') .then(elements => { assert.deepEqual(elements.map(e => e.handle), ['0/0:a//0:b']); }); @@ -338,7 +338,7 @@ suite('ExtHostTreeView', function () { tree['f'] = {}; tree[dupItems['adup2']] = {}; - return testObject.$getElements('testNodeTreeProvider') + return testObject.$getChildren('testNodeTreeProvider') .then(elements => { const actuals = elements.map(e => e.handle); assert.deepEqual(actuals, ['0/0:a', '0/0:b', '0/1:a', '0/0:d', '0/1:b', '0/0:f', '0/2:a']); diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 0b7031c62fa..0910cc68b03 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -1220,6 +1220,10 @@ export class TestWindowsService implements IWindowsService { showOpenDialog(windowId: number, options: Electron.OpenDialogOptions): TPromise { return TPromise.as(void 0); } + + openAboutDialog(): TPromise { + return TPromise.as(void 0); + } } export class TestTextResourceConfigurationService implements ITextResourceConfigurationService { diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts index 8149e729d2a..e0e2837dfc8 100644 --- a/src/vs/workbench/workbench.main.ts +++ b/src/vs/workbench/workbench.main.ts @@ -22,7 +22,7 @@ import 'vs/platform/actions/electron-browser/menusExtensionPoint'; import 'vs/workbench/api/browser/viewsExtensionPoint'; // Localizations -import 'vs/platform/localizations/common/localizations'; +import 'vs/workbench/parts/localizations/browser/localizations.contribution'; // Workbench import 'vs/workbench/browser/actions/toggleActivityBarVisibility'; diff --git a/test/smoke/src/main.ts b/test/smoke/src/main.ts index 1fb74f4e732..8adeab24a78 100644 --- a/test/smoke/src/main.ts +++ b/test/smoke/src/main.ts @@ -125,7 +125,7 @@ process.env.VSCODE_KEYBINDINGS_PATH = keybindingsPath; let quality: Quality; if (process.env.VSCODE_DEV === '1') { quality = Quality.Dev; -} else if ((electronPath.indexOf('Code - Insiders') /* macOS/Windows */ || electronPath.indexOf('code-insiders') /* Linux */) >= 0) { +} else if (electronPath.indexOf('Code - Insiders') >= 0 /* macOS/Windows */ || electronPath.indexOf('code-insiders') /* Linux */ >= 0) { quality = Quality.Insiders; } else { quality = Quality.Stable; diff --git a/yarn.lock b/yarn.lock index d3cb258ba65..416ceab8be1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6001,9 +6001,9 @@ vscode-nls-dev@3.0.7: xml2js "^0.4.19" yargs "^10.1.1" -vscode-ripgrep@^0.7.1-patch.0: - version "0.7.1-patch.0" - resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-0.7.1-patch.0.tgz#738be8b6da5cb9a8807b528595a884b0dfcb60a5" +vscode-ripgrep@0.7.1-patch.1.1: + version "0.7.1-patch.1.1" + resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-0.7.1-patch.1.1.tgz#d5fd19979998ccd040fd54c144c4190135e9e5c2" vscode-textmate@^3.2.0: version "3.2.0" @@ -6012,9 +6012,9 @@ vscode-textmate@^3.2.0: fast-plist "^0.1.2" oniguruma "^6.0.1" -vscode-xterm@3.1.0-beta15: - version "3.1.0-beta15" - resolved "https://registry.yarnpkg.com/vscode-xterm/-/vscode-xterm-3.1.0-beta15.tgz#d0b5353fb1fd574ccd023c67c71957b9b0f158c5" +vscode-xterm@3.2.0-beta1: + version "3.2.0-beta1" + resolved "https://registry.yarnpkg.com/vscode-xterm/-/vscode-xterm-3.2.0-beta1.tgz#31ef2abaad87dd654cc538780d450a399e687469" vso-node-api@^6.1.2-preview: version "6.1.2-preview"