mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Merge branch 'main' into notebook/dev
This commit is contained in:
commit
23fb420737
2
extensions/dart/.vscodeignore
Normal file
2
extensions/dart/.vscodeignore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
build/**
|
||||||
|
cgmanifest.json
|
46
extensions/dart/cgmanifest.json
Normal file
46
extensions/dart/cgmanifest.json
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
{
|
||||||
|
"registrations": [
|
||||||
|
{
|
||||||
|
"component": {
|
||||||
|
"type": "git",
|
||||||
|
"git": {
|
||||||
|
"name": "dart-lang/dart-syntax-highlight",
|
||||||
|
"repositoryUrl": "https://github.com/dart-lang/dart-syntax-highlight",
|
||||||
|
"commitHash": "65f211722c85e9fdf0aa658d5663e6ccaf2ebe25"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"licenseDetail": [
|
||||||
|
"Copyright 2020, the Dart project authors.",
|
||||||
|
"",
|
||||||
|
"Redistribution and use in source and binary forms, with or without",
|
||||||
|
"modification, are permitted provided that the following conditions are",
|
||||||
|
"met:",
|
||||||
|
"",
|
||||||
|
" * Redistributions of source code must retain the above copyright",
|
||||||
|
" notice, this list of conditions and the following disclaimer.",
|
||||||
|
" * Redistributions in binary form must reproduce the above",
|
||||||
|
" copyright notice, this list of conditions and the following",
|
||||||
|
" disclaimer in the documentation and/or other materials provided",
|
||||||
|
" with the distribution.",
|
||||||
|
" * Neither the name of Google LLC nor the names of its",
|
||||||
|
" contributors may be used to endorse or promote products derived",
|
||||||
|
" from this software without specific prior written permission.",
|
||||||
|
"",
|
||||||
|
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS",
|
||||||
|
"\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT",
|
||||||
|
"LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR",
|
||||||
|
"A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT",
|
||||||
|
"OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,",
|
||||||
|
"SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT",
|
||||||
|
"LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,",
|
||||||
|
"DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY",
|
||||||
|
"THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT",
|
||||||
|
"(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE",
|
||||||
|
"OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||||
|
],
|
||||||
|
"license": "BSD",
|
||||||
|
"version": "0.0.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 1
|
||||||
|
}
|
29
extensions/dart/language-configuration.json
Normal file
29
extensions/dart/language-configuration.json
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"comments": {
|
||||||
|
"lineComment": "//",
|
||||||
|
"blockComment": [ "/*", "*/" ]
|
||||||
|
},
|
||||||
|
"brackets": [
|
||||||
|
["{", "}"],
|
||||||
|
["[", "]"],
|
||||||
|
["(", ")"]
|
||||||
|
],
|
||||||
|
"autoClosingPairs": [
|
||||||
|
{ "open": "{", "close": "}" },
|
||||||
|
{ "open": "[", "close": "]" },
|
||||||
|
{ "open": "(", "close": ")" },
|
||||||
|
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
|
||||||
|
{ "open": "\"", "close": "\"", "notIn": ["string"] },
|
||||||
|
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
|
||||||
|
{ "open": "/**", "close": " */", "notIn": ["string"] }
|
||||||
|
],
|
||||||
|
"surroundingPairs": [
|
||||||
|
["{", "}"],
|
||||||
|
["[", "]"],
|
||||||
|
["(", ")"],
|
||||||
|
["<", ">"],
|
||||||
|
["'", "'"],
|
||||||
|
["\"", "\""],
|
||||||
|
["`", "`"]
|
||||||
|
]
|
||||||
|
}
|
35
extensions/dart/package.json
Normal file
35
extensions/dart/package.json
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"name": "dart",
|
||||||
|
"displayName": "%displayName%",
|
||||||
|
"description": "%description%",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"publisher": "vscode",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"vscode": "0.10.x"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"update-grammar": "node ../node_modules/vscode-grammar-updater/bin dart-lang/dart-syntax-highlight grammars/dart.json ./syntaxes/dart.tmLanguage.json"
|
||||||
|
},
|
||||||
|
"contributes": {
|
||||||
|
"languages": [
|
||||||
|
{
|
||||||
|
"id": "dart",
|
||||||
|
"extensions": [
|
||||||
|
".dart"
|
||||||
|
],
|
||||||
|
"aliases": [
|
||||||
|
"Dart"
|
||||||
|
],
|
||||||
|
"configuration": "./syntaxes/dart-language-configuration.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"grammars": [
|
||||||
|
{
|
||||||
|
"language": "dart",
|
||||||
|
"scopeName": "source.dart",
|
||||||
|
"path": "./syntaxes/dart.tmLanguage.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
4
extensions/dart/package.nls.json
Normal file
4
extensions/dart/package.nls.json
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"displayName": "Dart Language Basics",
|
||||||
|
"description": "Provides syntax highlighting & bracket matching in Dart files."
|
||||||
|
}
|
439
extensions/dart/syntaxes/dart.tmLanguage.json
Normal file
439
extensions/dart/syntaxes/dart.tmLanguage.json
Normal file
|
@ -0,0 +1,439 @@
|
||||||
|
{
|
||||||
|
"information_for_contributors": [
|
||||||
|
"This file has been converted from https://github.com/dart-lang/dart-syntax-highlight/blob/master/grammars/dart.json",
|
||||||
|
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||||
|
"Once accepted there, we are happy to receive an update request."
|
||||||
|
],
|
||||||
|
"version": "https://github.com/dart-lang/dart-syntax-highlight/commit/65f211722c85e9fdf0aa658d5663e6ccaf2ebe25",
|
||||||
|
"name": "Dart",
|
||||||
|
"scopeName": "source.dart",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "meta.preprocessor.script.dart",
|
||||||
|
"match": "^(#!.*)$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "meta.declaration.dart",
|
||||||
|
"begin": "^\\w*\\b(library|import|part of|part|export)\\b",
|
||||||
|
"beginCaptures": {
|
||||||
|
"0": {
|
||||||
|
"name": "keyword.other.import.dart"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"end": ";",
|
||||||
|
"endCaptures": {
|
||||||
|
"0": {
|
||||||
|
"name": "punctuation.terminator.dart"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"include": "#strings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#comments"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.other.import.dart",
|
||||||
|
"match": "\\b(as|show|hide)\\b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#comments"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#punctuation"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#annotations"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#keywords"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#constants-and-special-vars"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#strings"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"repository": {
|
||||||
|
"dartdoc": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"match": "(\\[.*?\\])",
|
||||||
|
"captures": {
|
||||||
|
"0": {
|
||||||
|
"name": "variable.name.source.dart"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"match": "^ {4,}(?![ \\*]).*",
|
||||||
|
"captures": {
|
||||||
|
"0": {
|
||||||
|
"name": "variable.name.source.dart"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"contentName": "variable.other.source.dart",
|
||||||
|
"begin": "```.*?$",
|
||||||
|
"end": "```"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"match": "(`.*?`)",
|
||||||
|
"captures": {
|
||||||
|
"0": {
|
||||||
|
"name": "variable.other.source.dart"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"match": "(`.*?`)",
|
||||||
|
"captures": {
|
||||||
|
"0": {
|
||||||
|
"name": "variable.other.source.dart"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"match": "(\\* (( ).*))$",
|
||||||
|
"captures": {
|
||||||
|
"2": {
|
||||||
|
"name": "variable.other.source.dart"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"match": "(\\* .*)$"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"comments": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "comment.block.empty.dart",
|
||||||
|
"match": "/\\*\\*/",
|
||||||
|
"captures": {
|
||||||
|
"0": {
|
||||||
|
"name": "punctuation.definition.comment.dart"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#comments-doc-oldschool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#comments-doc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#comments-inline"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"comments-doc-oldschool": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "comment.block.documentation.dart",
|
||||||
|
"begin": "/\\*\\*",
|
||||||
|
"end": "\\*/",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"include": "#comments-doc-oldschool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#comments-block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#dartdoc"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"comments-doc": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "comment.block.documentation.dart",
|
||||||
|
"begin": "///",
|
||||||
|
"while": "^\\s*///",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"include": "#dartdoc"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"comments-inline": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"include": "#comments-block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"match": "((//).*)$",
|
||||||
|
"captures": {
|
||||||
|
"1": {
|
||||||
|
"name": "comment.line.double-slash.dart"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"comments-block": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "comment.block.dart",
|
||||||
|
"begin": "/\\*",
|
||||||
|
"end": "\\*/",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"include": "#comments-block"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"annotations": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "storage.type.annotation.dart",
|
||||||
|
"match": "@[a-zA-Z]+"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"constants-and-special-vars": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "constant.language.dart",
|
||||||
|
"match": "(?<!\\$)\\b(true|false|null)\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "variable.language.dart",
|
||||||
|
"match": "(?<!\\$)\\b(this|super)\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constant.numeric.dart",
|
||||||
|
"match": "(?<!\\$)\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "support.class.dart",
|
||||||
|
"match": "(?<![a-zA-Z0-9_$])([_$]*[A-Z][a-zA-Z0-9_$]*|bool\\b|num\\b|int\\b|double\\b|dynamic\\b)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"match": "([_$]*[a-z][a-zA-Z0-9_$]*)(<|\\(|\\s+=>)",
|
||||||
|
"captures": {
|
||||||
|
"1": {
|
||||||
|
"name": "entity.name.function.dart"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"keywords": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "keyword.cast.dart",
|
||||||
|
"match": "(?<!\\$)\\bas\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.control.catch-exception.dart",
|
||||||
|
"match": "(?<!\\$)\\b(try|on|catch|finally|throw|rethrow)\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.control.dart",
|
||||||
|
"match": "(?<!\\$)\\b(break|case|continue|default|do|else|for|if|in|return|switch|while)\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.control.dart",
|
||||||
|
"match": "(?<!\\$)\\b(sync(\\*)?|async(\\*)?|await|yield(\\*)?)\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.control.dart",
|
||||||
|
"match": "(?<!\\$)\\bassert\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.control.new.dart",
|
||||||
|
"match": "(?<!\\$)\\b(new)\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.declaration.dart",
|
||||||
|
"match": "(?<!\\$)\\b(abstract|class|enum|extends|extension|external|factory|implements|get|mixin|native|operator|set|typedef|with|covariant)\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.dart",
|
||||||
|
"match": "(?<!\\$)\\b(is\\!?)\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.ternary.dart",
|
||||||
|
"match": "\\?|:"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.bitwise.dart",
|
||||||
|
"match": "(<<|>>>?|~|\\^|\\||&)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.assignment.bitwise.dart",
|
||||||
|
"match": "((&|\\^|\\||<<|>>>?)=)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.closure.dart",
|
||||||
|
"match": "(=>)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.comparison.dart",
|
||||||
|
"match": "(==|!=|<=?|>=?)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.assignment.arithmetic.dart",
|
||||||
|
"match": "(([+*/%-]|\\~)=)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.assignment.dart",
|
||||||
|
"match": "(=)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.increment-decrement.dart",
|
||||||
|
"match": "(\\-\\-|\\+\\+)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.arithmetic.dart",
|
||||||
|
"match": "(\\-|\\+|\\*|\\/|\\~\\/|%)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.logical.dart",
|
||||||
|
"match": "(!|&&|\\|\\|)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "storage.modifier.dart",
|
||||||
|
"match": "(?<!\\$)\\b(static|final|const|required|late)\\b(?!\\$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "storage.type.primitive.dart",
|
||||||
|
"match": "(?<!\\$)\\b(?:void|var)\\b(?!\\$)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"string-interp": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"match": "\\$(([a-zA-Z0-9_]+)|\\{([^{}]+)\\})",
|
||||||
|
"captures": {
|
||||||
|
"2": {
|
||||||
|
"name": "variable.parameter.dart"
|
||||||
|
},
|
||||||
|
"3": {
|
||||||
|
"name": "variable.parameter.dart"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constant.character.escape.dart",
|
||||||
|
"match": "\\\\."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"strings": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "string.interpolated.triple.double.dart",
|
||||||
|
"begin": "(?<!r)\"\"\"",
|
||||||
|
"end": "\"\"\"(?!\")",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"include": "#string-interp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "string.interpolated.triple.single.dart",
|
||||||
|
"begin": "(?<!r)'''",
|
||||||
|
"end": "'''(?!')",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"include": "#string-interp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "string.quoted.triple.double.dart",
|
||||||
|
"begin": "r\"\"\"",
|
||||||
|
"end": "\"\"\"(?!\")"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "string.quoted.triple.single.dart",
|
||||||
|
"begin": "r'''",
|
||||||
|
"end": "'''(?!')"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "string.interpolated.double.dart",
|
||||||
|
"begin": "(?<!\\|r)\"",
|
||||||
|
"end": "\"",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "invalid.string.newline",
|
||||||
|
"match": "\\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#string-interp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "string.quoted.double.dart",
|
||||||
|
"begin": "r\"",
|
||||||
|
"end": "\"",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "invalid.string.newline",
|
||||||
|
"match": "\\n"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "string.interpolated.single.dart",
|
||||||
|
"begin": "(?<!\\|r)'",
|
||||||
|
"end": "'",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "invalid.string.newline",
|
||||||
|
"match": "\\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#string-interp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "string.quoted.single.dart",
|
||||||
|
"begin": "r'",
|
||||||
|
"end": "'",
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "invalid.string.newline",
|
||||||
|
"match": "\\n"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"punctuation": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "punctuation.comma.dart",
|
||||||
|
"match": ","
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "punctuation.terminator.dart",
|
||||||
|
"match": ";"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "punctuation.dot.dart",
|
||||||
|
"match": "\\."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -50,7 +50,7 @@ export class GitHubServer {
|
||||||
// TODO@joaomoreno TODO@RMacfarlane
|
// TODO@joaomoreno TODO@RMacfarlane
|
||||||
private async isNoCorsEnvironment(): Promise<boolean> {
|
private async isNoCorsEnvironment(): Promise<boolean> {
|
||||||
const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/dummy`));
|
const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/dummy`));
|
||||||
return uri.scheme === 'https' && /^vscode\./.test(uri.authority);
|
return (uri.scheme === 'https' && /^vscode\./.test(uri.authority)) || (uri.scheme === 'http' && /^localhost/.test(uri.authority));
|
||||||
}
|
}
|
||||||
|
|
||||||
public async login(scopes: string): Promise<string> {
|
public async login(scopes: string): Promise<string> {
|
||||||
|
|
|
@ -811,7 +811,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
this.logTelemetry('fatalError', { ...(error instanceof TypeScriptServerError ? error.telemetry : { command }) });
|
this.logTelemetry('fatalError', { ...(error instanceof TypeScriptServerError ? error.telemetry : { command }) });
|
||||||
console.error(`A non-recoverable error occured while executing tsserver command: ${command}`);
|
console.error(`A non-recoverable error occurred while executing tsserver command: ${command}`);
|
||||||
if (error instanceof TypeScriptServerError && error.serverErrorText) {
|
if (error instanceof TypeScriptServerError && error.serverErrorText) {
|
||||||
console.error(error.serverErrorText);
|
console.error(error.serverErrorText);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
// from https://flutter.dev/
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
void main() async {
|
||||||
|
runApp(
|
||||||
|
MaterialApp(
|
||||||
|
debugShowCheckedModeBanner: false,
|
||||||
|
home: Scaffold(
|
||||||
|
body: MyApp(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyApp extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_MyAppState createState() => _MyAppState();
|
||||||
|
}
|
|
@ -0,0 +1,673 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"c": "// from https://flutter.dev/",
|
||||||
|
"t": "source.dart comment.line.double-slash.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "comment: #6A9955",
|
||||||
|
"light_plus": "comment: #008000",
|
||||||
|
"dark_vs": "comment: #6A9955",
|
||||||
|
"light_vs": "comment: #008000",
|
||||||
|
"hc_black": "comment: #7CA668"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "import",
|
||||||
|
"t": "source.dart meta.declaration.dart keyword.other.import.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "keyword: #569CD6",
|
||||||
|
"light_plus": "keyword: #0000FF",
|
||||||
|
"dark_vs": "keyword: #569CD6",
|
||||||
|
"light_vs": "keyword: #0000FF",
|
||||||
|
"hc_black": "keyword: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.dart meta.declaration.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "'package:flutter/material.dart'",
|
||||||
|
"t": "source.dart meta.declaration.dart string.interpolated.single.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "string: #CE9178",
|
||||||
|
"light_plus": "string: #A31515",
|
||||||
|
"dark_vs": "string: #CE9178",
|
||||||
|
"light_vs": "string: #A31515",
|
||||||
|
"hc_black": "string: #CE9178"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ";",
|
||||||
|
"t": "source.dart meta.declaration.dart punctuation.terminator.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "void",
|
||||||
|
"t": "source.dart storage.type.primitive.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "storage.type: #569CD6",
|
||||||
|
"light_plus": "storage.type: #0000FF",
|
||||||
|
"dark_vs": "storage.type: #569CD6",
|
||||||
|
"light_vs": "storage.type: #0000FF",
|
||||||
|
"hc_black": "storage.type: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "main",
|
||||||
|
"t": "source.dart entity.name.function.dart",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "() ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "async",
|
||||||
|
"t": "source.dart keyword.control.dart",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " {",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "runApp",
|
||||||
|
"t": "source.dart entity.name.function.dart",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "(",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "MaterialApp",
|
||||||
|
"t": "source.dart support.class.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "support.class: #4EC9B0",
|
||||||
|
"light_plus": "support.class: #267F99",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "support.class: #4EC9B0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "(",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " debugShowCheckedModeBanner",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ":",
|
||||||
|
"t": "source.dart keyword.operator.ternary.dart",
|
||||||
|
"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.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "false",
|
||||||
|
"t": "source.dart constant.language.dart",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ",",
|
||||||
|
"t": "source.dart punctuation.comma.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " home",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ":",
|
||||||
|
"t": "source.dart keyword.operator.ternary.dart",
|
||||||
|
"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.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "Scaffold",
|
||||||
|
"t": "source.dart support.class.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "support.class: #4EC9B0",
|
||||||
|
"light_plus": "support.class: #267F99",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "support.class: #4EC9B0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "(",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " body",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ":",
|
||||||
|
"t": "source.dart keyword.operator.ternary.dart",
|
||||||
|
"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.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "MyApp",
|
||||||
|
"t": "source.dart support.class.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "support.class: #4EC9B0",
|
||||||
|
"light_plus": "support.class: #267F99",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "support.class: #4EC9B0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "()",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ",",
|
||||||
|
"t": "source.dart punctuation.comma.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " )",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ",",
|
||||||
|
"t": "source.dart punctuation.comma.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " )",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ",",
|
||||||
|
"t": "source.dart punctuation.comma.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " )",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ";",
|
||||||
|
"t": "source.dart punctuation.terminator.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "}",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "class",
|
||||||
|
"t": "source.dart keyword.declaration.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "keyword: #569CD6",
|
||||||
|
"light_plus": "keyword: #0000FF",
|
||||||
|
"dark_vs": "keyword: #569CD6",
|
||||||
|
"light_vs": "keyword: #0000FF",
|
||||||
|
"hc_black": "keyword: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "MyApp",
|
||||||
|
"t": "source.dart support.class.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "support.class: #4EC9B0",
|
||||||
|
"light_plus": "support.class: #267F99",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "support.class: #4EC9B0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "extends",
|
||||||
|
"t": "source.dart keyword.declaration.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "keyword: #569CD6",
|
||||||
|
"light_plus": "keyword: #0000FF",
|
||||||
|
"dark_vs": "keyword: #569CD6",
|
||||||
|
"light_vs": "keyword: #0000FF",
|
||||||
|
"hc_black": "keyword: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "StatefulWidget",
|
||||||
|
"t": "source.dart support.class.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "support.class: #4EC9B0",
|
||||||
|
"light_plus": "support.class: #267F99",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "support.class: #4EC9B0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " {",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "@override",
|
||||||
|
"t": "source.dart storage.type.annotation.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "storage.type: #569CD6",
|
||||||
|
"light_plus": "storage.type: #0000FF",
|
||||||
|
"dark_vs": "storage.type: #569CD6",
|
||||||
|
"light_vs": "storage.type: #0000FF",
|
||||||
|
"hc_black": "storage.type: #569CD6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "_MyAppState",
|
||||||
|
"t": "source.dart support.class.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "support.class: #4EC9B0",
|
||||||
|
"light_plus": "support.class: #267F99",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "support.class: #4EC9B0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": " ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "createState",
|
||||||
|
"t": "source.dart entity.name.function.dart",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "() ",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "=>",
|
||||||
|
"t": "source.dart keyword.operator.closure.dart",
|
||||||
|
"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.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "_MyAppState",
|
||||||
|
"t": "source.dart support.class.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "support.class: #4EC9B0",
|
||||||
|
"light_plus": "support.class: #267F99",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "support.class: #4EC9B0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "()",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": ";",
|
||||||
|
"t": "source.dart punctuation.terminator.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"c": "}",
|
||||||
|
"t": "source.dart",
|
||||||
|
"r": {
|
||||||
|
"dark_plus": "default: #D4D4D4",
|
||||||
|
"light_plus": "default: #000000",
|
||||||
|
"dark_vs": "default: #D4D4D4",
|
||||||
|
"light_vs": "default: #000000",
|
||||||
|
"hc_black": "default: #FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -1120,7 +1120,7 @@ class InnerMinimap extends Disposable {
|
||||||
}
|
}
|
||||||
if (this._model.options.size !== 'proportional') {
|
if (this._model.options.size !== 'proportional') {
|
||||||
if (e.leftButton && this._lastRenderData) {
|
if (e.leftButton && this._lastRenderData) {
|
||||||
// pretend the click occured in the center of the slider
|
// pretend the click occurred in the center of the slider
|
||||||
const position = dom.getDomNodePagePosition(this._slider.domNode);
|
const position = dom.getDomNodePagePosition(this._slider.domNode);
|
||||||
const initialPosY = position.top + position.height / 2;
|
const initialPosY = position.top + position.height / 2;
|
||||||
this._startSliderDragging(e.buttons, e.posx, initialPosY, e.posy, this._lastRenderData.renderedLayout);
|
this._startSliderDragging(e.buttons, e.posx, initialPosY, e.posy, this._lastRenderData.renderedLayout);
|
||||||
|
|
|
@ -117,7 +117,9 @@ export interface IWalkthroughStep {
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly title: string;
|
readonly title: string;
|
||||||
readonly description: string | undefined;
|
readonly description: string | undefined;
|
||||||
readonly media: { path: string | { dark: string, light: string, hc: string }, altText?: string }
|
readonly media:
|
||||||
|
| { image: string | { dark: string, light: string, hc: string }, altText: string, markdown?: never }
|
||||||
|
| { markdown: string, image?: never }
|
||||||
readonly completionEvents?: string[];
|
readonly completionEvents?: string[];
|
||||||
/** @deprecated use `completionEvents: 'onCommand:...'` */
|
/** @deprecated use `completionEvents: 'onCommand:...'` */
|
||||||
readonly doneOn?: { command: string };
|
readonly doneOn?: { command: string };
|
||||||
|
|
|
@ -23,7 +23,7 @@ const ERR_FILE_NOT_DIR = createFileSystemProviderError(localize('fileNotDirector
|
||||||
const ERR_DIR_NOT_EMPTY = createFileSystemProviderError(localize('dirIsNotEmpty', "Directory is not empty"), FileSystemProviderErrorCode.Unknown);
|
const ERR_DIR_NOT_EMPTY = createFileSystemProviderError(localize('dirIsNotEmpty', "Directory is not empty"), FileSystemProviderErrorCode.Unknown);
|
||||||
|
|
||||||
// Arbitrary Internal Errors (should never be thrown in production)
|
// Arbitrary Internal Errors (should never be thrown in production)
|
||||||
const ERR_UNKNOWN_INTERNAL = (message: string) => createFileSystemProviderError(localize('internal', "Internal error occured in IndexedDB File System Provider. ({0})", message), FileSystemProviderErrorCode.Unknown);
|
const ERR_UNKNOWN_INTERNAL = (message: string) => createFileSystemProviderError(localize('internal', "Internal error occurred in IndexedDB File System Provider. ({0})", message), FileSystemProviderErrorCode.Unknown);
|
||||||
|
|
||||||
export class IndexedDB {
|
export class IndexedDB {
|
||||||
|
|
||||||
|
|
|
@ -975,7 +975,7 @@ export interface IReadFileOptions extends IBaseReadFileOptions {
|
||||||
*
|
*
|
||||||
* Typically you should not need to use this flag but if
|
* Typically you should not need to use this flag but if
|
||||||
* for example you are quickly reading a file right after
|
* for example you are quickly reading a file right after
|
||||||
* a file event occured and the file changes a lot, there
|
* a file event occurred and the file changes a lot, there
|
||||||
* is a chance that a read returns an empty or partial file
|
* is a chance that a read returns an empty or partial file
|
||||||
* because a pending write has not finished yet.
|
* because a pending write has not finished yet.
|
||||||
*
|
*
|
||||||
|
|
|
@ -709,7 +709,7 @@ export class UndoRedoService implements IUndoRedoService {
|
||||||
|
|
||||||
private _onError(err: Error, element: StackElement): void {
|
private _onError(err: Error, element: StackElement): void {
|
||||||
onUnexpectedError(err);
|
onUnexpectedError(err);
|
||||||
// An error occured while undoing or redoing => drop the undo/redo stack for all affected resources
|
// An error occurred while undoing or redoing => drop the undo/redo stack for all affected resources
|
||||||
for (const strResource of element.strResources) {
|
for (const strResource of element.strResources) {
|
||||||
this.removeElements(strResource);
|
this.removeElements(strResource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ export class NoTabsTitleControl extends TitleControl {
|
||||||
private onTitleTap(e: GestureEvent): void {
|
private onTitleTap(e: GestureEvent): void {
|
||||||
|
|
||||||
// We only want to open the quick access picker when
|
// We only want to open the quick access picker when
|
||||||
// the tap occured over the editor label, so we need
|
// the tap occurred over the editor label, so we need
|
||||||
// to check on the target
|
// to check on the target
|
||||||
// (https://github.com/microsoft/vscode/issues/107543)
|
// (https://github.com/microsoft/vscode/issues/107543)
|
||||||
const target = e.initialTarget;
|
const target = e.initialTarget;
|
||||||
|
|
|
@ -394,7 +394,7 @@ export class ReplAccessibilityProvider implements IListAccessibilityProvider<IRe
|
||||||
}
|
}
|
||||||
if (element instanceof SimpleReplElement || element instanceof ReplEvaluationInput || element instanceof ReplEvaluationResult) {
|
if (element instanceof SimpleReplElement || element instanceof ReplEvaluationInput || element instanceof ReplEvaluationResult) {
|
||||||
return element.value + (element instanceof SimpleReplElement && element.count > 1 ? localize({ key: 'occurred', comment: ['Front will the value of the debug console element. Placeholder will be replaced by a number which represents occurrance count.'] },
|
return element.value + (element instanceof SimpleReplElement && element.count > 1 ? localize({ key: 'occurred', comment: ['Front will the value of the debug console element. Placeholder will be replaced by a number which represents occurrance count.'] },
|
||||||
", occured {0} times", element.count) : '');
|
", occurred {0} times", element.count) : '');
|
||||||
}
|
}
|
||||||
if (element instanceof RawObjectReplElement) {
|
if (element instanceof RawObjectReplElement) {
|
||||||
return localize('replRawObjectAriaLabel', "Debug console variable {0}, value {1}", element.name, element.value);
|
return localize('replRawObjectAriaLabel', "Debug console variable {0}, value {1}", element.name, element.value);
|
||||||
|
|
|
@ -109,7 +109,7 @@ export class NotebookOptions {
|
||||||
const globalToolbar = this.configurationService.getValue<boolean | undefined>(GlobalToolbar) ?? false;
|
const globalToolbar = this.configurationService.getValue<boolean | undefined>(GlobalToolbar) ?? false;
|
||||||
const consolidatedOutputButton = this.configurationService.getValue<boolean | undefined>(ConsolidatedOutputButton) ?? true;
|
const consolidatedOutputButton = this.configurationService.getValue<boolean | undefined>(ConsolidatedOutputButton) ?? true;
|
||||||
const dragAndDropEnabled = this.configurationService.getValue<boolean | undefined>(DragAndDropEnabled) ?? true;
|
const dragAndDropEnabled = this.configurationService.getValue<boolean | undefined>(DragAndDropEnabled) ?? true;
|
||||||
const cellToolbarLocation = this.configurationService.getValue<string | { [key: string]: string }>(CellToolbarLocKey);
|
const cellToolbarLocation = this.configurationService.getValue<string | { [key: string]: string }>(CellToolbarLocKey) ?? { 'default': 'right' };
|
||||||
const cellToolbarInteraction = this.configurationService.getValue<string>(CellToolbarVisibility);
|
const cellToolbarInteraction = this.configurationService.getValue<string>(CellToolbarVisibility);
|
||||||
const compactView = this.configurationService.getValue<boolean | undefined>(CompactView) ?? true;
|
const compactView = this.configurationService.getValue<boolean | undefined>(CompactView) ?? true;
|
||||||
const focusIndicator = this._computeFocusIndicatorOption();
|
const focusIndicator = this._computeFocusIndicatorOption();
|
||||||
|
@ -205,7 +205,7 @@ export class NotebookOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cellToolbarLocation) {
|
if (cellToolbarLocation) {
|
||||||
configuration.cellToolbarLocation = this.configurationService.getValue<string | { [key: string]: string }>(CellToolbarLocKey);
|
configuration.cellToolbarLocation = this.configurationService.getValue<string | { [key: string]: string }>(CellToolbarLocKey) ?? { 'default': 'right' };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cellToolbarInteraction) {
|
if (cellToolbarInteraction) {
|
||||||
|
|
|
@ -594,7 +594,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attach has not occured yet
|
// Attach has not occurred yet
|
||||||
if (!this._wrapperElement) {
|
if (!this._wrapperElement) {
|
||||||
return this._attachToElement(container);
|
return this._attachToElement(container);
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,8 +243,8 @@ async function processResourceRequest(event, requestUrl) {
|
||||||
return response.clone();
|
return response.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
const parentClient = await getOuterIframeClient(webviewId);
|
const parentClients = await getOuterIframeClient(webviewId);
|
||||||
if (!parentClient) {
|
if (!parentClients.length) {
|
||||||
console.log('Could not find parent client for request');
|
console.log('Could not find parent client for request');
|
||||||
return notFound();
|
return notFound();
|
||||||
}
|
}
|
||||||
|
@ -258,6 +258,7 @@ async function processResourceRequest(event, requestUrl) {
|
||||||
const scheme = firstHostSegment.split('+', 1)[0];
|
const scheme = firstHostSegment.split('+', 1)[0];
|
||||||
const authority = firstHostSegment.slice(scheme.length + 1); // may be empty
|
const authority = firstHostSegment.slice(scheme.length + 1); // may be empty
|
||||||
|
|
||||||
|
for (const parentClient of parentClients) {
|
||||||
parentClient.postMessage({
|
parentClient.postMessage({
|
||||||
channel: 'load-resource',
|
channel: 'load-resource',
|
||||||
id: requestId,
|
id: requestId,
|
||||||
|
@ -267,6 +268,7 @@ async function processResourceRequest(event, requestUrl) {
|
||||||
query: requestUrl.search.replace(/^\?/, ''),
|
query: requestUrl.search.replace(/^\?/, ''),
|
||||||
ifNoneMatch: cached?.headers.get('ETag'),
|
ifNoneMatch: cached?.headers.get('ETag'),
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return promise.then(entry => resolveResourceEntry(entry, cached));
|
return promise.then(entry => resolveResourceEntry(entry, cached));
|
||||||
}
|
}
|
||||||
|
@ -308,18 +310,20 @@ async function processLocalhostRequest(event, requestUrl) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const parentClient = await getOuterIframeClient(webviewId);
|
const parentClients = await getOuterIframeClient(webviewId);
|
||||||
if (!parentClient) {
|
if (!parentClients.length) {
|
||||||
console.log('Could not find parent client for request');
|
console.log('Could not find parent client for request');
|
||||||
return notFound();
|
return notFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
const { requestId, promise } = localhostRequestStore.create();
|
const { requestId, promise } = localhostRequestStore.create();
|
||||||
|
for (const parentClient of parentClients) {
|
||||||
parentClient.postMessage({
|
parentClient.postMessage({
|
||||||
channel: 'load-localhost',
|
channel: 'load-localhost',
|
||||||
origin: origin,
|
origin: origin,
|
||||||
id: requestId,
|
id: requestId,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return promise.then(resolveRedirect);
|
return promise.then(resolveRedirect);
|
||||||
}
|
}
|
||||||
|
@ -335,11 +339,11 @@ function getWebviewIdForClient(client) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} webviewId
|
* @param {string} webviewId
|
||||||
* @returns {Promise<Client | undefined>}
|
* @returns {Promise<Client[]>}
|
||||||
*/
|
*/
|
||||||
async function getOuterIframeClient(webviewId) {
|
async function getOuterIframeClient(webviewId) {
|
||||||
const allClients = await sw.clients.matchAll({ includeUncontrolled: true });
|
const allClients = await sw.clients.matchAll({ includeUncontrolled: true });
|
||||||
return allClients.find(client => {
|
return allClients.filter(client => {
|
||||||
const clientUrl = new URL(client.url);
|
const clientUrl = new URL(client.url);
|
||||||
const hasExpectedPathName = (clientUrl.pathname === `${rootPath}/` || clientUrl.pathname === `${rootPath}/index.html` || clientUrl.pathname === `${rootPath}/electron-browser-index.html`);
|
const hasExpectedPathName = (clientUrl.pathname === `${rootPath}/` || clientUrl.pathname === `${rootPath}/index.html` || clientUrl.pathname === `${rootPath}/electron-browser-index.html`);
|
||||||
return hasExpectedPathName && clientUrl.searchParams.get('id') === webviewId;
|
return hasExpectedPathName && clientUrl.searchParams.get('id') === webviewId;
|
||||||
|
|
|
@ -166,7 +166,18 @@ export class GettingStartedPage extends EditorPane {
|
||||||
|
|
||||||
const rerender = () => {
|
const rerender = () => {
|
||||||
this.gettingStartedCategories = this.gettingStartedService.getCategories();
|
this.gettingStartedCategories = this.gettingStartedService.getCategories();
|
||||||
|
if (this.currentCategory && this.currentCategory.content.type === 'steps') {
|
||||||
|
const existingSteps = this.currentCategory.content.steps.map(step => step.id);
|
||||||
|
const newCategory = this.gettingStartedCategories.find(category => this.currentCategory?.id === category.id);
|
||||||
|
if (newCategory && newCategory.content.type === 'steps') {
|
||||||
|
const newSteps = newCategory.content.steps.map(step => step.id);
|
||||||
|
if (newSteps.length !== existingSteps.length || existingSteps.some((v, i) => v !== newSteps[i])) {
|
||||||
this.buildSlideThrottle.queue(() => this.buildCategoriesSlide());
|
this.buildSlideThrottle.queue(() => this.buildCategoriesSlide());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.buildSlideThrottle.queue(() => this.buildCategoriesSlide());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this._register(this.gettingStartedService.onDidAddCategory(rerender));
|
this._register(this.gettingStartedService.onDidAddCategory(rerender));
|
||||||
|
|
|
@ -76,10 +76,13 @@ export const walkthroughsExtensionPoint = ExtensionsRegistry.registerExtensionPo
|
||||||
defaultSnippets: [{ 'body': { 'type': '$1', 'path': '$2' } }],
|
defaultSnippets: [{ 'body': { 'type': '$1', 'path': '$2' } }],
|
||||||
oneOf: [
|
oneOf: [
|
||||||
{
|
{
|
||||||
required: ['path', 'altText'],
|
required: ['image', 'altText'],
|
||||||
additionalProperties: false,
|
additionalProperties: false,
|
||||||
properties: {
|
properties: {
|
||||||
path: {
|
path: {
|
||||||
|
deprecationMessage: localize('pathDeprecated', "Deprecated. Please use `image` or `markdown` instead")
|
||||||
|
},
|
||||||
|
image: {
|
||||||
description: localize('walkthroughs.steps.media.image.path.string', "Path to an image - or object consisting of paths to light, dark, and hc images - relative to extension directory. Depending on context, the image will be displayed from 400px to 800px wide, with similar bounds on height. To support HIDPI displays, the image will be rendered at 1.5x scaling, for example a 900 physical pixels wide image will be displayed as 600 logical pixels wide."),
|
description: localize('walkthroughs.steps.media.image.path.string', "Path to an image - or object consisting of paths to light, dark, and hc images - relative to extension directory. Depending on context, the image will be displayed from 400px to 800px wide, with similar bounds on height. To support HIDPI displays, the image will be rendered at 1.5x scaling, for example a 900 physical pixels wide image will be displayed as 600 logical pixels wide."),
|
||||||
oneOf: [
|
oneOf: [
|
||||||
{
|
{
|
||||||
|
@ -111,10 +114,13 @@ export const walkthroughsExtensionPoint = ExtensionsRegistry.registerExtensionPo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
required: ['path'],
|
required: ['markdown'],
|
||||||
additionalProperties: false,
|
additionalProperties: false,
|
||||||
properties: {
|
properties: {
|
||||||
path: {
|
path: {
|
||||||
|
deprecationMessage: localize('pathDeprecated', "Deprecated. Please use `image` or `markdown` instead")
|
||||||
|
},
|
||||||
|
markdown: {
|
||||||
description: localize('walkthroughs.steps.media.markdown.path', "Path to the markdown document, relative to extension directory."),
|
description: localize('walkthroughs.steps.media.markdown.path', "Path to the markdown document, relative to extension directory."),
|
||||||
type: 'string',
|
type: 'string',
|
||||||
}
|
}
|
||||||
|
@ -149,9 +155,9 @@ export const walkthroughsExtensionPoint = ExtensionsRegistry.registerExtensionPo
|
||||||
body: 'onSettingChanged:${2:settingName}'
|
body: 'onSettingChanged:${2:settingName}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'onContextKeyDefined',
|
label: 'onContext',
|
||||||
description: localize('walkthroughs.steps.completionEvents.onContextKeyDefined', 'Check off step when a context key is defined to a truthy value. Note: this only accepts single context keys, not full context key expressions'),
|
description: localize('walkthroughs.steps.completionEvents.onContext', 'Check off step when a context key expression is true.'),
|
||||||
body: 'onContextKeyDefined:${2:key}'
|
body: 'onContext:${2:key}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'extensionInstalled',
|
label: 'extensionInstalled',
|
||||||
|
|
|
@ -171,6 +171,7 @@ export class GettingStartedService extends Disposable implements IGettingStarted
|
||||||
private sessionInstalledExtensions = new Set<string>();
|
private sessionInstalledExtensions = new Set<string>();
|
||||||
|
|
||||||
private categoryVisibilityContextKeys = new Set<string>();
|
private categoryVisibilityContextKeys = new Set<string>();
|
||||||
|
private stepCompletionContextKeyExpressions = new Set<ContextKeyExpression>();
|
||||||
private stepCompletionContextKeys = new Set<string>();
|
private stepCompletionContextKeys = new Set<string>();
|
||||||
|
|
||||||
private triggerInstalledExtensionsRegistered!: () => void;
|
private triggerInstalledExtensionsRegistered!: () => void;
|
||||||
|
@ -217,9 +218,9 @@ export class GettingStartedService extends Disposable implements IGettingStarted
|
||||||
this._register(this.contextService.onDidChangeContext(event => {
|
this._register(this.contextService.onDidChangeContext(event => {
|
||||||
if (event.affectsSome(this.categoryVisibilityContextKeys)) { this._onDidAddCategory.fire(); }
|
if (event.affectsSome(this.categoryVisibilityContextKeys)) { this._onDidAddCategory.fire(); }
|
||||||
if (event.affectsSome(this.stepCompletionContextKeys)) {
|
if (event.affectsSome(this.stepCompletionContextKeys)) {
|
||||||
this.stepCompletionContextKeys.forEach(key => {
|
this.stepCompletionContextKeyExpressions.forEach(expression => {
|
||||||
if (event.affectsSome(new Set([key])) && this.contextService.getContextKeyValue(key)) {
|
if (event.affectsSome(new Set(expression.keys())) && this.contextService.contextMatchesRules(expression)) {
|
||||||
this.progressByEvent(`onContextKeyDefined:` + key);
|
this.progressByEvent(`onContext:` + expression.serialize());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -444,19 +445,41 @@ export class GettingStartedService extends Disposable implements IGettingStarted
|
||||||
const fullyQualifiedID = extension.identifier.value + '#' + walkthrough.id + '#' + step.id;
|
const fullyQualifiedID = extension.identifier.value + '#' + walkthrough.id + '#' + step.id;
|
||||||
|
|
||||||
let media: IGettingStartedStep['media'];
|
let media: IGettingStartedStep['media'];
|
||||||
if (typeof step.media.path === 'string' && step.media.path.endsWith('.md')) {
|
|
||||||
media = {
|
if (step.media.image) {
|
||||||
type: 'markdown',
|
|
||||||
path: convertExtensionPathToFileURI(step.media.path),
|
|
||||||
base: convertExtensionPathToFileURI(dirname(step.media.path)),
|
|
||||||
root: FileAccess.asFileUri(extension.extensionLocation),
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
const altText = (step.media as any).altText;
|
const altText = (step.media as any).altText;
|
||||||
if (altText === undefined) {
|
if (altText === undefined) {
|
||||||
console.error('Getting Started: item', fullyQualifiedID, 'is missing altText for its media element.');
|
console.error('Getting Started: item', fullyQualifiedID, 'is missing altText for its media element.');
|
||||||
}
|
}
|
||||||
media = { type: 'image', altText, path: convertExtensionRelativePathsToBrowserURIs(step.media.path) };
|
media = { type: 'image', altText, path: convertExtensionRelativePathsToBrowserURIs(step.media.image) };
|
||||||
|
}
|
||||||
|
else if (step.media.markdown) {
|
||||||
|
media = {
|
||||||
|
type: 'markdown',
|
||||||
|
path: convertExtensionPathToFileURI(step.media.markdown),
|
||||||
|
base: convertExtensionPathToFileURI(dirname(step.media.markdown)),
|
||||||
|
root: FileAccess.asFileUri(extension.extensionLocation),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Legacy media config
|
||||||
|
else {
|
||||||
|
const legacyMedia = step.media as unknown as { path: string, altText: string };
|
||||||
|
if (typeof legacyMedia.path === 'string' && legacyMedia.path.endsWith('.md')) {
|
||||||
|
media = {
|
||||||
|
type: 'markdown',
|
||||||
|
path: convertExtensionPathToFileURI(legacyMedia.path),
|
||||||
|
base: convertExtensionPathToFileURI(dirname(legacyMedia.path)),
|
||||||
|
root: FileAccess.asFileUri(extension.extensionLocation),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
const altText = legacyMedia.altText;
|
||||||
|
if (altText === undefined) {
|
||||||
|
console.error('Getting Started: item', fullyQualifiedID, 'is missing altText for its media element.');
|
||||||
|
}
|
||||||
|
media = { type: 'image', altText, path: convertExtensionRelativePathsToBrowserURIs(legacyMedia.path) };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ({
|
return ({
|
||||||
|
@ -539,8 +562,19 @@ export class GettingStartedService extends Disposable implements IGettingStarted
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (eventType) {
|
switch (eventType) {
|
||||||
case 'onLink': case 'onEvent': case 'onView': case 'onContextKeyDefined': case 'onSettingChanged':
|
case 'onLink': case 'onEvent': case 'onView': case 'onSettingChanged':
|
||||||
break;
|
break;
|
||||||
|
case 'onContext': {
|
||||||
|
const expression = ContextKeyExpr.deserialize(argument);
|
||||||
|
if (expression) {
|
||||||
|
this.stepCompletionContextKeyExpressions.add(expression);
|
||||||
|
expression.keys().forEach(key => this.stepCompletionContextKeys.add(key));
|
||||||
|
event = eventType + ':' + expression.serialize();
|
||||||
|
} else {
|
||||||
|
console.error('Unable to parse context key expression:', expression, 'in getting started step', step.id);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'stepSelected':
|
case 'stepSelected':
|
||||||
event = eventType + ':' + step.id;
|
event = eventType + ':' + step.id;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -208,18 +208,6 @@ export const walkthroughs: GettingStartedWalkthroughContent = [
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'keymaps',
|
|
||||||
title: localize('gettingStarted.keymaps.title', "Bring your favorite shortcuts"),
|
|
||||||
description: localize('gettingStarted.keymaps.description', "If you already have your favorite shortcuts from another editor, bring them into VS Code.\n[Browse Keymap Extensions](command:workbench.extensions.action.showRecommendedKeymapExtensions)"),
|
|
||||||
media: {
|
|
||||||
type: 'image', altText: 'List of keymap extensions.', path: {
|
|
||||||
dark: 'dark/keymaps.png',
|
|
||||||
light: 'light/keymaps.png',
|
|
||||||
hc: 'hc/keymaps.png',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'settingsSync',
|
id: 'settingsSync',
|
||||||
title: localize('gettingStarted.settingsSync.title', "Sync your stuff across devices"),
|
title: localize('gettingStarted.settingsSync.title', "Sync your stuff across devices"),
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 48 KiB |
Binary file not shown.
Before Width: | Height: | Size: 49 KiB |
Binary file not shown.
Before Width: | Height: | Size: 49 KiB |
|
@ -251,21 +251,13 @@ export class WorkspaceTrustRequestHandler extends Disposable implements IWorkben
|
||||||
|
|
||||||
const id = choose(BANNER_VIRTUAL_WORKSPACE, BANNER_RESTRICTED_MODE, BANNER_VIRTUAL_AND_RESTRICTED);
|
const id = choose(BANNER_VIRTUAL_WORKSPACE, BANNER_RESTRICTED_MODE, BANNER_VIRTUAL_AND_RESTRICTED);
|
||||||
const icon = choose(infoIcon, shieldIcon, infoIcon);
|
const icon = choose(infoIcon, shieldIcon, infoIcon);
|
||||||
const ariaLabel = choose(
|
|
||||||
localize('virtualBannerAriaLabel', "Some features are not available because the current workspace is backed by a virtual file system. Use navigation keys to access banner actions."),
|
|
||||||
this.useWorkspaceLanguage ?
|
|
||||||
localize('restrictedModeBannerAriaLabelWorkspace', "Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features. Use navigation keys to access banner actions.") :
|
|
||||||
localize('restrictedModeBannerAriaLabelFolder', "Restricted Mode is intended for safe code browsing. Trust this folder to enable all features. Use navigation keys to access banner actions."),
|
|
||||||
localize('virtualAndRestrictedModeBannerAriaLabel', "Some features are not available because the current workspace is backed by a virtual file system and is not trusted. You can trust this workspace to enable some of these features. Use navigation keys to access banner actions."),
|
|
||||||
);
|
|
||||||
|
|
||||||
const message = choose(
|
|
||||||
localize('virtualBannerMessage', "Some features are not available because the current workspace is backed by a virtual file system."),
|
const [virtualAriaLabel, restrictedModeAriaLabel, virtualAndRestrictedModeAriaLabel] = this.getBannerItemAriaLabels();
|
||||||
this.useWorkspaceLanguage ?
|
const ariaLabel = choose(virtualAriaLabel, restrictedModeAriaLabel, virtualAndRestrictedModeAriaLabel);
|
||||||
localize('restrictedModeBannerMessageWorkspace', "Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features.") :
|
|
||||||
localize('restrictedModeBannerMessageLocal', "Restricted Mode is intended for safe code browsing. Trust this folder to enable all features."),
|
const [virtualMessage, restrictedModeMessage, virtualAndRestrictedModeMessage] = this.getBannerItemMessages();
|
||||||
localize('virtualAndRestrictedModeBannerMessage', "Some features are not available because the current workspace is backed by a virtual file system and is not trusted. You can trust this workspace to enabled some of these features."),
|
const message = choose(virtualMessage, restrictedModeMessage, virtualAndRestrictedModeMessage);
|
||||||
);
|
|
||||||
|
|
||||||
const actions = choose(
|
const actions = choose(
|
||||||
[
|
[
|
||||||
|
@ -314,16 +306,81 @@ export class WorkspaceTrustRequestHandler extends Disposable implements IWorkben
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getBannerItemAriaLabels(): [string, string, string] {
|
||||||
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
||||||
|
case WorkbenchState.EMPTY:
|
||||||
|
return [
|
||||||
|
localize('virtualBannerAriaLabelWindow', "Some features are not available because the current window is backed by a virtual file system. Use navigation keys to access banner actions."),
|
||||||
|
localize('restrictedModeBannerAriaLabelWindow', "Restricted Mode is intended for safe code browsing. Trust this window to enable all features. Use navigation keys to access banner actions."),
|
||||||
|
localize('virtualAndRestrictedModeBannerAriaLabelWindow', "Some features are not available because the current window is backed by a virtual file system and is not trusted. You can trust this window to enable some of these features. Use navigation keys to access banner actions.")
|
||||||
|
];
|
||||||
|
case WorkbenchState.FOLDER:
|
||||||
|
return [
|
||||||
|
localize('virtualBannerAriaLabelFolder', "Some features are not available because the current folder is backed by a virtual file system. Use navigation keys to access banner actions."),
|
||||||
|
localize('restrictedModeBannerAriaLabelFolder', "Restricted Mode is intended for safe code browsing. Trust this folder to enable all features. Use navigation keys to access banner actions."),
|
||||||
|
localize('virtualAndRestrictedModeBannerAriaLabelFolder', "Some features are not available because the current folder is backed by a virtual file system and is not trusted. You can trust this folder to enable some of these features. Use navigation keys to access banner actions.")
|
||||||
|
];
|
||||||
|
case WorkbenchState.WORKSPACE:
|
||||||
|
return [
|
||||||
|
localize('virtualBannerAriaLabelWorkspace', "Some features are not available because the current workspace is backed by a virtual file system. Use navigation keys to access banner actions."),
|
||||||
|
localize('restrictedModeBannerAriaLabelWorkspace', "Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features. Use navigation keys to access banner actions."),
|
||||||
|
localize('virtualAndRestrictedModeBannerAriaLabelWorkspace', "Some features are not available because the current workspace is backed by a virtual file system and is not trusted. You can trust this workspace to enable some of these features. Use navigation keys to access banner actions.")
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private getBannerItemMessages(): [string, string, string] {
|
||||||
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
||||||
|
case WorkbenchState.EMPTY:
|
||||||
|
return [
|
||||||
|
localize('virtualBannerMessageWindow', "Some features are not available because the current workspace is backed by a virtual file system."),
|
||||||
|
localize('restrictedModeBannerMessageWindow', "Restricted Mode is intended for safe code browsing. Trust this window to enable all features."),
|
||||||
|
localize('virtualAndRestrictedModeBannerMessageWindow', "Some features are not available because the current window is backed by a virtual file system and is not trusted. You can trust this window to enable some of these features.")
|
||||||
|
];
|
||||||
|
case WorkbenchState.FOLDER:
|
||||||
|
return [
|
||||||
|
localize('virtualBannerMessageFolder', "Some features are not available because the current folder is backed by a virtual file system."),
|
||||||
|
localize('restrictedModeBannerMessageFolder', "Restricted Mode is intended for safe code browsing. Trust this folder to enable all features."),
|
||||||
|
localize('virtualAndRestrictedModeBannerMessageFolder', "Some features are not available because the current folder is backed by a virtual file system and is not trusted. You can trust this folder to enable some of these features.")
|
||||||
|
];
|
||||||
|
case WorkbenchState.WORKSPACE:
|
||||||
|
return [
|
||||||
|
localize('virtualBannerMessageWorkspace', "Some features are not available because the current workspace is backed by a virtual file system."),
|
||||||
|
localize('restrictedModeBannerMessageWorkspace', "Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features."),
|
||||||
|
localize('virtualAndRestrictedModeBannerMessageWorkspace', "Some features are not available because the current workspace is backed by a virtual file system and is not trusted. You can trust this workspace to enable some of these features.")
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private getStatusbarEntry(trusted: boolean): IStatusbarEntry {
|
private getStatusbarEntry(trusted: boolean): IStatusbarEntry {
|
||||||
const text = workspaceTrustToString(trusted);
|
const text = workspaceTrustToString(trusted);
|
||||||
const backgroundColor = new ThemeColor(STATUS_BAR_PROMINENT_ITEM_BACKGROUND);
|
const backgroundColor = new ThemeColor(STATUS_BAR_PROMINENT_ITEM_BACKGROUND);
|
||||||
const color = new ThemeColor(STATUS_BAR_PROMINENT_ITEM_FOREGROUND);
|
const color = new ThemeColor(STATUS_BAR_PROMINENT_ITEM_FOREGROUND);
|
||||||
|
|
||||||
|
let ariaLabel = '';
|
||||||
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
||||||
|
case WorkbenchState.EMPTY: {
|
||||||
|
ariaLabel = trusted ? localize('status.ariaTrustedWindow', "This window is trusted.") :
|
||||||
|
localize('status.ariaUntrustedWindow', "Restricted Mode: Some features are disabled because this window is not trusted.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case WorkbenchState.FOLDER: {
|
||||||
|
ariaLabel = trusted ? localize('status.ariaTrustedFolder', "This folder is trusted.") :
|
||||||
|
localize('status.ariaUntrustedFolder', "Restricted Mode: Some features are disabled because this folder is not trusted.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case WorkbenchState.WORKSPACE: {
|
||||||
|
ariaLabel = trusted ? localize('status.ariaTrustedWorkspace', "This workspace is trusted.") :
|
||||||
|
localize('status.ariaUntrustedWorkspace', "Restricted Mode: Some features are disabled because this workspace is not trusted.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: localize('status.WorkspaceTrust', "Workspace Trust"),
|
name: localize('status.WorkspaceTrust', "Workspace Trust"),
|
||||||
text: trusted ? `$(shield)` : `$(shield) ${text}`,
|
text: trusted ? `$(shield)` : `$(shield) ${text}`,
|
||||||
ariaLabel: trusted ? localize('status.ariaTrusted', "This workspace is trusted.") : localize('status.ariaUntrusted', "Restricted Mode: Some features are disabled because this workspace is not trusted."),
|
ariaLabel: ariaLabel,
|
||||||
tooltip: trusted ? localize('status.tooltipTrusted', "This workspace is trusted.") : localize('status.tooltipUntrusted', "Some features are disabled because this workspace is not trusted."),
|
tooltip: ariaLabel,
|
||||||
command: 'workbench.trust.manage',
|
command: 'workbench.trust.manage',
|
||||||
backgroundColor,
|
backgroundColor,
|
||||||
color
|
color
|
||||||
|
|
|
@ -339,7 +339,7 @@ export class EditorService extends Disposable implements EditorServiceImpl {
|
||||||
|
|
||||||
// Handle deletes in opened editors depending on:
|
// Handle deletes in opened editors depending on:
|
||||||
// - we close any editor when `closeOnFileDelete: true`
|
// - we close any editor when `closeOnFileDelete: true`
|
||||||
// - we close any editor when the delete occured from within VSCode
|
// - we close any editor when the delete occurred from within VSCode
|
||||||
// - we close any editor without resolved working copy assuming that
|
// - we close any editor without resolved working copy assuming that
|
||||||
// this editor could not be opened after the file is gone
|
// this editor could not be opened after the file is gone
|
||||||
if (this.closeOnFileDelete || !isExternal || !this.workingCopyService.has(resource)) {
|
if (this.closeOnFileDelete || !isExternal || !this.workingCopyService.has(resource)) {
|
||||||
|
|
|
@ -24,7 +24,8 @@ async function createWorkspaceFile(workspacePath: string): Promise<string> {
|
||||||
{ path: toUri(path.join(workspacePath, 'views')) }
|
{ path: toUri(path.join(workspacePath, 'views')) }
|
||||||
],
|
],
|
||||||
settings: {
|
settings: {
|
||||||
'workbench.startupEditor': 'none'
|
'workbench.startupEditor': 'none',
|
||||||
|
'workbench.enableExperiments': false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue