From b0ac7e40bbda9b2b232b7ce9616469f3e0178af4 Mon Sep 17 00:00:00 2001 From: Sebastian Pfitzner Date: Thu, 28 Jan 2021 16:55:22 +0100 Subject: [PATCH 01/91] add Julia grammar --- extensions/julia/.vscodeignore | 2 + extensions/julia/cgmanifest.json | 17 + extensions/julia/language-configuration.json | 31 + extensions/julia/package.json | 54 + extensions/julia/package.nls.json | 4 + .../julia/syntaxes/julia.tmLanguage.json | 1113 +++++++++++++++++ 6 files changed, 1221 insertions(+) create mode 100644 extensions/julia/.vscodeignore create mode 100644 extensions/julia/cgmanifest.json create mode 100644 extensions/julia/language-configuration.json create mode 100644 extensions/julia/package.json create mode 100644 extensions/julia/package.nls.json create mode 100644 extensions/julia/syntaxes/julia.tmLanguage.json diff --git a/extensions/julia/.vscodeignore b/extensions/julia/.vscodeignore new file mode 100644 index 00000000000..d9011becfb6 --- /dev/null +++ b/extensions/julia/.vscodeignore @@ -0,0 +1,2 @@ +build/** +cgmanifest.json diff --git a/extensions/julia/cgmanifest.json b/extensions/julia/cgmanifest.json new file mode 100644 index 00000000000..ef8a78a5761 --- /dev/null +++ b/extensions/julia/cgmanifest.json @@ -0,0 +1,17 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": " JuliaEditorSupport/atom-language-julia", + "repositoryUrl": "https://github.com/JuliaEditorSupport/atom-language-julia", + "commitHash": "df335e026376acd722439aa1ac08f0889ada022e" + } + }, + "license": "MIT", + "version": "0.20.2" + } + ], + "version": 1 +} \ No newline at end of file diff --git a/extensions/julia/language-configuration.json b/extensions/julia/language-configuration.json new file mode 100644 index 00000000000..ea2f5011739 --- /dev/null +++ b/extensions/julia/language-configuration.json @@ -0,0 +1,31 @@ +{ + "comments": { + "lineComment": "#", + "blockComment": [ "#=", "=#" ] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["`", "`"], + { "open": "\"", "close": "\"", "notIn": ["string", "comment"] } + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["`", "`"] + ], + "folding": { + "markers": { + "start": "^\\s*#region", + "end": "^\\s*#endregion" + } + } +} diff --git a/extensions/julia/package.json b/extensions/julia/package.json new file mode 100644 index 00000000000..fdf0ce01a7e --- /dev/null +++ b/extensions/julia/package.json @@ -0,0 +1,54 @@ +{ + "name": "julia", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "0.10.x" + }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js JuliaEditorSupport/atom-language-julia grammars/julia_vscode.json ./syntaxes/julia.tmLanguage.json" + }, + "contributes": { + "languages": [ + { + "id": "julia", + "aliases": [ + "Julia", + "julia" + ], + "extensions": [ + ".jl" + ], + "firstLine": "^#!\\s*/.*\\bjulia[0-9.-]*\\b", + "configuration": "./language-configuration.json" + }, + { + "id": "juliamarkdown", + "aliases": [ + "Julia Markdown", + "juliamarkdown" + ], + "extensions": [ + ".jmd" + ] + } + ], + "grammars": [ + { + "language": "julia", + "scopeName": "source.julia", + "path": "./syntaxes/julia.tmLanguage.json", + "embeddedLanguages": { + "meta.embedded.inline.cpp": "cpp", + "meta.embedded.inline.javascript": "javascript", + "meta.embedded.inline.python": "python", + "meta.embedded.inline.r": "r", + "meta.embedded.inline.sql": "sql" + } + } + ] + } +} diff --git a/extensions/julia/package.nls.json b/extensions/julia/package.nls.json new file mode 100644 index 00000000000..0da344107c1 --- /dev/null +++ b/extensions/julia/package.nls.json @@ -0,0 +1,4 @@ +{ + "displayName": "Julia Language Basics", + "description": "Provides syntax highlighting & bracket matching in Julia files." +} diff --git a/extensions/julia/syntaxes/julia.tmLanguage.json b/extensions/julia/syntaxes/julia.tmLanguage.json new file mode 100644 index 00000000000..a5a26c969d5 --- /dev/null +++ b/extensions/julia/syntaxes/julia.tmLanguage.json @@ -0,0 +1,1113 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/JuliaEditorSupport/atom-language-julia/blob/master/grammars/julia_vscode.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/JuliaEditorSupport/atom-language-julia/commit/df335e026376acd722439aa1ac08f0889ada022e", + "name": "Julia", + "scopeName": "source.julia", + "comment": "This grammar is used by Atom (Oniguruma), GitHub (PCRE), and VSCode (Oniguruma),\nso all regexps must be compatible with both engines.\n\nSpecs:\n- https://github.com/kkos/oniguruma/blob/master/doc/RE\n- https://www.pcre.org/current/doc/html/", + "patterns": [ + { + "include": "#operator" + }, + { + "include": "#array" + }, + { + "include": "#string" + }, + { + "include": "#bracket" + }, + { + "include": "#function_decl" + }, + { + "include": "#function_call" + }, + { + "include": "#keyword" + }, + { + "include": "#number" + }, + { + "include": "#comment" + }, + { + "include": "#type_decl" + }, + { + "include": "#symbol" + } + ], + "repository": { + "array": { + "patterns": [ + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "meta.bracket.julia" + } + }, + "end": "(?:\\])(?:(\\.)?'*)", + "endCaptures": { + "0": { + "name": "meta.bracket.julia" + }, + "1": { + "name": "keyword.operator.transpose.julia" + } + }, + "name": "meta.array.julia", + "patterns": [ + { + "match": "\\bbegin\\b", + "name": "constant.numeric.julia" + }, + { + "match": "\\bend\\b", + "name": "constant.numeric.julia" + }, + { + "match": "\\bfor\\b", + "name": "keyword.control.julia" + }, + { + "include": "$self" + } + ] + } + ] + }, + "bracket": { + "patterns": [ + { + "match": "(?:\\(|\\)|\\[|\\]|\\{|\\}|,|;)(?!('|(?:\\.'))*\\.?')", + "name": "meta.bracket.julia" + } + ] + }, + "comment": { + "patterns": [ + { + "include": "#comment_block" + }, + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.julia" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.julia" + } + ] + }, + "comment_block": { + "patterns": [ + { + "begin": "#=", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.julia" + } + }, + "end": "=#", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.julia" + } + }, + "name": "comment.block.number-sign-equals.julia", + "patterns": [ + { + "include": "#comment_block" + } + ] + } + ] + }, + "function_call": { + "patterns": [ + { + "begin": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?\\.?(?=\\()", + "beginCaptures": { + "1": { + "name": "support.function.julia" + }, + "2": { + "name": "support.type.julia" + } + }, + "end": "\\)(('|(\\.'))*\\.?')?", + "endCaptures": { + "0": { + "name": "meta.bracket.julia" + }, + "1": { + "name": "keyword.operator.transposed-func.julia" + } + }, + "patterns": [ + { + "match": "\\bfor\\b", + "name": "keyword.control.julia" + }, + { + "include": "$self" + } + ] + } + ] + }, + "function_decl": { + "patterns": [ + { + "captures": { + "1": { + "name": "entity.name.function.julia" + }, + "2": { + "name": "support.type.julia" + } + }, + "match": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?(?=\\(.*\\)(::[^\\s]+)?(\\s*\\bwhere\\b\\s+.+?)?\\s*?=(?![=>]))", + "comment": "first group is function name\nSecond group is type parameters (e.g. {T<:Number, S})\nThen open parens\nThen a lookahead ensures that we are followed by:\n - anything (function argumnets)\n - 0 or more spaces\n - Finally an equal sign\nNegative lookahead ensures we don't have another equal sign (not `==`)" + }, + { + "captures": { + "1": { + "name": "keyword.other.julia" + }, + "2": { + "name": "keyword.operator.dots.julia" + }, + "3": { + "name": "entity.name.function.julia" + }, + "4": { + "name": "support.type.julia" + } + }, + "match": "\\b(function|macro)(?:\\s+(?:(?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*(\\.))?((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?|\\s*)(?=\\()", + "comment": "similar regex to previous, but with keyword not 1-line syntax" + } + ] + }, + "keyword": { + "patterns": [ + { + "match": "\\b(?|<-|-->|=>)", + "name": "keyword.operator.arrow.julia" + }, + { + "match": "(?::=|\\+=|-=|\\*=|//=|/=|\\.//=|\\./=|\\.\\*=|\\\\=|\\.\\\\=|\\^=|\\.\\^=|%=|\\.%=|÷=|\\.÷=|\\|=|&=|\\.&=|⊻=|\\.⊻=|\\$=|<<=|>>=|>>>=|=(?!=))", + "name": "keyword.operator.update.julia" + }, + { + "match": "(?:<<|>>>|>>|\\.>>>|\\.>>|\\.<<)", + "name": "keyword.operator.shift.julia" + }, + { + "match": "(?:\\s*(::|>:|<:)\\s*((?:(?:Union)?\\([^)]*\\)|[[:alpha:]_$∇][[:word:]⁺-ₜ!′\\.]*(?:(?:{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})|(?:\".+?(?=|\\.>|\\.<=|\\.<|\\.≤|\\.≥|==|\\.!=|\\.=|\\.!|<:|>:|:>|(?)>=|(?|<|≥|≤)", + "name": "keyword.operator.relation.julia" + }, + { + "match": "(?<=\\s)(?:\\?)(?=\\s)", + "name": "keyword.operator.ternary.julia" + }, + { + "match": "(?<=\\s)(?:\\:)(?=\\s)", + "name": "keyword.operator.ternary.julia" + }, + { + "match": "(?:\\|\\||&&|(?)", + "name": "keyword.operator.applies.julia" + }, + { + "match": "(?:\\||\\.\\||\\&|\\.\\&|~|\\.~|⊻|\\.⊻)", + "name": "keyword.operator.bitwise.julia" + }, + { + "match": "(?:\\+\\+|--|\\+|\\.\\+|-|\\.\\-|\\*|\\.\\*|//(?!=)|\\.//(?!=)|/|\\./|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^|÷|\\.÷|⋅|\\.⋅|∩|\\.∩|∪|\\.∪|×|√|∛)", + "name": "keyword.operator.arithmetic.julia" + }, + { + "match": "(?:∘)", + "name": "keyword.operator.compose.julia" + }, + { + "match": "(?:::|(?<=\\s)isa(?=\\s))", + "name": "keyword.operator.isa.julia" + }, + { + "match": "(?:(?<=\\s)in(?=\\s))", + "name": "keyword.operator.relation.in.julia" + }, + { + "match": "(?:\\.(?=(?:@|_|\\p{L}))|\\.\\.+)", + "name": "keyword.operator.dots.julia" + }, + { + "match": "(?:\\$(?=.+))", + "name": "keyword.operator.interpolation.julia" + }, + { + "captures": { + "2": { + "name": "keyword.operator.transposed-variable.julia" + } + }, + "match": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-��]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)(('|(\\.'))*\\.?')" + }, + { + "captures": { + "1": { + "name": "bracket.end.julia" + }, + "2": { + "name": "keyword.operator.transposed-matrix.julia" + } + }, + "match": "(\\])((?:'|(?:\\.'))*\\.?')" + }, + { + "captures": { + "1": { + "name": "bracket.end.julia" + }, + "2": { + "name": "keyword.operator.transposed-parens.julia" + } + }, + "match": "(\\))((?:'|(?:\\.'))*\\.?')" + } + ] + }, + "string": { + "patterns": [ + { + "begin": "(?:(@doc)\\s((?:doc)?\"\"\")|(doc\"\"\"))", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "(\"\"\") ?(->)?", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.julia" + }, + "2": { + "name": "keyword.operator.arrow.julia" + } + }, + "name": "string.docstring.julia", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(i?cxx)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.cxx.julia", + "contentName": "meta.embedded.inline.cpp", + "patterns": [ + { + "include": "source.cpp#root_context" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "((i?cxxt?)|([rpv]cpp))(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "4": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "embed.cxx.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "contentName": "meta.embedded.inline.cpp", + "patterns": [ + { + "include": "source.cpp#root_context" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(py)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "([\\s\\w]*)(\"\"\")", + "endCaptures": { + "2": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.python.julia", + "contentName": "meta.embedded.inline.python", + "patterns": [ + { + "include": "source.python" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(py)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "(\\w*)(\")", + "name": "embed.python.julia", + "endCaptures": { + "2": { + "name": "punctuation.definition.string.end.julia" + } + }, + "contentName": "meta.embedded.inline.python", + "patterns": [ + { + "include": "source.python" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(js)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.js.julia", + "contentName": "meta.embedded.inline.javascript", + "patterns": [ + { + "include": "source.js" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(js)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "embed.js.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "contentName": "meta.embedded.inline.javascript", + "patterns": [ + { + "include": "source.js" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(R)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.R.julia", + "contentName": "meta.embedded.inline.r", + "patterns": [ + { + "include": "source.r" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(R)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "embed.R.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "contentName": "meta.embedded.inline.r", + "patterns": [ + { + "include": "source.r" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(raw)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "name": "string.quoted.other.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + } + }, + { + "begin": "(raw)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "string.quoted.other.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + } + }, + { + "begin": "(sql)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.sql.julia", + "contentName": "meta.embedded.inline.sql", + "patterns": [ + { + "include": "source.sql" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(sql)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.sql.julia", + "contentName": "meta.embedded.inline.sql", + "patterns": [ + { + "include": "source.sql" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "var\"\"\"", + "end": "\"\"\"", + "name": "constant.other.symbol.julia" + }, + { + "begin": "var\"", + "end": "\"", + "name": "constant.other.symbol.julia" + }, + { + "begin": "(md)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.markdown.julia", + "contentName": "meta.embedded.inline.markdown", + "patterns": [ + { + "include": "text.md" + }, + { + "include": "text.html.markdown.julia" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(md)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "embed.markdown.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "contentName": "meta.embedded.inline.markdown", + "patterns": [ + { + "include": "text.md" + }, + { + "include": "text.html.markdown.julia" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "^\\s?(doc)?(\"\"\")\\s?$", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "(\"\"\")", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "string.docstring.julia", + "comment": "This only matches docstrings that start and end with triple quotes on\ntheir own line in the void", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "'(?!')", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "string.quoted.single.julia", + "patterns": [ + { + "include": "#string_escaped_char" + } + ] + }, + { + "begin": "(?!:_)(?:struct|mutable\\s+struct|abstract\\s+type|primitive\\s+type)\\s+((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)(\\s*(<:)\\s*(?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*(?:{.*})?)?", + "name": "meta.type.julia" + } + ] + } + } +} \ No newline at end of file From c11bf9d7dfd561c618b3793e5cd11e4557767c0d Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 5 Feb 2021 18:07:54 +0100 Subject: [PATCH 02/91] register open explorer command with container --- .../contrib/files/browser/explorerViewlet.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/contrib/files/browser/explorerViewlet.ts b/src/vs/workbench/contrib/files/browser/explorerViewlet.ts index 8febbfd97c1..6a164f9abf2 100644 --- a/src/vs/workbench/contrib/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/contrib/files/browser/explorerViewlet.ts @@ -149,13 +149,6 @@ export class ExplorerViewletViewsContribution extends Disposable implements IWor ctorDescriptor: new SyncDescriptor(ExplorerView), order: 1, canToggleVisibility: false, - openCommandActionDescriptor: { - id: VIEW_CONTAINER.id, - title: localize('explore', "Explorer"), - mnemonicTitle: localize({ key: 'miViewExplorer', comment: ['&& denotes a mnemonic'] }, "&&Explorer"), - keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E }, - order: 0 - }, focusCommand: { id: 'workbench.explorer.fileView.focus' } @@ -283,7 +276,14 @@ export const VIEW_CONTAINER: ViewContainer = viewContainerRegistry.registerViewC icon: explorerViewIcon, alwaysUseContainerInfo: true, order: 0, -}, ViewContainerLocation.Sidebar, { donotRegisterOpenCommand: true, isDefault: true }); + openCommandActionDescriptor: { + id: VIEWLET_ID, + title: localize('explore', "Explorer"), + mnemonicTitle: localize({ key: 'miViewExplorer', comment: ['&& denotes a mnemonic'] }, "&&Explorer"), + keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E }, + order: 0 + }, +}, ViewContainerLocation.Sidebar, { isDefault: true }); const viewsRegistry = Registry.as(Extensions.ViewsRegistry); viewsRegistry.registerViewWelcomeContent(EmptyView.ID, { From 9ec337bb49c201c768f74cb760324f5791d3eaa8 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 Feb 2021 18:09:32 +0100 Subject: [PATCH 03/91] BreadcrumbsControl#update should know when something changed, https://github.com/microsoft/vscode/issues/112630 --- src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts b/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts index 026581b2999..3989a3184ee 100644 --- a/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts +++ b/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts @@ -251,12 +251,13 @@ export class BreadcrumbsControl { // honor diff editors and such const uri = EditorResourceAccessor.getCanonicalUri(this._editorGroup.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY }); + const wasHidden = this.isHidden(); if (!uri || !this._fileService.canHandleResource(uri)) { // cleanup and return when there is no input or when // we cannot handle this input this._ckBreadcrumbsPossible.set(false); - if (!this.isHidden()) { + if (!wasHidden) { this.hide(); return true; } else { @@ -315,7 +316,7 @@ export class BreadcrumbsControl { } }); - return true; + return wasHidden !== this.isHidden(); } private _onFocusEvent(event: IBreadcrumbsItemEvent): void { From ae0cfa4ec4c5ab7bd68a49a68c4034cbb35c5d2b Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Fri, 5 Feb 2021 10:54:47 -0800 Subject: [PATCH 04/91] fixes #115810 --- src/vs/base/browser/dom.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 04996c83c73..8f1b3448554 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -1476,12 +1476,13 @@ export class ModifierKeyEmitter extends Emitter { }; this._subscriptions.add(domEvent(document.body, 'keydown', true)(e => { - // if keydown event is repeated, ignore it #112347 - if (e.repeat) { - return; - } const event = new StandardKeyboardEvent(e); + // If Alt-key keydown event is repeated, ignore it #112347 + // Only known to be necessary for Alt-Key at the moment #115810 + if (event.keyCode === KeyCode.Alt && e.repeat) { + return; + } if (e.altKey && !this._keyStatus.altKey) { this._keyStatus.lastKeyPressed = 'alt'; From 339d6ddf18377f7108a7d5e55d32755456239728 Mon Sep 17 00:00:00 2001 From: Raymond Zhao Date: Fri, 5 Feb 2021 18:52:21 +0000 Subject: [PATCH 05/91] Fix #115854, #115839 --- extensions/emmet/package.json | 2 +- extensions/emmet/yarn.lock | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json index 4fe4b5f4bac..c786c715cde 100644 --- a/extensions/emmet/package.json +++ b/extensions/emmet/package.json @@ -439,7 +439,7 @@ "@emmetio/html-matcher": "^0.3.3", "@emmetio/math-expression": "^1.0.4", "image-size": "^0.5.2", - "vscode-emmet-helper": "2.2.4-3", + "vscode-emmet-helper": "2.2.4", "vscode-languageserver-textdocument": "^1.0.1" } } diff --git a/extensions/emmet/yarn.lock b/extensions/emmet/yarn.lock index b2b572223e9..50b50468365 100644 --- a/extensions/emmet/yarn.lock +++ b/extensions/emmet/yarn.lock @@ -58,6 +58,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.15.tgz#0de7e978fb43db62da369db18ea088a63673c182" integrity sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw== +"emmet@git+https://github.com/rzhao271/emmet.git#1b2df677d8925ef5ea6da9df8845968403979a0a": + version "2.3.0" + resolved "git+https://github.com/rzhao271/emmet.git#1b2df677d8925ef5ea6da9df8845968403979a0a" + dependencies: + "@emmetio/abbreviation" "^2.2.0" + "@emmetio/css-abbreviation" "^2.1.2" + "emmet@https://github.com/rzhao271/emmet.git#1b2df677d8925ef5ea6da9df8845968403979a0a": version "2.3.0" resolved "https://github.com/rzhao271/emmet.git#1b2df677d8925ef5ea6da9df8845968403979a0a" @@ -75,10 +82,10 @@ jsonc-parser@^2.3.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.1.tgz#59549150b133f2efacca48fe9ce1ec0659af2342" integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg== -vscode-emmet-helper@2.2.4-3: - version "2.2.4-3" - resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.2.4-3.tgz#b1aed7eaaf0ecc2480c65c819f6e9d42d2d3cf5a" - integrity sha512-M+pAiAro8nRiHb0/9lRoRzBod6DPlSwhOX26ZfM8n9a7/zr9ZJojxohDyGmnsApU5xVPhcrsNVI/fEagSeeO0Q== +vscode-emmet-helper@2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.2.4.tgz#8ab86d2b7fe9e6270b4c77c9fd8d1eb8f3f4c401" + integrity sha512-1N6bMzP1ZzkDGzamvsKxQ/lOmBc4+OQdj0dA2C9A5PSeYV9gh5xbJ061sm+VyFHOGZE+VyUQq5m/WFmFsLbKnA== dependencies: emmet "https://github.com/rzhao271/emmet.git#1b2df677d8925ef5ea6da9df8845968403979a0a" jsonc-parser "^2.3.0" From 392128e1fe55847616f939f2294cc24dd1c49cbc Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 5 Feb 2021 11:09:47 -0800 Subject: [PATCH 06/91] enable diff decorations first. --- .../workbench/contrib/notebook/browser/diff/diffComponents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.ts b/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.ts index e2f4b6cd8d2..d7a23d525c8 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.ts @@ -89,7 +89,7 @@ export const fixedDiffEditorOptions: IDiffEditorOptions = { ...fixedEditorOptions, glyphMargin: true, enableSplitViewResizing: false, - renderIndicators: false, + renderIndicators: true, readOnly: false, isInEmbeddedEditor: true, renderOverviewRuler: false From 4fc8dc82f3552ff9a5b65db4375dcc5b6afb5aff Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Fri, 5 Feb 2021 15:00:33 -0500 Subject: [PATCH 07/91] Fixes #110496 - use builtin gestures for open/diff --- extensions/git/src/commands.ts | 40 ++++++++++----- extensions/git/src/main.ts | 5 +- extensions/git/src/timelineProvider.ts | 51 ++++++++++++------- .../contrib/timeline/browser/timelinePane.ts | 21 +++++++- 4 files changed, 81 insertions(+), 36 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index e8b45122de4..aabea31a725 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -5,7 +5,7 @@ import * as os from 'os'; import * as path from 'path'; -import { commands, Disposable, LineChange, MessageOptions, OutputChannel, Position, ProgressLocation, QuickPickItem, Range, SourceControlResourceState, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window, workspace, WorkspaceEdit, WorkspaceFolder, TimelineItem, env, Selection, TextDocumentContentProvider } from 'vscode'; +import { Command, commands, Disposable, LineChange, MessageOptions, OutputChannel, Position, ProgressLocation, QuickPickItem, Range, SourceControlResourceState, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window, workspace, WorkspaceEdit, WorkspaceFolder, TimelineItem, env, Selection, TextDocumentContentProvider } from 'vscode'; import TelemetryReporter from 'vscode-extension-telemetry'; import * as nls from 'vscode-nls'; import { Branch, ForcePushMode, GitErrorCodes, Ref, RefType, Status, CommitOptions, RemoteSourceProvider } from './api/git'; @@ -153,21 +153,21 @@ class AddRemoteItem implements QuickPickItem { } } -interface CommandOptions { +interface ScmCommandOptions { repository?: boolean; diff?: boolean; } -interface Command { +interface ScmCommand { commandId: string; key: string; method: Function; - options: CommandOptions; + options: ScmCommandOptions; } -const Commands: Command[] = []; +const Commands: ScmCommand[] = []; -function command(commandId: string, options: CommandOptions = {}): Function { +function command(commandId: string, options: ScmCommandOptions = {}): Function { return (_target: any, key: string, descriptor: any) => { if (!(typeof descriptor.value === 'function')) { throw new Error('not supported'); @@ -2612,6 +2612,22 @@ export class CommandCenter { @command('git.timeline.openDiff', { repository: false }) async timelineOpenDiff(item: TimelineItem, uri: Uri | undefined, _source: string) { + const cmd = this.resolveTimelineOpenDiffCommand( + item, uri, + { + preserveFocus: true, + preview: true, + viewColumn: ViewColumn.Active + }, + ); + if (cmd === undefined) { + return undefined; + } + + return commands.executeCommand(cmd.command, ...(cmd.arguments ?? [])); + } + + resolveTimelineOpenDiffCommand(item: TimelineItem, uri: Uri | undefined, options?: TextDocumentShowOptions): Command | undefined { if (uri === undefined || uri === null || !GitTimelineItem.is(item)) { return undefined; } @@ -2628,13 +2644,11 @@ export class CommandCenter { title = localize('git.title.diffRefs', '{0} ({1}) ⟷ {0} ({2})', basename, item.shortPreviousRef, item.shortRef); } - const options: TextDocumentShowOptions = { - preserveFocus: true, - preview: true, - viewColumn: ViewColumn.Active + return { + command: 'vscode.diff', + title: 'Open Comparison', + arguments: [toGitUri(uri, item.previousRef), item.ref === '' ? uri : toGitUri(uri, item.ref), title, options] }; - - return commands.executeCommand('vscode.diff', toGitUri(uri, item.previousRef), item.ref === '' ? uri : toGitUri(uri, item.ref), title, options); } @command('git.timeline.copyCommitId', { repository: false }) @@ -2664,7 +2678,7 @@ export class CommandCenter { } } - private createCommand(id: string, key: string, method: Function, options: CommandOptions): (...args: any[]) => any { + private createCommand(id: string, key: string, method: Function, options: ScmCommandOptions): (...args: any[]) => any { const result = (...args: any[]) => { let result: Promise; diff --git a/extensions/git/src/main.ts b/extensions/git/src/main.ts index d5c81c8891f..f391996c968 100644 --- a/extensions/git/src/main.ts +++ b/extensions/git/src/main.ts @@ -73,12 +73,13 @@ async function createModel(context: ExtensionContext, outputChannel: OutputChann git.onOutput.addListener('log', onOutput); disposables.push(toDisposable(() => git.onOutput.removeListener('log', onOutput))); + const cc = new CommandCenter(git, model, outputChannel, telemetryReporter); disposables.push( - new CommandCenter(git, model, outputChannel, telemetryReporter), + cc, new GitFileSystemProvider(model), new GitDecorations(model), new GitProtocolHandler(), - new GitTimelineProvider(model) + new GitTimelineProvider(model, cc) ); checkGitVersion(info); diff --git a/extensions/git/src/timelineProvider.ts b/extensions/git/src/timelineProvider.ts index f00302f61ad..5a9a1390bf1 100644 --- a/extensions/git/src/timelineProvider.ts +++ b/extensions/git/src/timelineProvider.ts @@ -9,6 +9,7 @@ import { Model } from './model'; import { Repository, Resource } from './repository'; import { debounce } from './decorators'; import { emojify, ensureEmojis } from './emoji'; +import { CommandCenter } from './commands'; const localize = nls.loadMessageBundle(); @@ -73,7 +74,7 @@ export class GitTimelineProvider implements TimelineProvider { private repoDisposable: Disposable | undefined; private repoStatusDate: Date | undefined; - constructor(private readonly model: Model) { + constructor(private readonly model: Model, private commands: CommandCenter) { this.disposable = Disposable.from( model.onDidOpenRepository(this.onRepositoriesChanged, this), workspace.onDidChangeConfiguration(this.onConfigurationChanged, this) @@ -161,16 +162,20 @@ export class GitTimelineProvider implements TimelineProvider { const message = emojify(c.message); const item = new GitTimelineItem(c.hash, commits[i + 1]?.hash ?? `${c.hash}^`, message, date?.getTime() ?? 0, c.hash, 'git:file:commit'); - item.iconPath = new (ThemeIcon as any)('git-commit'); + item.iconPath = new ThemeIcon('git-commit'); if (showAuthor) { item.description = c.authorName; } item.detail = `${c.authorName} (${c.authorEmail}) — ${c.hash.substr(0, 8)}\n${dateFormatter.format(date)}\n\n${message}`; - item.command = { - title: 'Open Comparison', - command: 'git.timeline.openDiff', - arguments: [item, uri, this.id] - }; + + const cmd = this.commands.resolveTimelineOpenDiffCommand(item, uri); + if (cmd) { + item.command = { + title: 'Open Comparison', + command: cmd.command, + arguments: cmd.arguments, + }; + } return item; }); @@ -184,14 +189,18 @@ export class GitTimelineProvider implements TimelineProvider { const item = new GitTimelineItem('~', 'HEAD', localize('git.timeline.stagedChanges', 'Staged Changes'), date.getTime(), 'index', 'git:file:index'); // TODO@eamodio: Replace with a better icon -- reflecting its status maybe? - item.iconPath = new (ThemeIcon as any)('git-commit'); + item.iconPath = new ThemeIcon('git-commit'); item.description = ''; item.detail = localize('git.timeline.detail', '{0} — {1}\n{2}\n\n{3}', you, localize('git.index', 'Index'), dateFormatter.format(date), Resource.getStatusText(index.type)); - item.command = { - title: 'Open Comparison', - command: 'git.timeline.openDiff', - arguments: [item, uri, this.id] - }; + + const cmd = this.commands.resolveTimelineOpenDiffCommand(item, uri); + if (cmd) { + item.command = { + title: 'Open Comparison', + command: cmd.command, + arguments: cmd.arguments, + }; + } items.splice(0, 0, item); } @@ -202,14 +211,18 @@ export class GitTimelineProvider implements TimelineProvider { const item = new GitTimelineItem('', index ? '~' : 'HEAD', localize('git.timeline.uncommitedChanges', 'Uncommitted Changes'), date.getTime(), 'working', 'git:file:working'); // TODO@eamodio: Replace with a better icon -- reflecting its status maybe? - item.iconPath = new (ThemeIcon as any)('git-commit'); + item.iconPath = new ThemeIcon('git-commit'); item.description = ''; item.detail = localize('git.timeline.detail', '{0} — {1}\n{2}\n\n{3}', you, localize('git.workingTree', 'Working Tree'), dateFormatter.format(date), Resource.getStatusText(working.type)); - item.command = { - title: 'Open Comparison', - command: 'git.timeline.openDiff', - arguments: [item, uri, this.id] - }; + + const cmd = this.commands.resolveTimelineOpenDiffCommand(item, uri); + if (cmd) { + item.command = { + title: 'Open Comparison', + command: cmd.command, + arguments: cmd.arguments, + }; + } items.splice(0, 0, item); } diff --git a/src/vs/workbench/contrib/timeline/browser/timelinePane.ts b/src/vs/workbench/contrib/timeline/browser/timelinePane.ts index 2057bc5a2aa..70fa384c259 100644 --- a/src/vs/workbench/contrib/timeline/browser/timelinePane.ts +++ b/src/vs/workbench/contrib/timeline/browser/timelinePane.ts @@ -44,6 +44,7 @@ import { ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems'; import { ColorScheme } from 'vs/platform/theme/common/theme'; import { Codicon } from 'vs/base/common/codicons'; import { registerIcon } from 'vs/platform/theme/common/iconRegistry'; +import { API_OPEN_DIFF_EDITOR_COMMAND_ID, API_OPEN_EDITOR_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands'; const ItemHeight = 22; @@ -888,6 +889,7 @@ export class TimelinePane extends ViewPane { } }, keyboardNavigationLabelProvider: new TimelineKeyboardNavigationLabelProvider(), + multipleSelectionSupport: true, overrideStyles: { listBackground: this.getBackgroundColor(), } @@ -900,14 +902,29 @@ export class TimelinePane extends ViewPane { return; } - const item = e.element; + const selection = this.tree.getSelection(); + let item; + if (selection.length === 1) { + item = selection[0]; + } + + // const item = e.element; if (item === null) { return; } if (isTimelineItem(item)) { if (item.command) { - this.commandService.executeCommand(item.command.id, ...(item.command.arguments || [])); + let args = item.command.arguments ?? []; + if (item.command.id === API_OPEN_EDITOR_COMMAND_ID || item.command.id === API_OPEN_DIFF_EDITOR_COMMAND_ID) { + // Some commands owned by us should receive the + // `IOpenEvent` as context to open properly + args = [...args, e]; + } + + this.commandService.executeCommand(item.command.id, ...args); + + // this.commandService.executeCommand(item.command.id, ...(item.command.arguments || [])); } } else if (isLoadMoreCommand(item)) { From cd725da2b2290b2077b1e78143551e88134c63b8 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 5 Feb 2021 12:04:02 -0800 Subject: [PATCH 08/91] xterm@4.11.0-beta.3 Diff: https://github.com/xtermjs/xterm.js/compare/2936f80...a73fe62 Fixes #102194 --- package.json | 2 +- remote/package.json | 2 +- remote/web/package.json | 2 +- remote/web/yarn.lock | 8 ++++---- remote/yarn.lock | 8 ++++---- yarn.lock | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 41c7832b7df..a16aefed172 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "vscode-ripgrep": "^1.11.1", "vscode-sqlite3": "4.0.10", "vscode-textmate": "5.2.0", - "xterm": "4.11.0-beta.2", + "xterm": "4.11.0-beta.3", "xterm-addon-search": "0.8.0", "xterm-addon-unicode11": "0.3.0-beta.3", "xterm-addon-webgl": "0.10.0-beta.2", diff --git a/remote/package.json b/remote/package.json index 97d84e01912..3d36902888e 100644 --- a/remote/package.json +++ b/remote/package.json @@ -22,7 +22,7 @@ "vscode-regexpp": "^3.1.0", "vscode-ripgrep": "^1.11.1", "vscode-textmate": "5.2.0", - "xterm": "4.11.0-beta.2", + "xterm": "4.11.0-beta.3", "xterm-addon-search": "0.8.0", "xterm-addon-unicode11": "0.3.0-beta.3", "xterm-addon-webgl": "0.10.0-beta.2", diff --git a/remote/web/package.json b/remote/web/package.json index 65c7cb3fef0..6084e4460cc 100644 --- a/remote/web/package.json +++ b/remote/web/package.json @@ -8,7 +8,7 @@ "tas-client-umd": "0.1.2", "vscode-oniguruma": "1.3.1", "vscode-textmate": "5.2.0", - "xterm": "4.11.0-beta.2", + "xterm": "4.11.0-beta.3", "xterm-addon-search": "0.8.0", "xterm-addon-unicode11": "0.3.0-beta.3", "xterm-addon-webgl": "0.10.0-beta.2" diff --git a/remote/web/yarn.lock b/remote/web/yarn.lock index bba1210d75c..9bcfb3b1e72 100644 --- a/remote/web/yarn.lock +++ b/remote/web/yarn.lock @@ -42,7 +42,7 @@ xterm-addon-webgl@0.10.0-beta.2: resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.10.0-beta.2.tgz#520547b2f845b2f9265f1817140b0f4e114c4a55" integrity sha512-DLfmF5+H1M/0BABEaqJlLUasKck7TjyRWVlzGflFTWVCr7/Kqaf0al4KMlw3yWX76A1ITGXrWj0qbDn2Sixl2Q== -xterm@4.11.0-beta.2: - version "4.11.0-beta.2" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.11.0-beta.2.tgz#a95560b61c771f54a336c2eb10e1472e556d9f4b" - integrity sha512-0BUaAfuclnowirdOuB13OGgq6OUGg/8etnRVT6apgnOrLGOLRCE1NiL3KhxotleAf4gVP0m3iCxsIr3csDY40g== +xterm@4.11.0-beta.3: + version "4.11.0-beta.3" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.11.0-beta.3.tgz#f19b4aaabdd634a6e62a96d770d6a8e8be0664b9" + integrity sha512-hmAbSwmgYDgQPE5A2UtfpU+Wta4PYIpsDlnGwbhC783OwcYK8ZW0XajhTIQGZywpZb9bXusNmpcGeVsqHYWGLg== diff --git a/remote/yarn.lock b/remote/yarn.lock index e3c62dd28a3..a264b79dde8 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -465,10 +465,10 @@ xterm-addon-webgl@0.10.0-beta.2: resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.10.0-beta.2.tgz#520547b2f845b2f9265f1817140b0f4e114c4a55" integrity sha512-DLfmF5+H1M/0BABEaqJlLUasKck7TjyRWVlzGflFTWVCr7/Kqaf0al4KMlw3yWX76A1ITGXrWj0qbDn2Sixl2Q== -xterm@4.11.0-beta.2: - version "4.11.0-beta.2" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.11.0-beta.2.tgz#a95560b61c771f54a336c2eb10e1472e556d9f4b" - integrity sha512-0BUaAfuclnowirdOuB13OGgq6OUGg/8etnRVT6apgnOrLGOLRCE1NiL3KhxotleAf4gVP0m3iCxsIr3csDY40g== +xterm@4.11.0-beta.3: + version "4.11.0-beta.3" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.11.0-beta.3.tgz#f19b4aaabdd634a6e62a96d770d6a8e8be0664b9" + integrity sha512-hmAbSwmgYDgQPE5A2UtfpU+Wta4PYIpsDlnGwbhC783OwcYK8ZW0XajhTIQGZywpZb9bXusNmpcGeVsqHYWGLg== yauzl@^2.9.2: version "2.10.0" diff --git a/yarn.lock b/yarn.lock index 930553d75b0..1bf0fd07c68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10373,10 +10373,10 @@ xterm-addon-webgl@0.10.0-beta.2: resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.10.0-beta.2.tgz#520547b2f845b2f9265f1817140b0f4e114c4a55" integrity sha512-DLfmF5+H1M/0BABEaqJlLUasKck7TjyRWVlzGflFTWVCr7/Kqaf0al4KMlw3yWX76A1ITGXrWj0qbDn2Sixl2Q== -xterm@4.11.0-beta.2: - version "4.11.0-beta.2" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.11.0-beta.2.tgz#a95560b61c771f54a336c2eb10e1472e556d9f4b" - integrity sha512-0BUaAfuclnowirdOuB13OGgq6OUGg/8etnRVT6apgnOrLGOLRCE1NiL3KhxotleAf4gVP0m3iCxsIr3csDY40g== +xterm@4.11.0-beta.3: + version "4.11.0-beta.3" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.11.0-beta.3.tgz#f19b4aaabdd634a6e62a96d770d6a8e8be0664b9" + integrity sha512-hmAbSwmgYDgQPE5A2UtfpU+Wta4PYIpsDlnGwbhC783OwcYK8ZW0XajhTIQGZywpZb9bXusNmpcGeVsqHYWGLg== y18n@^3.2.1: version "3.2.2" From acb1bfa51c6fdb114968d86a7408db3463a206be Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 5 Feb 2021 12:07:06 -0800 Subject: [PATCH 09/91] Update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a16aefed172..b4e5cfd8a91 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.54.0", - "distro": "4966164fe41969953ac8c69cbede9a8b488de2a0", + "distro": "e555ce6c25c9e08034b3ba25b24e32bc1b0815fb", "author": { "name": "Microsoft Corporation" }, From 6302319a4ab6be989de144b1bc2c3ce060d0a502 Mon Sep 17 00:00:00 2001 From: Raymond Zhao Date: Fri, 5 Feb 2021 20:22:22 +0000 Subject: [PATCH 10/91] Fix Emmet yarn lock --- extensions/emmet/yarn.lock | 7 ------- 1 file changed, 7 deletions(-) diff --git a/extensions/emmet/yarn.lock b/extensions/emmet/yarn.lock index 50b50468365..bebce02cf48 100644 --- a/extensions/emmet/yarn.lock +++ b/extensions/emmet/yarn.lock @@ -58,13 +58,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.15.tgz#0de7e978fb43db62da369db18ea088a63673c182" integrity sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw== -"emmet@git+https://github.com/rzhao271/emmet.git#1b2df677d8925ef5ea6da9df8845968403979a0a": - version "2.3.0" - resolved "git+https://github.com/rzhao271/emmet.git#1b2df677d8925ef5ea6da9df8845968403979a0a" - dependencies: - "@emmetio/abbreviation" "^2.2.0" - "@emmetio/css-abbreviation" "^2.1.2" - "emmet@https://github.com/rzhao271/emmet.git#1b2df677d8925ef5ea6da9df8845968403979a0a": version "2.3.0" resolved "https://github.com/rzhao271/emmet.git#1b2df677d8925ef5ea6da9df8845968403979a0a" From bdd51f1a0482fbec1f17f2a6a97b5fa62d464b63 Mon Sep 17 00:00:00 2001 From: Raymond Zhao Date: Fri, 5 Feb 2021 21:37:03 +0000 Subject: [PATCH 11/91] Add name to mailmap --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index d54a71fdf1f..02e8499fe42 100644 --- a/.mailmap +++ b/.mailmap @@ -1,2 +1,3 @@ Eric Amodio Eric Amodio Daniel Imms Daniel Imms +Raymond Zhao lmp From 686f84aacf389515191ef7857b94a7e4747266d9 Mon Sep 17 00:00:00 2001 From: Raymond Zhao Date: Fri, 5 Feb 2021 21:37:36 +0000 Subject: [PATCH 12/91] Fix typo --- .mailmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 02e8499fe42..868fdc51ec3 100644 --- a/.mailmap +++ b/.mailmap @@ -1,3 +1,3 @@ Eric Amodio Eric Amodio Daniel Imms Daniel Imms -Raymond Zhao lmp +Raymond Zhao From 125bbba18dde210b2b208bc6048c03cdea2b2138 Mon Sep 17 00:00:00 2001 From: tanhakabir Date: Fri, 5 Feb 2021 13:39:09 -0800 Subject: [PATCH 13/91] Add self to mailmap --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 868fdc51ec3..a6283478a8c 100644 --- a/.mailmap +++ b/.mailmap @@ -1,3 +1,4 @@ Eric Amodio Eric Amodio Daniel Imms Daniel Imms +Tanha Kabir Tanha Kabir Raymond Zhao From 152ccfbf3abe20dfdcb54d4cb9944458531dc105 Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Fri, 5 Feb 2021 13:58:07 -0800 Subject: [PATCH 14/91] Update .mailmap --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index a6283478a8c..bd9e4941e50 100644 --- a/.mailmap +++ b/.mailmap @@ -2,3 +2,4 @@ Eric Amodio Eric Amodio Daniel Imms Daniel Imms Tanha Kabir Tanha Kabir Raymond Zhao +Tyler Leonhardt Tyler Leonhardt From d68691c4445d94c68b80caa8ce2c7c8a7d5febd4 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Fri, 5 Feb 2021 14:09:23 -0800 Subject: [PATCH 15/91] fix #115931 --- src/vs/workbench/contrib/terminal/browser/terminalView.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalView.ts b/src/vs/workbench/contrib/terminal/browser/terminalView.ts index 0638edb649d..7674a991804 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalView.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalView.ts @@ -353,7 +353,7 @@ registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) = class SwitchTerminalActionViewItem extends SelectActionViewItem { private _lastOptions: ISelectOptionItem[] = []; - + private _lastActiveTab: number = 0; constructor( action: IAction, @ITerminalService private readonly _terminalService: ITerminalService, @@ -382,9 +382,10 @@ class SwitchTerminalActionViewItem extends SelectActionViewItem { private _updateItems(): void { const options = getTerminalSelectOpenItems(this._terminalService, this._contributions); // only update options if they've changed - if (!equals(Object.values(options), Object.values(this._lastOptions))) { + if (!equals(Object.values(options), Object.values(this._lastOptions)) || this._lastActiveTab !== this._terminalService.activeTabIndex) { this.setOptions(options, this._terminalService.activeTabIndex); this._lastOptions = options; + this._lastActiveTab = this._terminalService.activeTabIndex; } } } From cfaf161c497826ebc0a300088a21c9514699eb04 Mon Sep 17 00:00:00 2001 From: Jackson Kearl Date: Fri, 5 Feb 2021 14:57:41 -0800 Subject: [PATCH 16/91] Bump actions (for the last time! moving to `stable` branch vs release tags) --- .github/workflows/author-verified.yml | 18 ++++++------------ .github/workflows/commands.yml | 2 +- .github/workflows/deep-classifier-monitor.yml | 2 +- .github/workflows/deep-classifier-runner.yml | 2 +- .github/workflows/deep-classifier-scraper.yml | 2 +- .github/workflows/english-please.yml | 2 +- .github/workflows/feature-request.yml | 2 +- .github/workflows/latest-release-monitor.yml | 2 +- .github/workflows/locker.yml | 2 +- .github/workflows/needs-more-info-closer.yml | 2 +- .github/workflows/on-label.yml | 16 ++++++---------- .github/workflows/on-open.yml | 2 +- .github/workflows/release-pipeline-labeler.yml | 2 +- .github/workflows/test-plan-item-validator.yml | 2 +- 14 files changed, 24 insertions(+), 34 deletions(-) diff --git a/.github/workflows/author-verified.yml b/.github/workflows/author-verified.yml index 33b4b607615..cec81d639ab 100644 --- a/.github/workflows/author-verified.yml +++ b/.github/workflows/author-verified.yml @@ -13,28 +13,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions - if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'author-verification-requested') + if: contains(github.event.issue.labels.*.name, 'author-verification-requested') && contains(github.event.issue.labels.*.name, 'insiders-released') uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions - if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'author-verification-requested') + if: contains(github.event.issue.labels.*.name, 'author-verification-requested') && contains(github.event.issue.labels.*.name, 'insiders-released') run: npm install --production --prefix ./actions - - name: Checkout Repo - if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'author-verification-requested') - uses: actions/checkout@v2 - with: - path: ./repo - fetch-depth: 0 - name: Run Author Verified - if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'author-verification-requested') + if: contains(github.event.issue.labels.*.name, 'author-verification-requested') && contains(github.event.issue.labels.*.name, 'insiders-released') uses: ./actions/author-verified with: appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}} - requestVerificationComment: "This bug has been fixed in to the latest release of [VS Code Insiders](https://code.visualstudio.com/insiders/)!\n\n@${author}, you can help us out by commenting `/verified` if things are now working as expected.\n\nIf things still don't seem right, please ensure you're on version ${commit} of Insiders (today's or later - you can use `Help: About` in the command palette to check), and leave a comment letting us know what isn't working as expected.\n\nHappy Coding!" - pendingReleaseLabel: awaiting-insiders-release + requestVerificationComment: "This bug has been fixed in the latest release of [VS Code Insiders](https://code.visualstudio.com/insiders/)!\n\n@${author}, you can help us out by commenting `/verified` if things are now working as expected.\n\nIf things still don't seem right, please ensure you're on version ${commit} of Insiders (today's or later - you can use `Help: About` in the command palette to check), and leave a comment letting us know what isn't working as expected.\n\nHappy Coding!" + releasedLabel: insiders-released verifiedLabel: verified authorVerificationRequestedLabel: author-verification-requested diff --git a/.github/workflows/commands.yml b/.github/workflows/commands.yml index f189a10a2cd..f7faf5db6bc 100644 --- a/.github/workflows/commands.yml +++ b/.github/workflows/commands.yml @@ -13,7 +13,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions run: npm install --production --prefix ./actions - name: Run Commands diff --git a/.github/workflows/deep-classifier-monitor.yml b/.github/workflows/deep-classifier-monitor.yml index e8ad08aab97..106266d0cff 100644 --- a/.github/workflows/deep-classifier-monitor.yml +++ b/.github/workflows/deep-classifier-monitor.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/deep-classifier-runner.yml b/.github/workflows/deep-classifier-runner.yml index af42751b6fe..674b35d0b78 100644 --- a/.github/workflows/deep-classifier-runner.yml +++ b/.github/workflows/deep-classifier-runner.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/deep-classifier-scraper.yml b/.github/workflows/deep-classifier-scraper.yml index 837e569689e..78a9b7f9f17 100644 --- a/.github/workflows/deep-classifier-scraper.yml +++ b/.github/workflows/deep-classifier-scraper.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/english-please.yml b/.github/workflows/english-please.yml index 70ae98f4002..a11a9a357c6 100644 --- a/.github/workflows/english-please.yml +++ b/.github/workflows/english-please.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions if: contains(github.event.issue.labels.*.name, '*english-please') diff --git a/.github/workflows/feature-request.yml b/.github/workflows/feature-request.yml index 22307714747..bce7976b0c6 100644 --- a/.github/workflows/feature-request.yml +++ b/.github/workflows/feature-request.yml @@ -18,7 +18,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'feature-request') run: npm install --production --prefix ./actions diff --git a/.github/workflows/latest-release-monitor.yml b/.github/workflows/latest-release-monitor.yml index bc4b6b55799..34148088b94 100644 --- a/.github/workflows/latest-release-monitor.yml +++ b/.github/workflows/latest-release-monitor.yml @@ -14,7 +14,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions run: npm install --production --prefix ./actions - name: Install Storage Module diff --git a/.github/workflows/locker.yml b/.github/workflows/locker.yml index 3cdf09ba68c..d0840daf02b 100644 --- a/.github/workflows/locker.yml +++ b/.github/workflows/locker.yml @@ -14,7 +14,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions run: npm install --production --prefix ./actions - name: Run Locker diff --git a/.github/workflows/needs-more-info-closer.yml b/.github/workflows/needs-more-info-closer.yml index d1f9a824dcd..bff4ce82697 100644 --- a/.github/workflows/needs-more-info-closer.yml +++ b/.github/workflows/needs-more-info-closer.yml @@ -14,7 +14,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions run: npm install --production --prefix ./actions - name: Run Needs More Info Closer diff --git a/.github/workflows/on-label.yml b/.github/workflows/on-label.yml index 86bbecb6884..4be8417a858 100644 --- a/.github/workflows/on-label.yml +++ b/.github/workflows/on-label.yml @@ -11,28 +11,24 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions run: npm install --production --prefix ./actions # source of truth in ./author-verified.yml - - name: Checkout Repo - if: contains(github.event.issue.labels.*.name, 'author-verification-requested') - uses: actions/checkout@v2 - with: - path: ./repo - fetch-depth: 0 - name: Run Author Verified - if: contains(github.event.issue.labels.*.name, 'author-verification-requested') + if: contains(github.event.issue.labels.*.name, 'author-verification-requested') && contains(github.event.issue.labels.*.name, 'insiders-released') uses: ./actions/author-verified with: appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} - requestVerificationComment: "This bug has been fixed in to the latest release of [VS Code Insiders](https://code.visualstudio.com/insiders/)!\n\n@${author}, you can help us out by confirming things are working as expected in the latest Insiders release. If things look good, please leave a comment with the text `/verified` to let us know. If not, please ensure you're on version ${commit} of Insiders (today's or later - you can use `Help: About` in the command palette to check), and leave a comment letting us know what isn't working as expected.\n\nHappy Coding!" - pendingReleaseLabel: awaiting-insiders-release + token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}} + requestVerificationComment: "This bug has been fixed in the latest release of [VS Code Insiders](https://code.visualstudio.com/insiders/)!\n\n@${author}, you can help us out by commenting `/verified` if things are now working as expected.\n\nIf things still don't seem right, please ensure you're on version ${commit} of Insiders (today's or later - you can use `Help: About` in the command palette to check), and leave a comment letting us know what isn't working as expected.\n\nHappy Coding!" + releasedLabel: insiders-released verifiedLabel: verified authorVerificationRequestedLabel: author-verification-requested + # source of truth in ./commands.yml - name: Run Commands uses: ./actions/commands diff --git a/.github/workflows/on-open.yml b/.github/workflows/on-open.yml index c500a0e2b76..e5dc42ac44a 100644 --- a/.github/workflows/on-open.yml +++ b/.github/workflows/on-open.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/release-pipeline-labeler.yml b/.github/workflows/release-pipeline-labeler.yml index edb01fa5278..0124667d4a8 100644 --- a/.github/workflows/release-pipeline-labeler.yml +++ b/.github/workflows/release-pipeline-labeler.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Checkout Repo if: github.event_name != 'issues' diff --git a/.github/workflows/test-plan-item-validator.yml b/.github/workflows/test-plan-item-validator.yml index 72c21346370..3d381236e09 100644 --- a/.github/workflows/test-plan-item-validator.yml +++ b/.github/workflows/test-plan-item-validator.yml @@ -14,7 +14,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions if: contains(github.event.issue.labels.*.name, 'testplan-item') || contains(github.event.issue.labels.*.name, 'invalid-testplan-item') run: npm install --production --prefix ./actions From 3c6756c11c9ebd1f8b2f040e27ab4caaf7cac7fe Mon Sep 17 00:00:00 2001 From: Jackson Kearl Date: Fri, 5 Feb 2021 14:58:29 -0800 Subject: [PATCH 17/91] Remove unused trigger --- .github/workflows/author-verified.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/author-verified.yml b/.github/workflows/author-verified.yml index cec81d639ab..2a24e793ac6 100644 --- a/.github/workflows/author-verified.yml +++ b/.github/workflows/author-verified.yml @@ -1,9 +1,5 @@ name: Author Verified on: - repository_dispatch: - types: [trigger-author-verified] - schedule: - - cron: 20 14 * * * # 4:20pm Zurich issues: types: [closed] From fc336c97d974d3630a1ba809b64d6957bdc81ff4 Mon Sep 17 00:00:00 2001 From: Jackson Kearl Date: Fri, 5 Feb 2021 15:07:22 -0800 Subject: [PATCH 18/91] allow \closedWith comment to add unreleaded label itself --- .github/workflows/{commands.yml => on-comment.yml} | 9 ++++++++- .github/workflows/on-label.yml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) rename .github/workflows/{commands.yml => on-comment.yml} (65%) diff --git a/.github/workflows/commands.yml b/.github/workflows/on-comment.yml similarity index 65% rename from .github/workflows/commands.yml rename to .github/workflows/on-comment.yml index f7faf5db6bc..8d661336a89 100644 --- a/.github/workflows/commands.yml +++ b/.github/workflows/on-comment.yml @@ -1,4 +1,4 @@ -name: Commands +name: On Comment on: issue_comment: types: [created] @@ -22,3 +22,10 @@ jobs: appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}} config-path: commands + - name: "Run Release Pipeline Labeler" + uses: ./actions/release-pipeline + with: + token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}} + appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} + notYetReleasedLabel: unreleased + insidersReleasedLabel: insiders-released diff --git a/.github/workflows/on-label.yml b/.github/workflows/on-label.yml index 4be8417a858..9d62de8e57c 100644 --- a/.github/workflows/on-label.yml +++ b/.github/workflows/on-label.yml @@ -29,7 +29,7 @@ jobs: authorVerificationRequestedLabel: author-verification-requested - # source of truth in ./commands.yml + # also make changes in ./on-comment.yml - name: Run Commands uses: ./actions/commands with: From ac60c82c7d755b7d6c60599f5f7f6f45f5f595e5 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Fri, 5 Feb 2021 15:55:50 -0800 Subject: [PATCH 19/91] add tests (#115944) --- .../src/singlefolder-tests/terminal.test.ts | 273 ++++++++++-------- 1 file changed, 145 insertions(+), 128 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts index 9cede7605b4..a24019b21fe 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { window, Pseudoterminal, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget, Disposable, UIKind, env, EnvironmentVariableMutatorType, EnvironmentVariableMutator, extensions, ExtensionContext, TerminalOptions, ExtensionTerminalOptions } from 'vscode'; -import { doesNotThrow, equal, ok, deepEqual, throws } from 'assert'; +import { window, Pseudoterminal, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget, Disposable, UIKind, env, EnvironmentVariableMutatorType, EnvironmentVariableMutator, extensions, ExtensionContext, TerminalOptions, ExtensionTerminalOptions, Terminal } from 'vscode'; +import { doesNotThrow, equal, deepEqual, throws } from 'assert'; import { assertNoRpc } from '../utils'; // Disable terminal tests: @@ -36,19 +36,25 @@ import { assertNoRpc } from '../utils'; disposables.length = 0; }); - test('sendText immediately after createTerminal should not throw', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(terminal, term); - } catch (e) { - done(e); - return; - } - terminal.dispose(); - disposables.push(window.onDidCloseTerminal(() => done())); - })); + test('sendText immediately after createTerminal should not throw', async () => { const terminal = window.createTerminal(); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); doesNotThrow(terminal.sendText.bind(terminal, 'echo "foo"')); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); }); (process.platform === 'linux' ? test.skip : test)('echo works in the default shell', (done) => { @@ -96,124 +102,133 @@ import { assertNoRpc } from '../utils'; }); }); - test('onDidCloseTerminal event fires when terminal is disposed', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(terminal, term); - } catch (e) { - done(e); - return; - } - terminal.dispose(); - disposables.push(window.onDidCloseTerminal(() => done())); - })); + test('onDidCloseTerminal event fires when terminal is disposed', async () => { const terminal = window.createTerminal(); - }); - - test('processId immediately after createTerminal should fetch the pid', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(terminal, term); - } catch (e) { - done(e); - return; - } - terminal.processId.then(id => { - try { - ok(id && id > 0); - } catch (e) { - done(e); - return; + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); } - terminal.dispose(); - disposables.push(window.onDidCloseTerminal(() => done())); - }); - })); + })); + }); + equal(result, terminal); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); + }); + + test('processId immediately after createTerminal should fetch the pid', async () => { const terminal = window.createTerminal(); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + let pid = await result.processId; + equal(true, pid && pid > 0); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); }); - test('name in constructor should set terminal.name', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(terminal, term); - } catch (e) { - done(e); - return; - } - terminal.dispose(); - disposables.push(window.onDidCloseTerminal(() => done())); - })); + test('name in constructor should set terminal.name', async () => { const terminal = window.createTerminal('a'); - try { - equal(terminal.name, 'a'); - } catch (e) { - done(e); - return; - } + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); }); - test('creationOptions should be set and readonly for TerminalOptions terminals', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(terminal, term); - } catch (e) { - done(e); - return; - } - terminal.dispose(); - disposables.push(window.onDidCloseTerminal(() => done())); - })); + test('creationOptions should be set and readonly for TerminalOptions terminals', async () => { const options = { name: 'foo', hideFromUser: true }; const terminal = window.createTerminal(options); - try { - equal(terminal.name, 'foo'); - const terminalOptions = terminal.creationOptions as TerminalOptions; - equal(terminalOptions.name, 'foo'); - equal(terminalOptions.hideFromUser, true); - throws(() => terminalOptions.name = 'bad', 'creationOptions should be readonly at runtime'); - } catch (e) { - done(e); - return; - } - }); - - test('onDidOpenTerminal should fire when a terminal is created', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(term.name, 'b'); - } catch (e) { - done(e); - return; - } - disposables.push(window.onDidCloseTerminal(() => done())); - terminal.dispose(); - })); - const terminal = window.createTerminal('b'); - }); - - test('exitStatus.code should be set to undefined after a terminal is disposed', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(term, terminal); - } catch (e) { - done(e); - return; - } - disposables.push(window.onDidCloseTerminal(t => { - try { - deepEqual(t.exitStatus, { code: undefined }); - } catch (e) { - done(e); - return; + const terminalOptions = terminal.creationOptions as TerminalOptions; + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); } - done(); })); terminal.dispose(); - })); + }); + throws(() => terminalOptions.name = 'bad', 'creationOptions should be readonly at runtime'); + }); + + test('onDidOpenTerminal should fire when a terminal is created', async () => { + const terminal = window.createTerminal('b'); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); + }); + + test('exitStatus.code should be set to undefined after a terminal is disposed', async () => { const terminal = window.createTerminal(); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + deepEqual(t.exitStatus, { code: undefined }); + r(); + } + })); + terminal.dispose(); + }); }); // test('onDidChangeActiveTerminal should fire when new terminals are created', (done) => { @@ -287,23 +302,25 @@ import { assertNoRpc } from '../utils'; // }); suite('hideFromUser', () => { - test('should be available to terminals API', done => { + test('should be available to terminals API', async () => { const terminal = window.createTerminal({ name: 'bg', hideFromUser: true }); - disposables.push(window.onDidOpenTerminal(t => { - try { - equal(t, terminal); - equal(t.name, 'bg'); - ok(window.terminals.indexOf(terminal) !== -1); - } catch (e) { - done(e); - return; - } - disposables.push(window.onDidCloseTerminal(() => { - // reg3.dispose(); - done(); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + equal(true, window.terminals.indexOf(terminal) !== -1); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } })); terminal.dispose(); - })); + }); }); }); From 7323c520847bf84888ec6b98c5a1a74898a0b9d1 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Fri, 5 Feb 2021 13:17:15 -0800 Subject: [PATCH 20/91] testing: avoid showing 100% if any test failed Fixes #115687 --- .../testing/browser/testingExplorerView.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts b/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts index 0bbd7917230..f433739f569 100644 --- a/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts +++ b/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts @@ -707,6 +707,8 @@ class TestsRenderer implements ITreeRenderer; + const collectCounts = (count: TestStateCount) => { const failed = count[TestRunState.Errored] + count[TestRunState.Failed]; const passed = count[TestRunState.Passed]; @@ -721,12 +723,17 @@ const collectCounts = (count: TestStateCount) => { }; }; -const getProgressText = ({ passed, runSoFar, skipped }: { passed: number, runSoFar: number, skipped: number }) => { - const percent = (passed / runSoFar * 100).toFixed(0); +const getProgressText = ({ passed, runSoFar, skipped, failed }: CountSummary) => { + let percent = passed / runSoFar * 100; + if (failed > 0) { + // fix: prevent from rounding to 100 if there's any failed test + percent = Math.min(percent, 99.9); + } + if (skipped === 0) { - return localize('testProgress', '{0}/{1} tests passed ({2}%)', passed, runSoFar, percent); + return localize('testProgress', '{0}/{1} tests passed ({2}%)', passed, runSoFar, percent.toPrecision(3)); } else { - return localize('testProgressWithSkip', '{0}/{1} tests passed ({2}%, {3} skipped)', passed, runSoFar, percent, skipped); + return localize('testProgressWithSkip', '{0}/{1} tests passed ({2}%, {3} skipped)', passed, runSoFar, percent.toPrecision(3), skipped); } }; From 01a3787cca067e91de3ed0c79cfdad9a79e64db7 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Fri, 5 Feb 2021 17:22:53 -0800 Subject: [PATCH 21/91] Remove 'grant access' badge when done, fixes #115950 --- .../authentication/browser/authenticationService.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/services/authentication/browser/authenticationService.ts b/src/vs/workbench/services/authentication/browser/authenticationService.ts index e8b2623a6da..2ca2490cc62 100644 --- a/src/vs/workbench/services/authentication/browser/authenticationService.ts +++ b/src/vs/workbench/services/authentication/browser/authenticationService.ts @@ -324,8 +324,6 @@ export class AuthenticationService extends Disposable implements IAuthentication Object.keys(accessRequests).forEach(extensionId => { this.removeAccessRequest(id, extensionId); }); - - this.updateBadgeCount(); } if (!this._authenticationProviders.size) { @@ -424,6 +422,7 @@ export class AuthenticationService extends Disposable implements IAuthentication if (providerRequests[extensionId]) { providerRequests[extensionId].disposables.forEach(d => d.dispose()); delete providerRequests[extensionId]; + this.updateBadgeCount(); } } @@ -457,9 +456,9 @@ export class AuthenticationService extends Disposable implements IAuthentication if (allow) { allowList.push({ id: extensionId, name: extensionName }); this.storageService.store(`${providerId}-${accountName}`, JSON.stringify(allowList), StorageScope.GLOBAL, StorageTarget.USER); - this.removeAccessRequest(providerId, extensionId); } + this.removeAccessRequest(providerId, extensionId); return allow; } @@ -505,9 +504,9 @@ export class AuthenticationService extends Disposable implements IAuthentication if (!allowList.find(allowed => allowed.id === extensionId)) { allowList.push({ id: extensionId, name: extensionName }); this.storageService.store(`${providerId}-${accountName}`, JSON.stringify(allowList), StorageScope.GLOBAL, StorageTarget.USER); - this.removeAccessRequest(providerId, extensionId); } + this.removeAccessRequest(providerId, extensionId); this.storageService.store(`${extensionName}-${providerId}`, session.id, StorageScope.GLOBAL, StorageTarget.MACHINE); quickPick.dispose(); From afd102cbd2e17305a510701d7fd963ec2528e4ea Mon Sep 17 00:00:00 2001 From: SteVen Batten <6561887+sbatten@users.noreply.github.com> Date: Sat, 6 Feb 2021 00:38:32 -0800 Subject: [PATCH 22/91] Trusted Workspaces Feature Branch Merge (#115961) * draft trusted workspace service / model * renaming * add request model and action * err fix * add request handlers with mock actions * some quick fixes * adding badge icon to activity bar gear * Add Statusbar item to indicate trust * Cleanup code * Add background color * Use theme color for the status background color * adding basic editing experience * observe trust with startup tasks * Extension enablement * Add capability to provide a custom message * Remove old actions * explorer: if you can not undo, pass undo to editor fixes #111630 * Remove plug icon from ports view Part of https://github.com/microsoft/vscode-internalbacklog/issues/1689 * Fixed compilation error * Handle extension uninstall * Handle extension install * Ability to prompt when state is untrusted * Do not change state is the modal dialog is dismissed or the Cancel button is pressed * Refactored enablement code * Prompt when installing from VSIX * Prompt when installing from the Gallery * Move file into the browser folder * fixes and polish * restructure workspace contributions * restructure actions and use confirmations * Initial draft of the proposed APIs * Added stubs for the proposed api * Trusted Workspace proposed API * Fix a regression introduced by merge * status bar indicator improvements * remove helper command as we now have hooks * verbose messaging for the immediate request * add indication to global activity icon of pending request * try personal title * Add configuration setting * Add additional extension actions * Fix contributions * Removed context key that is not needed * Fixed issue with the dialog * Reduce arbitrary event limiter from 16ms down to 4.16666 (support for monitors up-to 240hz) #107016 * Fixes #115221: update emoji tests * Give a higher priority to language configuration set via API call (#114684) * debug console menu action polish * Avoid the CSS general sibling combinator ~ for perf reasons * more notebook todos * Use label as tooltip fallback properly Part of #115337 * Fixes microsoft/monaco-editor#2329: Move `registerThemingParticipant` call to `/editor/` * Fix port label not always getting set Part of microsoft/vscode-remote-release#4364 * simplify map creation, fyi @bpasero * Fix #114432: Multiple save dialogs appearing on Windows if Ctrl+S is pressed multiple times (#114450) * fix multiple save dialogs appearing on Windows when spamming Ctrl+S * remove old fix and instead keep track of windows with open dialogs in the dialogMainService * keep initialisation of activeWindowDialogs in constructor * remove unused variable * some changes * queue dialogs based on hash of options * simplify structure, fix comment typo * Apply suggestions from code review Co-authored-by: Benjamin Pasero * remove unnecessary async/await for aquireFileDialogLock method * don't acquire file dialog lock for message boxes * use MessageBoxReturnValue | SaveDialogReturnValue | OpenDialogReturnValue instead of any type for getWindowDialogQueue * Apply suggestions from code review Co-authored-by: Benjamin Pasero Co-authored-by: Benjamin Pasero Co-authored-by: Benjamin Pasero * :lipstick: dialog main service locks * debt - adopt some ? operator * Better hiding of custom hover in icon label * Limit to 8ms (120fps) * more API todos for notebooks * :lipstick: * Update grammars * chore - group notebook specific api proposals together * added unreleased fixes to endgame notebook * Add changes back to the modal dialog * Add back the workspace trust proposed APIs * Adjust dialog buttons * Standardize on WorkspaceTrust name across interfaces, classes, variables * Renamed some of the missing keys * Add TestWorkspaceTrust stub and fix failing tests * Add requiresWorkspaceTrust property to fix test failure * remove notebook change Co-authored-by: Ladislau Szomoru Co-authored-by: isidor Co-authored-by: Alex Ross Co-authored-by: TacticalDan Co-authored-by: Alexandru Dima Co-authored-by: Johannes Rieken Co-authored-by: Cameron Co-authored-by: Benjamin Pasero Co-authored-by: Benjamin Pasero --- build/lib/i18n.resources.json | 4 + extensions/vscode-api-tests/package.json | 1 + .../platform/extensions/common/extensions.ts | 3 + .../workspace/common/workspaceTrust.ts | 375 ++++++++++++++++++ .../test/common/testWorkspaceTrust.ts | 31 ++ src/vs/vscode.proposed.d.ts | 56 +++ .../api/browser/mainThreadWorkspace.ts | 23 +- .../workbench/api/common/extHost.api.impl.ts | 20 +- .../workbench/api/common/extHost.protocol.ts | 7 +- src/vs/workbench/api/common/extHostTypes.ts | 6 + .../workbench/api/common/extHostWorkspace.ts | 26 +- .../browser/actions/workspaceActions.ts | 23 +- .../activitybar/media/activityaction.css | 13 + .../browser/parts/compositeBarActions.ts | 8 +- .../experimentService.test.ts | 3 + .../extensions/browser/extensionsActions.ts | 10 +- .../extensions/browser/extensionsIcons.ts | 1 + .../browser/extensionsWorkbenchService.ts | 67 +++- .../extensionsActions.test.ts | 3 + .../tasks/browser/abstractTaskService.ts | 4 +- .../tasks/browser/runAutomaticTasks.ts | 14 +- .../tasks/electron-browser/taskService.ts | 3 + .../browser/workspace.contribution.ts | 335 ++++++++++++++++ .../workspaceTrustFileSystemProvider.ts | 86 ++++ .../services/activity/common/activity.ts | 4 +- .../browser/extensionEnablementService.ts | 100 ++++- .../common/extensionManagement.ts | 1 + .../extensionEnablementService.test.ts | 18 +- .../services/extensions/common/extensions.ts | 10 + .../browser/api/extHostConfiguration.test.ts | 9 +- .../test/browser/api/extHostWorkspace.test.ts | 3 +- .../test/browser/workbenchTestServices.ts | 3 + src/vs/workbench/workbench.common.main.ts | 4 + 33 files changed, 1220 insertions(+), 54 deletions(-) create mode 100644 src/vs/platform/workspace/common/workspaceTrust.ts create mode 100644 src/vs/platform/workspace/test/common/testWorkspaceTrust.ts create mode 100644 src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts create mode 100644 src/vs/workbench/contrib/workspace/common/workspaceTrustFileSystemProvider.ts diff --git a/build/lib/i18n.resources.json b/build/lib/i18n.resources.json index bb2ed8a7e41..9dc574614ff 100644 --- a/build/lib/i18n.resources.json +++ b/build/lib/i18n.resources.json @@ -218,6 +218,10 @@ "name": "vs/workbench/contrib/webviewPanel", "project": "vscode-workbench" }, + { + "name": "vs/workbench/contrib/workspace", + "project": "vscode-workbench" + }, { "name": "vs/workbench/contrib/workspaces", "project": "vscode-workbench" diff --git a/extensions/vscode-api-tests/package.json b/extensions/vscode-api-tests/package.json index 162b2dce4e3..6974a720072 100644 --- a/extensions/vscode-api-tests/package.json +++ b/extensions/vscode-api-tests/package.json @@ -5,6 +5,7 @@ "publisher": "vscode", "license": "MIT", "enableProposedApi": true, + "requiresWorkspaceTrust": "onDemand", "private": true, "activationEvents": [], "main": "./out/extension", diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts index a1b15a23ae7..8f0a3b204c3 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts @@ -136,6 +136,8 @@ export interface IExtensionContributions { export type ExtensionKind = 'ui' | 'workspace' | 'web'; +export type ExtensionWorkspaceTrustRequirement = false | 'onStart' | 'onDemand'; + export function isIExtensionIdentifier(thing: any): thing is IExtensionIdentifier { return thing && typeof thing === 'object' @@ -190,6 +192,7 @@ export interface IExtensionManifest { readonly enableProposedApi?: boolean; readonly api?: string; readonly scripts?: { [key: string]: string; }; + readonly requiresWorkspaceTrust?: ExtensionWorkspaceTrustRequirement; } export const enum ExtensionType { diff --git a/src/vs/platform/workspace/common/workspaceTrust.ts b/src/vs/platform/workspace/common/workspaceTrust.ts new file mode 100644 index 00000000000..1990e310180 --- /dev/null +++ b/src/vs/platform/workspace/common/workspaceTrust.ts @@ -0,0 +1,375 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Emitter, Event } from 'vs/base/common/event'; +import { Disposable } from 'vs/base/common/lifecycle'; +import { URI } from 'vs/base/common/uri'; +import { localize } from 'vs/nls'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; +import { IWorkspace, IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; + +export const WORKSPACE_TRUST_ENABLED = 'workspace.trustEnabled'; +export const WORKSPACE_TRUST_URI = URI.parse('workspaceTrust:/Trusted Workspaces'); + +export enum WorkspaceTrustScope { + Local = 0, + Remote = 1 +} + +export enum WorkspaceTrustState { + Untrusted = 0, + Trusted = 1, + Unknown = 2 +} + +export function workspaceTrustStateToString(trustState: WorkspaceTrustState) { + switch (trustState) { + case WorkspaceTrustState.Trusted: + return localize('trusted', "Trusted"); + case WorkspaceTrustState.Untrusted: + return localize('untrusted', "Untrusted"); + case WorkspaceTrustState.Unknown: + default: + return localize('unknown', "Unknown"); + } +} + +export const WorkspaceTrustContext = { + PendingRequest: new RawContextKey('workspaceTrustPendingRequest', false), + TrustState: new RawContextKey('workspaceTrustState', WorkspaceTrustState.Unknown) +}; + +export interface IWorkspaceTrustModel { + + readonly onDidChangeTrustState: Event; + + setFolderTrustState(folder: URI, trustState: WorkspaceTrustState): void; + getFolderTrustState(folder: URI): WorkspaceTrustState; +} + +export interface IWorkspaceTrustRequest { + immediate: boolean; + message?: string; +} + +export interface IWorkspaceTrustRequestModel { + readonly trustRequest: IWorkspaceTrustRequest | undefined; + + readonly onDidInitiateRequest: Event; + readonly onDidCompleteRequest: Event; + + initiateRequest(request?: IWorkspaceTrustRequest): void; + completeRequest(trustState?: WorkspaceTrustState): void; +} + +export interface WorkspaceTrustStateChangeEvent { + previousTrustState: WorkspaceTrustState; + currentTrustState: WorkspaceTrustState; +} + +export type WorkspaceTrustChangeEvent = Event; + +export const IWorkspaceTrustService = createDecorator('workspaceTrustService'); + +export interface IWorkspaceTrustService { + readonly _serviceBrand: undefined; + + readonly requestModel: IWorkspaceTrustRequestModel; + + onDidChangeTrustState: WorkspaceTrustChangeEvent; + getWorkspaceTrustState(): WorkspaceTrustState; + isWorkspaceTrustEnabled(): boolean; + requireWorkspaceTrust(request: IWorkspaceTrustRequest): Promise; + resetWorkspaceTrust(): Promise; +} + +interface IWorkspaceTrustStateInfo { + localFolders: { uri: string, trustState: WorkspaceTrustState }[] + + // Removing complexity of remote items + //trustedRemoteItems: { uri: string }[] +} + +export const WORKSPACE_TRUST_STORAGE_KEY = 'content.trust.model.key'; + +export class WorkspaceTrustModel extends Disposable implements IWorkspaceTrustModel { + + private storageKey = WORKSPACE_TRUST_STORAGE_KEY; + private trustStateInfo: IWorkspaceTrustStateInfo; + + private readonly _onDidChangeTrustState = this._register(new Emitter()); + readonly onDidChangeTrustState = this._onDidChangeTrustState.event; + + constructor( + private readonly storageService: IStorageService + ) { + super(); + + this.trustStateInfo = this.loadTrustInfo(); + this._register(this.storageService.onDidChangeValue(changeEvent => { + if (changeEvent.key === this.storageKey) { + this.onDidStorageChange(); + } + })); + } + + private loadTrustInfo(): IWorkspaceTrustStateInfo { + const infoAsString = this.storageService.get(this.storageKey, StorageScope.GLOBAL); + + let result: IWorkspaceTrustStateInfo | undefined; + try { + if (infoAsString) { + result = JSON.parse(infoAsString); + } + } catch { } + + if (!result) { + result = { + localFolders: [], + //trustedRemoteItems: [] + }; + } + + if (!result.localFolders) { + result.localFolders = []; + } + + // if (!result.trustedRemoteItems) { + // result.trustedRemoteItems = []; + // } + + return result; + } + + private saveTrustInfo(): void { + this.storageService.store(this.storageKey, JSON.stringify(this.trustStateInfo), StorageScope.GLOBAL, StorageTarget.MACHINE); + } + + private onDidStorageChange(): void { + this.trustStateInfo = this.loadTrustInfo(); + + this._onDidChangeTrustState.fire(); + } + + setFolderTrustState(folder: URI, trustState: WorkspaceTrustState): void { + let changed = false; + + if (trustState === WorkspaceTrustState.Unknown) { + const before = this.trustStateInfo.localFolders.length; + this.trustStateInfo.localFolders = this.trustStateInfo.localFolders.filter(info => info.uri !== folder.toString()); + + if (this.trustStateInfo.localFolders.length !== before) { + changed = true; + } + } else { + let found = false; + for (const trustInfo of this.trustStateInfo.localFolders) { + if (trustInfo.uri === folder.toString()) { + found = true; + if (trustInfo.trustState !== trustState) { + trustInfo.trustState = trustState; + changed = true; + } + } + } + + if (!found) { + this.trustStateInfo.localFolders.push({ uri: folder.toString(), trustState }); + changed = true; + } + } + + if (changed) { + this.saveTrustInfo(); + } + } + + getFolderTrustState(folder: URI): WorkspaceTrustState { + for (const trustInfo of this.trustStateInfo.localFolders) { + if (trustInfo.uri === folder.toString()) { + return trustInfo.trustState; + } + } + + return WorkspaceTrustState.Unknown; + } +} + +export class WorkspaceTrustRequestModel extends Disposable implements IWorkspaceTrustRequestModel { + trustRequest: IWorkspaceTrustRequest | undefined; + + _onDidInitiateRequest = this._register(new Emitter()); + onDidInitiateRequest: Event = this._onDidInitiateRequest.event; + + _onDidCompleteRequest = this._register(new Emitter()); + onDidCompleteRequest = this._onDidCompleteRequest.event; + + initiateRequest(request: IWorkspaceTrustRequest): void { + if (this.trustRequest && (!request.immediate || this.trustRequest.immediate)) { + return; + } + + this.trustRequest = request; + this._onDidInitiateRequest.fire(); + } + + completeRequest(trustState?: WorkspaceTrustState): void { + this.trustRequest = undefined; + this._onDidCompleteRequest.fire(trustState); + } +} + +export class WorkspaceTrustService extends Disposable implements IWorkspaceTrustService { + + _serviceBrand: undefined; + private readonly dataModel: IWorkspaceTrustModel; + readonly requestModel: IWorkspaceTrustRequestModel; + + private readonly _onDidChangeTrustState = this._register(new Emitter()); + readonly onDidChangeTrustState = this._onDidChangeTrustState.event; + + private _currentTrustState: WorkspaceTrustState = WorkspaceTrustState.Unknown; + private _inFlightResolver?: (trustState: WorkspaceTrustState) => void; + private _trustRequestPromise?: Promise; + private _workspace: IWorkspace; + + private readonly _ctxWorkspaceTrustState: IContextKey; + private readonly _ctxWorkspaceTrustPendingRequest: IContextKey; + + constructor( + @IStorageService private readonly storageService: IStorageService, + @IWorkspaceContextService private readonly workspaceService: IWorkspaceContextService, + @IConfigurationService readonly configurationService: IConfigurationService, + @IContextKeyService readonly contextKeyService: IContextKeyService + ) { + super(); + + this.dataModel = this._register(new WorkspaceTrustModel(this.storageService)); + this.requestModel = this._register(new WorkspaceTrustRequestModel()); + + this._workspace = this.workspaceService.getWorkspace(); + this._currentTrustState = this.calculateWorkspaceTrustState(); + + this._register(this.dataModel.onDidChangeTrustState(() => this.currentTrustState = this.calculateWorkspaceTrustState())); + this._register(this.requestModel.onDidCompleteRequest((trustState) => this.onTrustRequestCompleted(trustState))); + + this._ctxWorkspaceTrustState = WorkspaceTrustContext.TrustState.bindTo(contextKeyService); + this._ctxWorkspaceTrustPendingRequest = WorkspaceTrustContext.PendingRequest.bindTo(contextKeyService); + this._ctxWorkspaceTrustState.set(this.currentTrustState); + } + + private get currentTrustState(): WorkspaceTrustState { + return this._currentTrustState; + } + + private set currentTrustState(trustState: WorkspaceTrustState) { + if (this._currentTrustState === trustState) { return; } + const previousState = this._currentTrustState; + this._currentTrustState = trustState; + + this._onDidChangeTrustState.fire({ previousTrustState: previousState, currentTrustState: this._currentTrustState }); + } + + private calculateWorkspaceTrustState(): WorkspaceTrustState { + if (!this.isWorkspaceTrustEnabled()) { + return WorkspaceTrustState.Trusted; + } + + if (this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY) { + return WorkspaceTrustState.Trusted; + } + + let state = undefined; + for (const folder of this._workspace.folders) { + const folderTrust = this.dataModel.getFolderTrustState(folder.uri); + + switch (folderTrust) { + case WorkspaceTrustState.Untrusted: + return WorkspaceTrustState.Untrusted; + case WorkspaceTrustState.Unknown: + state = folderTrust; + break; + case WorkspaceTrustState.Trusted: + if (state === undefined) { + state = folderTrust; + } + break; + } + } + + return state ?? WorkspaceTrustState.Unknown; + } + + private onTrustRequestCompleted(trustState?: WorkspaceTrustState): void { + if (this._inFlightResolver) { + this._inFlightResolver(trustState === undefined ? this.currentTrustState : trustState); + } + + this._inFlightResolver = undefined; + this._trustRequestPromise = undefined; + + if (trustState === undefined) { + return; + } + + this._workspace.folders.forEach(folder => { + this.dataModel.setFolderTrustState(folder.uri, trustState); + }); + + this._ctxWorkspaceTrustPendingRequest.set(false); + this._ctxWorkspaceTrustState.set(trustState); + } + + getWorkspaceTrustState(): WorkspaceTrustState { + return this.currentTrustState; + } + + isWorkspaceTrustEnabled(): boolean { + return this.configurationService.getValue(WORKSPACE_TRUST_ENABLED) ?? false; + } + + async requireWorkspaceTrust(request?: IWorkspaceTrustRequest): Promise { + if (this.currentTrustState === WorkspaceTrustState.Trusted) { + return this.currentTrustState; + } + if (this.currentTrustState === WorkspaceTrustState.Untrusted && !request?.immediate) { + return this.currentTrustState; + } + + if (this._trustRequestPromise) { + if (request?.immediate && + this.requestModel.trustRequest && + !this.requestModel.trustRequest.immediate) { + this.requestModel.initiateRequest(request); + } + + return this._trustRequestPromise; + } + + this._trustRequestPromise = new Promise(resolve => { + this._inFlightResolver = resolve; + }); + + this.requestModel.initiateRequest(request); + this._ctxWorkspaceTrustPendingRequest.set(true); + + return this._trustRequestPromise; + } + + async resetWorkspaceTrust(): Promise { + if (this.currentTrustState !== WorkspaceTrustState.Unknown) { + this._workspace.folders.forEach(folder => { + this.dataModel.setFolderTrustState(folder.uri, WorkspaceTrustState.Unknown); + }); + } + return Promise.resolve(WorkspaceTrustState.Unknown); + } +} + +registerSingleton(IWorkspaceTrustService, WorkspaceTrustService); diff --git a/src/vs/platform/workspace/test/common/testWorkspaceTrust.ts b/src/vs/platform/workspace/test/common/testWorkspaceTrust.ts new file mode 100644 index 00000000000..f7a189af2b6 --- /dev/null +++ b/src/vs/platform/workspace/test/common/testWorkspaceTrust.ts @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Event } from 'vs/base/common/event'; +import { IWorkspaceTrustRequest, IWorkspaceTrustRequestModel, IWorkspaceTrustService, WorkspaceTrustChangeEvent, WorkspaceTrustRequestModel, WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust'; + +export class TestWorkspaceTrustService implements IWorkspaceTrustService { + _serviceBrand: undefined; + + requestModel: IWorkspaceTrustRequestModel = new WorkspaceTrustRequestModel(); + + onDidChangeTrustState: WorkspaceTrustChangeEvent = Event.None; + + getWorkspaceTrustState(): WorkspaceTrustState { + return WorkspaceTrustState.Trusted; + } + + isWorkspaceTrustEnabled(): boolean { + return true; + } + + requireWorkspaceTrust(request: IWorkspaceTrustRequest): Promise { + return Promise.resolve(WorkspaceTrustState.Trusted); + } + + resetWorkspaceTrust(): Promise { + return Promise.resolve(WorkspaceTrustState.Unknown); + } +} diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 03779a0324e..837425917f5 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -2615,4 +2615,60 @@ declare module 'vscode' { } //#endregion + + //#region https://github.com/microsoft/vscode/issues/106488 + + export enum WorkspaceTrustState { + /** + * The workspace is untrusted, and it will have limited functionality. + */ + Untrusted = 0, + + /** + * The workspace is trusted, and all functionality will be available. + */ + Trusted = 1, + + /** + * The initial state of the workspace. + * + * If trust will be required, users will be prompted to make a choice. + */ + Unknown = 2 + } + + /** + * The event data that is fired when the trust state of the workspace changes + */ + export interface WorkspaceTrustStateChangeEvent { + /** + * Previous trust state of the workspace + */ + previousTrustState: WorkspaceTrustState; + + /** + * Current trust state of the workspace + */ + currentTrustState: WorkspaceTrustState; + } + + export namespace workspace { + /** + * The trust state of the current workspace + */ + export const trustState: WorkspaceTrustState; + + /** + * Prompt the user to chose whether to trust the current workspace + * @param message Optional message which would be displayed in the prompt + */ + export function requireWorkspaceTrust(message?: string): Thenable; + + /** + * Event that fires when the trust state of the current workspace changes + */ + export const onDidChangeWorkspaceTrustState: Event; + } + + //#endregion } diff --git a/src/vs/workbench/api/browser/mainThreadWorkspace.ts b/src/vs/workbench/api/browser/mainThreadWorkspace.ts index 946c7bd3d65..bd8725fd299 100644 --- a/src/vs/workbench/api/browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/browser/mainThreadWorkspace.ts @@ -16,6 +16,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ILabelService } from 'vs/platform/label/common/label'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { IRequestService } from 'vs/platform/request/common/request'; +import { WorkspaceTrustStateChangeEvent, IWorkspaceTrustService, WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust'; import { IWorkspace, IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { isUntitledWorkspace } from 'vs/platform/workspaces/common/workspaces'; import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers'; @@ -45,19 +46,21 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape { @IInstantiationService private readonly _instantiationService: IInstantiationService, @ILabelService private readonly _labelService: ILabelService, @IEnvironmentService private readonly _environmentService: IEnvironmentService, - @IFileService fileService: IFileService + @IFileService fileService: IFileService, + @IWorkspaceTrustService private readonly _workspaceTrustService: IWorkspaceTrustService ) { this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostWorkspace); const workspace = this._contextService.getWorkspace(); // The workspace file is provided be a unknown file system provider. It might come // from the extension host. So initialize now knowing that `rootPath` is undefined. if (workspace.configuration && !isNative && !fileService.canHandleResource(workspace.configuration)) { - this._proxy.$initializeWorkspace(this.getWorkspaceData(workspace)); + this._proxy.$initializeWorkspace(this.getWorkspaceData(workspace), this.getWorkspaceTrustState()); } else { - this._contextService.getCompleteWorkspace().then(workspace => this._proxy.$initializeWorkspace(this.getWorkspaceData(workspace))); + this._contextService.getCompleteWorkspace().then(workspace => this._proxy.$initializeWorkspace(this.getWorkspaceData(workspace), this.getWorkspaceTrustState())); } this._contextService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspace, this, this._toDispose); this._contextService.onDidChangeWorkbenchState(this._onDidChangeWorkspace, this, this._toDispose); + this._workspaceTrustService.onDidChangeTrustState(this._onDidChangeWorkspaceTrustState, this, this._toDispose); } dispose(): void { @@ -202,4 +205,18 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape { $resolveProxy(url: string): Promise { return this._requestService.resolveProxy(url); } + + // --- trust --- + + $requireWorkspaceTrust(message?: string): Promise { + return this._workspaceTrustService.requireWorkspaceTrust({ immediate: true, message }); + } + + private getWorkspaceTrustState(): WorkspaceTrustState { + return this._workspaceTrustService.getWorkspaceTrustState(); + } + + private _onDidChangeWorkspaceTrustState(state: WorkspaceTrustStateChangeEvent): void { + this._proxy.$onDidChangeWorkspaceTrustState(state); + } } diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index ba227f1074f..e13a14baa6b 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -48,7 +48,7 @@ import { ExtHostUrls } from 'vs/workbench/api/common/extHostUrls'; import { ExtHostWebviews } from 'vs/workbench/api/common/extHostWebview'; import { IExtHostWindow } from 'vs/workbench/api/common/extHostWindow'; import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace'; -import { throwProposedApiError, checkProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions'; +import { throwProposedApiError, checkProposedApiEnabled, checkRequiresWorkspaceTrust } from 'vs/workbench/services/extensions/common/extensions'; import { ProxyIdentifier } from 'vs/workbench/services/extensions/common/proxyIdentifier'; import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/common/extensionDescriptionRegistry'; import type * as vscode from 'vscode'; @@ -881,11 +881,23 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I onDidChangeTunnels: (listener, thisArg?, disposables?) => { checkProposedApiEnabled(extension); return extHostTunnelService.onDidChangeTunnels(listener, thisArg, disposables); - }, registerTimelineProvider: (scheme: string | string[], provider: vscode.TimelineProvider) => { checkProposedApiEnabled(extension); return extHostTimeline.registerTimelineProvider(scheme, provider, extension.identifier, extHostCommands.converter); + }, + get trustState() { + checkProposedApiEnabled(extension); + checkRequiresWorkspaceTrust(extension); + return extHostWorkspace.trustState; + }, + requireWorkspaceTrust: (message?: string) => { + checkProposedApiEnabled(extension); + checkRequiresWorkspaceTrust(extension); + return extHostWorkspace.requireWorkspaceTrust(message); + }, + onDidChangeWorkspaceTrustState: (listener, thisArgs?, disposables?) => { + return extHostWorkspace.onDidChangeWorkspaceTrustState(listener, thisArgs, disposables); } }; @@ -1284,6 +1296,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I // checkProposedApiEnabled(extension); return extHostTypes.TestState; }, + get WorkspaceTrustState() { + // checkProposedApiEnabled(extension); + return extHostTypes.WorkspaceTrustState; + } }; }; } diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 52aa0b773e7..b4e3779cc4d 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -55,11 +55,12 @@ import { IProcessedOutput, INotebookDisplayOrder, NotebookCellMetadata, Notebook import { CallHierarchyItem } from 'vs/workbench/contrib/callHierarchy/common/callHierarchy'; import { Dto } from 'vs/base/common/types'; import { ISerializableEnvironmentVariableCollection } from 'vs/workbench/contrib/terminal/common/environmentVariable'; -import { DebugConfigurationProviderTriggerKind } from 'vs/workbench/api/common/extHostTypes'; +import { DebugConfigurationProviderTriggerKind, WorkspaceTrustState } from 'vs/workbench/api/common/extHostTypes'; import { IAccessibilityInformation } from 'vs/platform/accessibility/common/accessibility'; import { IExtensionIdWithVersion } from 'vs/platform/userDataSync/common/extensionsStorageSync'; import { InternalTestItem, InternalTestResults, RunTestForProviderRequest, RunTestsRequest, RunTestsResult, TestIdWithProvider, TestsDiff } from 'vs/workbench/contrib/testing/common/testCollection'; import { CandidatePort } from 'vs/workbench/services/remote/common/remoteExplorerService'; +import { WorkspaceTrustStateChangeEvent } from 'vs/platform/workspace/common/workspaceTrust'; export interface IEnvironment { isExtensionDevelopmentDebug: boolean; @@ -831,6 +832,7 @@ export interface MainThreadWorkspaceShape extends IDisposable { $saveAll(includeUntitled?: boolean): Promise; $updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, workspaceFoldersToAdd: { uri: UriComponents, name?: string; }[]): Promise; $resolveProxy(url: string): Promise; + $requireWorkspaceTrust(message?: string): Promise } export interface IFileChangeDto { @@ -1093,9 +1095,10 @@ export interface ExtHostTreeViewsShape { } export interface ExtHostWorkspaceShape { - $initializeWorkspace(workspace: IWorkspaceData | null): void; + $initializeWorkspace(workspace: IWorkspaceData | null, trustState: WorkspaceTrustState): void; $acceptWorkspaceData(workspace: IWorkspaceData | null): void; $handleTextSearchResult(result: search.IRawFileMatch2, requestId: number): void; + $onDidChangeWorkspaceTrustState(state: WorkspaceTrustStateChangeEvent): void; } export interface ExtHostFileSystemInfoShape { diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index facd14e0b4f..a4199cad15e 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -3001,3 +3001,9 @@ export enum ExternalUriOpenerPriority { Default = 2, Preferred = 3, } + +export enum WorkspaceTrustState { + Untrusted = 0, + Trusted = 1, + Unknown = 2 +} diff --git a/src/vs/workbench/api/common/extHostWorkspace.ts b/src/vs/workbench/api/common/extHostWorkspace.ts index c03c6be54e5..f73edbc8445 100644 --- a/src/vs/workbench/api/common/extHostWorkspace.ts +++ b/src/vs/workbench/api/common/extHostWorkspace.ts @@ -20,11 +20,12 @@ import { FileSystemProviderCapabilities } from 'vs/platform/files/common/files'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ILogService } from 'vs/platform/log/common/log'; import { Severity } from 'vs/platform/notification/common/notification'; +import { WorkspaceTrustStateChangeEvent } from 'vs/platform/workspace/common/workspaceTrust'; import { Workspace, WorkspaceFolder } from 'vs/platform/workspace/common/workspace'; import { IExtHostFileSystemInfo } from 'vs/workbench/api/common/extHostFileSystemInfo'; import { IExtHostInitDataService } from 'vs/workbench/api/common/extHostInitDataService'; import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService'; -import { Range, RelativePattern } from 'vs/workbench/api/common/extHostTypes'; +import { Range, RelativePattern, WorkspaceTrustState } from 'vs/workbench/api/common/extHostTypes'; import { ITextQueryBuilderOptions } from 'vs/workbench/contrib/search/common/queryBuilder'; import { IRawFileMatch2, resultIsMatch } from 'vs/workbench/services/search/common/search'; import * as vscode from 'vscode'; @@ -168,6 +169,9 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac private readonly _onDidChangeWorkspace = new Emitter(); readonly onDidChangeWorkspace: Event = this._onDidChangeWorkspace.event; + private readonly _onDidChangeWorkspaceTrustState = new Emitter(); + readonly onDidChangeWorkspaceTrustState: Event = this._onDidChangeWorkspaceTrustState.event; + private readonly _logService: ILogService; private readonly _requestIdProvider: Counter; private readonly _barrier: Barrier; @@ -181,6 +185,8 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac private readonly _activeSearchCallbacks: ((match: IRawFileMatch2) => any)[] = []; + private _workspaceTrustState: WorkspaceTrustState = WorkspaceTrustState.Unknown; + constructor( @IExtHostRpcService extHostRpc: IExtHostRpcService, @IExtHostInitDataService initData: IExtHostInitDataService, @@ -198,7 +204,8 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac this._confirmedWorkspace = data ? new ExtHostWorkspaceImpl(data.id, data.name, [], data.configuration ? URI.revive(data.configuration) : null, !!data.isUntitled, uri => ignorePathCasing(uri, extHostFileSystemInfo)) : undefined; } - $initializeWorkspace(data: IWorkspaceData | null): void { + $initializeWorkspace(data: IWorkspaceData | null, trustState: WorkspaceTrustState): void { + this._workspaceTrustState = trustState; this.$acceptWorkspaceData(data); this._barrier.open(); } @@ -549,6 +556,21 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac resolveProxy(url: string): Promise { return this._proxy.$resolveProxy(url); } + + // --- trust --- + + get trustState(): WorkspaceTrustState { + return this._workspaceTrustState; + } + + requireWorkspaceTrust(message?: string): Promise { + return this._proxy.$requireWorkspaceTrust(message); + } + + $onDidChangeWorkspaceTrustState(state: WorkspaceTrustStateChangeEvent): void { + this._workspaceTrustState = state.currentTrustState; + this._onDidChangeWorkspaceTrustState.fire(Object.freeze(state)); + } } export const IExtHostWorkspace = createDecorator('IExtHostWorkspace'); diff --git a/src/vs/workbench/browser/actions/workspaceActions.ts b/src/vs/workbench/browser/actions/workspaceActions.ts index ea67ce4c511..2f1ffb9250b 100644 --- a/src/vs/workbench/browser/actions/workspaceActions.ts +++ b/src/vs/workbench/browser/actions/workspaceActions.ts @@ -12,9 +12,9 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { ADD_ROOT_FOLDER_COMMAND_ID, ADD_ROOT_FOLDER_LABEL, PICK_WORKSPACE_FOLDER_COMMAND_ID } from 'vs/workbench/browser/actions/workspaceCommands'; import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs'; -import { MenuRegistry, MenuId, SyncActionDescriptor } from 'vs/platform/actions/common/actions'; +import { MenuRegistry, MenuId, SyncActionDescriptor, Action2, registerAction2 } from 'vs/platform/actions/common/actions'; import { EmptyWorkspaceSupportContext, WorkbenchStateContext, WorkspaceFolderCountContext } from 'vs/workbench/browser/contextkeys'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { Registry } from 'vs/platform/registry/common/platform'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions'; import { INotificationService } from 'vs/platform/notification/common/notification'; @@ -23,6 +23,7 @@ import { KeyChord, KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IWorkspacesService, hasWorkspaceFileExtension } from 'vs/platform/workspaces/common/workspaces'; +import { WORKSPACE_TRUST_ENABLED, WORKSPACE_TRUST_URI } from 'vs/platform/workspace/common/workspaceTrust'; export class OpenFileAction extends Action { @@ -250,6 +251,24 @@ export class DuplicateWorkspaceInNewWindowAction extends Action { } } +class WorkspaceTrustManageAction extends Action2 { + constructor() { + super({ + id: 'workbench.action.manageTrust', + title: { value: nls.localize('resetTrustAction', "Manage Trusted Workspaces"), original: 'Manage Trusted Workspaces' }, + precondition: ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true), + f1: true, + }); + } + + run(accessor: ServicesAccessor) { + const editorService = accessor.get(IEditorService); + editorService.openEditor({ resource: WORKSPACE_TRUST_URI, mode: 'jsonc', options: { pinned: true } }); + } +} + +registerAction2(WorkspaceTrustManageAction); + // --- Actions Registration const registry = Registry.as(Extensions.WorkbenchActions); diff --git a/src/vs/workbench/browser/parts/activitybar/media/activityaction.css b/src/vs/workbench/browser/parts/activitybar/media/activityaction.css index 57d6f2a8588..e72afbea624 100644 --- a/src/vs/workbench/browser/parts/activitybar/media/activityaction.css +++ b/src/vs/workbench/browser/parts/activitybar/media/activityaction.css @@ -156,6 +156,19 @@ text-align: center; } + +.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .badge .codicon.badge-content { + font-size: 12px; + font-weight: unset; + padding: 0 2px; +} + +.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .badge .codicon.badge-content::before { + text-align: center; + vertical-align: baseline; +} + + /* Right aligned */ .monaco-workbench .activitybar.right > .content :not(.monaco-menu) > .monaco-action-bar .action-label:not(.codicon) { diff --git a/src/vs/workbench/browser/parts/compositeBarActions.ts b/src/vs/workbench/browser/parts/compositeBarActions.ts index 779b309c588..411766b2ea2 100644 --- a/src/vs/workbench/browser/parts/compositeBarActions.ts +++ b/src/vs/workbench/browser/parts/compositeBarActions.ts @@ -9,7 +9,7 @@ import * as dom from 'vs/base/browser/dom'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { dispose, toDisposable, MutableDisposable } from 'vs/base/common/lifecycle'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService'; +import { IThemeService, IColorTheme, ThemeIcon } from 'vs/platform/theme/common/themeService'; import { TextBadge, NumberBadge, IBadge, IconBadge, ProgressBadge } from 'vs/workbench/services/activity/common/activity'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; @@ -19,8 +19,8 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { Emitter, Event } from 'vs/base/common/event'; import { CompositeDragAndDropObserver, ICompositeDragAndDrop, Before2D, toggleDropEffect } from 'vs/workbench/browser/dnd'; import { Color } from 'vs/base/common/color'; -import { Codicon } from 'vs/base/common/codicons'; import { IBaseActionViewItemOptions, BaseActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems'; +import { Codicon } from 'vs/base/common/codicons'; export interface ICompositeActivity { badge: IBadge; @@ -288,8 +288,10 @@ export class ActivityActionViewItem extends BaseActionViewItem { dom.show(this.badge); } - // Text + // Icon else if (badge instanceof IconBadge) { + const clazzList = ThemeIcon.asClassNameArray(badge.icon); + this.badgeContent.classList.add(...clazzList); dom.show(this.badge); } diff --git a/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts b/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts index 12454df7f2a..ae6e2d75052 100644 --- a/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts +++ b/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts @@ -31,6 +31,8 @@ import { IWillActivateEvent, IExtensionService } from 'vs/workbench/services/ext import { timeout } from 'vs/base/common/async'; import { TestExtensionService } from 'vs/workbench/test/common/workbenchTestServices'; import { OS } from 'vs/base/common/platform'; +import { IWorkspaceTrustService } from 'vs/platform/workspace/common/workspaceTrust'; +import { TestWorkspaceTrustService } from 'vs/platform/workspace/test/common/testWorkspaceTrust'; interface ExperimentSettings { enabled?: boolean; @@ -94,6 +96,7 @@ suite('Experiment Service', () => { instantiationService.stub(IConfigurationService, testConfigurationService); instantiationService.stub(ILifecycleService, new TestLifecycleService()); instantiationService.stub(IStorageService, >{ get: (a: string, b: StorageScope, c?: string) => c, getBoolean: (a: string, b: StorageScope, c?: boolean) => c, store: () => { }, remove: () => { } }); + instantiationService.stub(IWorkspaceTrustService, new TestWorkspaceTrustService()); setup(() => { instantiationService.stub(IProductService, {}); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 3401152e5ca..5e3d9d5ebba 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -58,7 +58,8 @@ import { ActionWithDropdownActionViewItem, IActionWithDropdownActionViewItemOpti import { IContextMenuProvider } from 'vs/base/browser/contextmenu'; import { ILogService } from 'vs/platform/log/common/log'; import * as Constants from 'vs/workbench/contrib/logs/common/logConstants'; -import { infoIcon, manageExtensionIcon, syncEnabledIcon, syncIgnoredIcon, warningIcon } from 'vs/workbench/contrib/extensions/browser/extensionsIcons'; +import { infoIcon, manageExtensionIcon, syncEnabledIcon, syncIgnoredIcon, trustIcon, warningIcon } from 'vs/workbench/contrib/extensions/browser/extensionsIcons'; +import { IWorkspaceTrustService } from 'vs/platform/workspace/common/workspaceTrust'; function getRelativeDateLabel(date: Date): string { const delta = new Date().getTime() - date.getTime(); @@ -2112,6 +2113,7 @@ export class SystemDisabledWarningAction extends ExtensionAction { private static readonly CLASS = `${ExtensionAction.ICON_ACTION_CLASS} system-disable`; private static readonly WARNING_CLASS = `${SystemDisabledWarningAction.CLASS} ${ThemeIcon.asClassName(warningIcon)}`; private static readonly INFO_CLASS = `${SystemDisabledWarningAction.CLASS} ${ThemeIcon.asClassName(infoIcon)}`; + private static readonly TRUST_CLASS = `${SystemDisabledWarningAction.CLASS} ${ThemeIcon.asClassName(trustIcon)}`; updateWhenCounterExtensionChanges: boolean = true; private _runningExtensions: IExtensionDescription[] | null = null; @@ -2123,6 +2125,7 @@ export class SystemDisabledWarningAction extends ExtensionAction { @IExtensionService private readonly extensionService: IExtensionService, @IProductService private readonly productService: IProductService, @IConfigurationService private readonly configurationService: IConfigurationService, + @IWorkspaceTrustService private readonly workspaceTrustService: IWorkspaceTrustService ) { super('extensions.install', '', `${SystemDisabledWarningAction.CLASS} hide`, false); this._register(this.labelService.onDidChangeFormatters(() => this.update(), this)); @@ -2188,6 +2191,11 @@ export class SystemDisabledWarningAction extends ExtensionAction { return; } } + if (this.workspaceTrustService.isWorkspaceTrustEnabled() && this.extension.enablementState === EnablementState.DisabledByTrustRequirement) { + this.class = `${SystemDisabledWarningAction.TRUST_CLASS}`; + this.tooltip = localize('extension disabled because of trust requirement', "This extension has been disabled as it requires a trusted workspace"); + return; + } } run(): Promise { diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsIcons.ts b/src/vs/workbench/contrib/extensions/browser/extensionsIcons.ts index 55fea5ddf9f..f096881c6a4 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsIcons.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsIcons.ts @@ -31,3 +31,4 @@ export const starEmptyIcon = registerIcon('extensions-star-empty', Codicon.starE export const warningIcon = registerIcon('extensions-warning-message', Codicon.warning, localize('warningIcon', 'Icon shown with a warning message in the extensions editor.')); export const infoIcon = registerIcon('extensions-info-message', Codicon.info, localize('infoIcon', 'Icon shown with an info message in the extensions editor.')); +export const trustIcon = registerIcon('extension-trust-message', Codicon.shield, localize('trustIcon', 'Icon shown with a message in the extension editor.')); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index 7097869562e..6c093794e37 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -41,6 +41,7 @@ import { FileAccess } from 'vs/base/common/network'; import { IIgnoredExtensionsManagementService } from 'vs/platform/userDataSync/common/ignoredExtensions'; import { IUserDataAutoSyncService } from 'vs/platform/userDataSync/common/userDataSync'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IWorkspaceTrustService, WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust'; interface IExtensionStateProvider { (extension: Extension): T; @@ -524,7 +525,8 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension @IIgnoredExtensionsManagementService private readonly extensionsSyncManagementService: IIgnoredExtensionsManagementService, @IUserDataAutoSyncService private readonly userDataAutoSyncService: IUserDataAutoSyncService, @IProductService private readonly productService: IProductService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IWorkspaceTrustService private readonly workspaceTrustService: IWorkspaceTrustService ) { super(); this.hasOutdatedExtensionsContextKey = HasOutdatedExtensionsContext.bindTo(contextKeyService); @@ -1031,33 +1033,54 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension private async installFromVSIX(vsix: URI): Promise { const manifest = await this.extensionManagementService.getManifest(vsix); - const existingExtension = this.local.find(local => areSameExtensions(local.identifier, { id: getGalleryExtensionId(manifest.publisher, manifest.name) })); - const { identifier } = await this.extensionManagementService.install(vsix); + return this.promptForTrustIfNeededAndInstall(manifest, async () => { + const existingExtension = this.local.find(local => areSameExtensions(local.identifier, { id: getGalleryExtensionId(manifest.publisher, manifest.name) })); + const { identifier } = await this.extensionManagementService.install(vsix); - if (existingExtension && existingExtension.latestVersion !== manifest.version) { - this.ignoreAutoUpdate(new ExtensionIdentifierWithVersion(identifier, manifest.version)); - } + if (existingExtension && existingExtension.latestVersion !== manifest.version) { + this.ignoreAutoUpdate(new ExtensionIdentifierWithVersion(identifier, manifest.version)); + } - return this.local.filter(local => areSameExtensions(local.identifier, identifier))[0]; + return this.local.filter(local => areSameExtensions(local.identifier, identifier))[0]; + }); } private async installFromGallery(extension: IExtension, gallery: IGalleryExtension, installOptions?: InstallOptions): Promise { - this.installing.push(extension); - this._onChange.fire(extension); - try { - if (extension.state === ExtensionState.Installed && extension.local) { - await this.extensionManagementService.updateFromGallery(gallery, extension.local); - } else { - await this.extensionManagementService.installFromGallery(gallery, installOptions); - } - const ids: string[] | undefined = extension.identifier.uuid ? [extension.identifier.uuid] : undefined; - const names: string[] | undefined = extension.identifier.uuid ? undefined : [extension.identifier.id]; - this.queryGallery({ names, ids, pageSize: 1 }, CancellationToken.None); - return this.local.filter(local => areSameExtensions(local.identifier, gallery.identifier))[0]; - } finally { - this.installing = this.installing.filter(e => e !== extension); - this._onChange.fire(this.local.filter(e => areSameExtensions(e.identifier, extension.identifier))[0]); + const manifest = await extension.getManifest(CancellationToken.None); + + if (manifest) { + this.promptForTrustIfNeededAndInstall(manifest, async () => { + this.installing.push(extension); + this._onChange.fire(extension); + try { + if (extension.state === ExtensionState.Installed && extension.local) { + await this.extensionManagementService.updateFromGallery(gallery, extension.local); + } else { + await this.extensionManagementService.installFromGallery(gallery, installOptions); + } + const ids: string[] | undefined = extension.identifier.uuid ? [extension.identifier.uuid] : undefined; + const names: string[] | undefined = extension.identifier.uuid ? undefined : [extension.identifier.id]; + this.queryGallery({ names, ids, pageSize: 1 }, CancellationToken.None); + return this.local.filter(local => areSameExtensions(local.identifier, gallery.identifier))[0]; + } finally { + this.installing = this.installing.filter(e => e !== extension); + this._onChange.fire(this.local.filter(e => areSameExtensions(e.identifier, extension.identifier))[0]); + } + }); } + return Promise.reject(); + } + + private async promptForTrustIfNeededAndInstall(manifest: IExtensionManifest, installTask: () => Promise): Promise { + if (manifest.requiresWorkspaceTrust === 'onStart') { + const trustState = await this.workspaceTrustService.requireWorkspaceTrust( + { + immediate: true, + message: 'Installing this extension requires you to trust the contents of this workspace.' + }); + return trustState === WorkspaceTrustState.Trusted ? installTask() : Promise.reject(); + } + return installTask(); } private promptAndSetEnablement(extensions: IExtension[], enablementState: EnablementState): Promise { diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index bcef66bbdc0..d5f066d539f 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -55,6 +55,8 @@ import { IUserDataAutoSyncEnablementService, IUserDataSyncResourceEnablementServ import { UserDataSyncResourceEnablementService } from 'vs/platform/userDataSync/common/userDataSyncResourceEnablementService'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService'; +import { IWorkspaceTrustService } from 'vs/platform/workspace/common/workspaceTrust'; +import { TestWorkspaceTrustService } from 'vs/platform/workspace/test/common/testWorkspaceTrust'; let instantiationService: TestInstantiationService; let installEvent: Emitter, @@ -131,6 +133,7 @@ async function setupTest() { instantiationService.stub(IUserDataSyncResourceEnablementService, instantiationService.createInstance(UserDataSyncResourceEnablementService)); instantiationService.set(IExtensionsWorkbenchService, disposables.add(instantiationService.createInstance(ExtensionsWorkbenchService))); + instantiationService.stub(IWorkspaceTrustService, new TestWorkspaceTrustService()); } diff --git a/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts b/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts index 5890d50f739..e3ab792c05e 100644 --- a/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts +++ b/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts @@ -80,6 +80,7 @@ import { isWorkspaceFolder, TaskQuickPickEntry, QUICKOPEN_DETAIL_CONFIG, TaskQui import { ILogService } from 'vs/platform/log/common/log'; import { once } from 'vs/base/common/functional'; import { ThemeIcon } from 'vs/platform/theme/common/themeService'; +import { IWorkspaceTrustService } from 'vs/platform/workspace/common/workspaceTrust'; const QUICKOPEN_HISTORY_LIMIT_CONFIG = 'task.quickOpen.history'; const PROBLEM_MATCHER_NEVER_CONFIG = 'task.problemMatchers.neverPrompt'; @@ -255,6 +256,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer @ITextModelService private readonly textModelResolverService: ITextModelService, @IPreferencesService private readonly preferencesService: IPreferencesService, @IViewDescriptorService private readonly viewDescriptorService: IViewDescriptorService, + @IWorkspaceTrustService private readonly workspaceTrustService: IWorkspaceTrustService, @ILogService private readonly logService: ILogService ) { super(); @@ -911,7 +913,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer }).then((value) => { if (runSource === TaskRunSource.User) { this.getWorkspaceTasks().then(workspaceTasks => { - RunAutomaticTasks.promptForPermission(this, this.storageService, this.notificationService, workspaceTasks); + RunAutomaticTasks.promptForPermission(this, this.storageService, this.notificationService, this.workspaceTrustService, workspaceTasks); }); } return value; diff --git a/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.ts b/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.ts index 40899ecaf61..743b1c75374 100644 --- a/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.ts +++ b/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.ts @@ -14,16 +14,19 @@ import { INotificationService, Severity } from 'vs/platform/notification/common/ import { IQuickPickItem, IQuickInputService } from 'vs/platform/quickinput/common/quickInput'; import { Action2 } from 'vs/platform/actions/common/actions'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; +import { IWorkspaceTrustService, WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust'; const ARE_AUTOMATIC_TASKS_ALLOWED_IN_WORKSPACE = 'tasks.run.allowAutomatic'; export class RunAutomaticTasks extends Disposable implements IWorkbenchContribution { constructor( @ITaskService private readonly taskService: ITaskService, - @IStorageService storageService: IStorageService) { + @IStorageService storageService: IStorageService, + @IWorkspaceTrustService workspaceTrustService: IWorkspaceTrustService) { super(); const isFolderAutomaticAllowed = storageService.getBoolean(ARE_AUTOMATIC_TASKS_ALLOWED_IN_WORKSPACE, StorageScope.WORKSPACE, undefined); - this.tryRunTasks(isFolderAutomaticAllowed); + const isWorkspaceTrusted = workspaceTrustService.getWorkspaceTrustState() === WorkspaceTrustState.Trusted; + this.tryRunTasks(isFolderAutomaticAllowed && isWorkspaceTrusted); } private tryRunTasks(isAllowed: boolean | undefined) { @@ -84,8 +87,13 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut return { tasks, taskNames }; } - public static promptForPermission(taskService: ITaskService, storageService: IStorageService, notificationService: INotificationService, + public static async promptForPermission(taskService: ITaskService, storageService: IStorageService, notificationService: INotificationService, workspaceTrustService: IWorkspaceTrustService, workspaceTaskResult: Map) { + const isWorkspaceTrusted = await workspaceTrustService.requireWorkspaceTrust({ immediate: false }) === WorkspaceTrustState.Trusted; + if (!isWorkspaceTrusted) { + return; + } + const isFolderAutomaticAllowed = storageService.getBoolean(ARE_AUTOMATIC_TASKS_ALLOWED_IN_WORKSPACE, StorageScope.WORKSPACE, undefined); if (isFolderAutomaticAllowed !== undefined) { return; diff --git a/src/vs/workbench/contrib/tasks/electron-browser/taskService.ts b/src/vs/workbench/contrib/tasks/electron-browser/taskService.ts index 3df8b849992..7ba96460b75 100644 --- a/src/vs/workbench/contrib/tasks/electron-browser/taskService.ts +++ b/src/vs/workbench/contrib/tasks/electron-browser/taskService.ts @@ -46,6 +46,7 @@ import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IPathService } from 'vs/workbench/services/path/common/pathService'; import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { IWorkspaceTrustService } from 'vs/platform/workspace/common/workspaceTrust'; interface WorkspaceFolderConfigurationResult { workspaceFolder: IWorkspaceFolder; @@ -85,6 +86,7 @@ export class TaskService extends AbstractTaskService { @ITextModelService textModelResolverService: ITextModelService, @IPreferencesService preferencesService: IPreferencesService, @IViewDescriptorService viewDescriptorService: IViewDescriptorService, + @IWorkspaceTrustService workspaceTrustService: IWorkspaceTrustService, @ILogService logService: ILogService) { super(configurationService, markerService, @@ -115,6 +117,7 @@ export class TaskService extends AbstractTaskService { textModelResolverService, preferencesService, viewDescriptorService, + workspaceTrustService, logService); this._register(lifecycleService.onBeforeShutdown(event => event.veto(this.beforeShutdown(), 'veto.tasks'))); } diff --git a/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts b/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts new file mode 100644 index 00000000000..20bba461f0a --- /dev/null +++ b/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts @@ -0,0 +1,335 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Disposable, MutableDisposable } from 'vs/base/common/lifecycle'; +import { localize } from 'vs/nls'; +import { Action2, MenuId, MenuRegistry, registerAction2 } from 'vs/platform/actions/common/actions'; +import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; +import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; +import { Severity } from 'vs/platform/notification/common/notification'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { IWorkspaceTrustService, WorkspaceTrustContext, WORKSPACE_TRUST_ENABLED, WORKSPACE_TRUST_URI, WorkspaceTrustState, WorkspaceTrustStateChangeEvent, workspaceTrustStateToString } from 'vs/platform/workspace/common/workspaceTrust'; +import { Extensions as WorkbenchExtensions, IWorkbenchContribution, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; +import { IActivityService, IconBadge } from 'vs/workbench/services/activity/common/activity'; +import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; +import { registerIcon } from 'vs/platform/theme/common/iconRegistry'; +import { Codicon } from 'vs/base/common/codicons'; +import { ThemeColor } from 'vs/workbench/api/common/extHostTypes'; +import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { WorkspaceTrustFileSystemProvider } from 'vs/workbench/contrib/workspace/common/workspaceTrustFileSystemProvider'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { WorkbenchStateContext } from 'vs/workbench/browser/contextkeys'; +import { ICommandService } from 'vs/platform/commands/common/commands'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IHostService } from 'vs/workbench/services/host/browser/host'; +import { IStatusbarEntry, IStatusbarEntryAccessor, IStatusbarService, StatusbarAlignment } from 'vs/workbench/services/statusbar/common/statusbar'; + +const workspaceTrustIcon = registerIcon('workspace-trust-icon', Codicon.shield, localize('workspaceTrustIcon', "Icon for workspace trust badge.")); + +/* + * Trust Request UX Handler + */ +export class WorkspaceTrustRequestHandler extends Disposable implements IWorkbenchContribution { + private readonly requestModel = this.workspaceTrustService.requestModel; + private readonly badgeDisposable = this._register(new MutableDisposable()); + + constructor( + @IHostService private readonly hostService: IHostService, + @IDialogService private readonly dialogService: IDialogService, + @IActivityService private readonly activityService: IActivityService, + @ICommandService private readonly commandService: ICommandService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IWorkspaceTrustService private readonly workspaceTrustService: IWorkspaceTrustService + ) { + super(); + + this.registerListeners(); + } + + private toggleRequestBadge(visible: boolean): void { + this.badgeDisposable.clear(); + + if (visible) { + this.badgeDisposable.value = this.activityService.showGlobalActivity({ + badge: new IconBadge(workspaceTrustIcon, () => localize('requestTrustIconText', "Some features require workspace trust.")), + priority: 0 + }); + } + } + + private registerListeners(): void { + this._register(this.requestModel.onDidInitiateRequest(async () => { + if (this.requestModel.trustRequest) { + this.toggleRequestBadge(true); + + if (this.requestModel.trustRequest.immediate) { + const result = await this.dialogService.show( + Severity.Warning, + localize('immediateTrustRequestTitle', "Do you trust the files in this folder?"), + [ + localize('grantWorkspaceTrustButton', "Trust"), + localize('denyWorkspaceTrustButton', "Don't Trust"), + localize('manageWorkspaceTrustButton', "Manage"), + localize('cancelWorkspaceTrustButton', "Cancel"), + ], + { + cancelId: 3, + detail: localize('immediateTrustRequestDetail', "A feature you are trying to use may be a security risk if you do not trust the source of the files or folders you currently have open.\n\nYou should only trust this workspace if you trust its source. Otherwise, features will be enabled that may compromise your device or personal information."), + } + ); + + switch (result.choice) { + case 0: // Trust + this.requestModel.completeRequest(WorkspaceTrustState.Trusted); + break; + case 1: // Don't Trust + this.requestModel.completeRequest(WorkspaceTrustState.Untrusted); + break; + case 2: // Manage + this.requestModel.completeRequest(undefined); + await this.commandService.executeCommand('workbench.trust.manage'); + break; + default: // Cancel + this.requestModel.completeRequest(undefined); + break; + } + } + } + })); + + this._register(this.requestModel.onDidCompleteRequest(trustState => { + if (trustState !== undefined && trustState !== WorkspaceTrustState.Unknown) { + this.toggleRequestBadge(false); + } + })); + + this._register(this.configurationService.onDidChangeConfiguration(e => { + if (e.affectsConfiguration(WORKSPACE_TRUST_ENABLED)) { + const isEnabled = this.configurationService.getValue(WORKSPACE_TRUST_ENABLED); + if (!isEnabled || typeof isEnabled === 'boolean') { + this.dialogService.confirm({ + message: localize('trustConfigurationChangeMessage', "In order for this change to take effect, the window needs to be reloaded. Do you want to reload the window now?") + }).then(result => { + if (result.confirmed) { + this.hostService.reload(); + } + }); + } + } + })); + } +} + +Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(WorkspaceTrustRequestHandler, LifecyclePhase.Ready); + +/* + * Status Bar Entry + */ +class WorkspaceTrustStatusbarItem extends Disposable implements IWorkbenchContribution { + private static readonly ID = 'status.workspaceTrust'; + private readonly statusBarEntryAccessor: MutableDisposable; + + constructor( + @IStatusbarService private readonly statusbarService: IStatusbarService, + @IWorkspaceTrustService private readonly workspaceTrustService: IWorkspaceTrustService + ) { + super(); + + this.statusBarEntryAccessor = this._register(new MutableDisposable()); + + if (this.workspaceTrustService.isWorkspaceTrustEnabled()) { + const entry = this.getStatusbarEntry(this.workspaceTrustService.getWorkspaceTrustState()); + this.statusBarEntryAccessor.value = this.statusbarService.addEntry(entry, WorkspaceTrustStatusbarItem.ID, localize('status.WorkspaceTrust', "Workspace Trust"), StatusbarAlignment.LEFT, 0.99 * Number.MAX_VALUE /* Right of remote indicator */); + this._register(this.workspaceTrustService.onDidChangeTrustState(trustState => this.updateStatusbarEntry(trustState))); + } + } + + private getStatusbarEntry(state: WorkspaceTrustState): IStatusbarEntry { + const text = workspaceTrustStateToString(state); + const backgroundColor = state === WorkspaceTrustState.Trusted ? + 'transparent' : new ThemeColor('statusBarItem.prominentBackground'); + const color = state === WorkspaceTrustState.Trusted ? '#00dd3b' : '#ff5462'; + + return { + text: state === WorkspaceTrustState.Trusted ? `$(shield)` : `$(shield) ${text}`, + ariaLabel: localize('status.WorkspaceTrust', "Workspace Trust"), + tooltip: localize('status.WorkspaceTrust', "Workspace Trust"), + command: 'workbench.trust.manage', + backgroundColor, + color + }; + } + + private updateStatusbarEntry(trustState: WorkspaceTrustStateChangeEvent): void { + this.statusBarEntryAccessor.value?.update(this.getStatusbarEntry(trustState.currentTrustState)); + this.statusbarService.updateEntryVisibility(WorkspaceTrustStatusbarItem.ID, trustState.currentTrustState !== WorkspaceTrustState.Unknown); + } +} + +Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution( + WorkspaceTrustStatusbarItem, + LifecyclePhase.Starting +); + +/* + * Trusted Workspace JSON Editor + */ +Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution( + WorkspaceTrustFileSystemProvider, + LifecyclePhase.Ready +); + +/* + * Actions + */ + +// Grant Workspace Trust +registerAction2(class extends Action2 { + constructor() { + super({ + id: 'workbench.trust.grant', + title: { + original: 'Grant Workspace Trust', + value: localize('grantWorkspaceTrust', "Grant Workspace Trust") + }, + category: localize('workspacesCategory', "Workspaces"), + f1: true, + precondition: WorkspaceTrustContext.TrustState.isEqualTo(WorkspaceTrustState.Trusted).negate(), + menu: { + id: MenuId.GlobalActivity, + when: WorkspaceTrustContext.PendingRequest, + group: '7_trust', + order: 10 + }, + }); + } + + async run(accessor: ServicesAccessor) { + const dialogService = accessor.get(IDialogService); + const workspaceTrustService = accessor.get(IWorkspaceTrustService); + + const result = await dialogService.confirm({ + message: localize('grantWorkspaceTrust', "Grant Workspace Trust"), + detail: localize('confirmGrantWorkspaceTrust', "Granting trust to the workspace will enable features that may pose a security risk if the contents of the workspace cannot be trusted. Are you sure you want to trust this workspace?"), + primaryButton: localize('yes', 'Yes'), + secondaryButton: localize('no', 'No') + }); + + if (result.confirmed) { + workspaceTrustService.requestModel.completeRequest(WorkspaceTrustState.Trusted); + } + + return; + } +}); + +// Deny Workspace Trust +registerAction2(class extends Action2 { + constructor() { + super({ + id: 'workbench.trust.deny', + title: { + original: 'Deny Workspace Trust', + value: localize('denyWorkspaceTrust', "Deny Workspace Trust") + }, + category: localize('workspacesCategory', "Workspaces"), + f1: true, + precondition: WorkspaceTrustContext.TrustState.isEqualTo(WorkspaceTrustState.Untrusted).negate(), + menu: { + id: MenuId.GlobalActivity, + when: WorkspaceTrustContext.PendingRequest, + group: '7_trust', + order: 20 + }, + }); + } + + async run(accessor: ServicesAccessor) { + const dialogService = accessor.get(IDialogService); + const workspaceTrustService = accessor.get(IWorkspaceTrustService); + + const result = await dialogService.confirm({ + message: localize('denyWorkspaceTrust', "Deny Workspace Trust"), + detail: localize('confirmDenyWorkspaceTrust', "Denying trust to the workspace will disable features that may pose a security risk if the contents of the workspace cannot be trusted. Are you sure you want to deny trust to this workspace?"), + primaryButton: localize('yes', 'Yes'), + secondaryButton: localize('no', 'No') + }); + + if (result.confirmed) { + workspaceTrustService.requestModel.completeRequest(WorkspaceTrustState.Untrusted); + } + return; + } +}); + +// Reset Workspace Trust +registerAction2(class extends Action2 { + constructor() { + super({ + id: 'workbench.trust.reset', + title: { + original: 'Reset Workspace Trust', + value: localize('reset', "Reset Workspace Trust") + }, + category: localize('workspacesCategory', "Workspaces"), + f1: true, + precondition: ContextKeyExpr.and(WorkbenchStateContext.isEqualTo('empty').negate(), WorkspaceTrustContext.TrustState.isEqualTo(WorkspaceTrustState.Unknown).negate()) + }); + } + + async run(accessor: ServicesAccessor) { + const dialogService = accessor.get(IDialogService); + const workspaceTrustService = accessor.get(IWorkspaceTrustService); + + const result = await dialogService.confirm({ + message: localize('reset', "Reset Workspace Trust"), + detail: localize('confirmResetWorkspaceTrust', "Resetting workspace trust to the workspace will disable features that may pose a security risk if the contents of the workspace cannot be trusted. Are you sure you want to reset trust this workspace?"), + primaryButton: localize('yesGrant', 'Yes'), + secondaryButton: localize('noGrant', 'No') + }); + + if (result.confirmed) { + workspaceTrustService.resetWorkspaceTrust(); + } + + return; + } +}); + +// Manage Workspace Trust +registerAction2(class extends Action2 { + constructor() { + super({ + id: 'workbench.trust.manage', + title: { + original: 'Manage Trusted Workspaces', + value: localize('manageWorkspaceTrust', "Manage Trusted Workspaces") + }, + category: localize('workspacesCategory', "Workspaces"), + menu: { + id: MenuId.GlobalActivity, + group: '7_trust', + order: 40, + when: ContextKeyExpr.and(ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true), WorkspaceTrustContext.PendingRequest.negate()) + }, + }); + } + + run(accessor: ServicesAccessor) { + const editorService = accessor.get(IEditorService); + editorService.openEditor({ resource: WORKSPACE_TRUST_URI, mode: 'jsonc', options: { pinned: true } }); + return; + } +}); + +MenuRegistry.appendMenuItem(MenuId.GlobalActivity, { + command: { + id: 'workbench.trust.manage', + title: localize('manageWorkspaceTrustPending', "Manage Trusted Workspaces (1)"), + }, + group: '7_trust', + order: 40, + when: ContextKeyExpr.and(ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true), WorkspaceTrustContext.PendingRequest) +}); diff --git a/src/vs/workbench/contrib/workspace/common/workspaceTrustFileSystemProvider.ts b/src/vs/workbench/contrib/workspace/common/workspaceTrustFileSystemProvider.ts new file mode 100644 index 00000000000..8964edd181b --- /dev/null +++ b/src/vs/workbench/contrib/workspace/common/workspaceTrustFileSystemProvider.ts @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Event } from 'vs/base/common/event'; +import { IDisposable } from 'vs/base/common/lifecycle'; +import { URI } from 'vs/base/common/uri'; +import { FileDeleteOptions, FileOverwriteOptions, FileSystemProviderCapabilities, FileType, FileWriteOptions, IFileService, IStat, IWatchOptions, IFileSystemProviderWithFileReadWriteCapability } from 'vs/platform/files/common/files'; +import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; +import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; +import { VSBuffer } from 'vs/base/common/buffer'; +import { WORKSPACE_TRUST_STORAGE_KEY } from 'vs/platform/workspace/common/workspaceTrust'; + +const WORKSPACE_TRUST_SCHEMA = 'workspaceTrust'; + +const TRUSTED_WORKSPACES_STAT: IStat = { + type: FileType.File, + ctime: Date.now(), + mtime: Date.now(), + size: 0 +}; + +const PREPENDED_TEXT = `// The following file is a placeholder UX for managing trusted workspaces. It will be replaced by a rich editor and provide +// additonal information about what trust means. e.g. enabling trust will unblock automatic tasks on startup and list the tasks. It will enable certain extensions +// and list the extensions with associated functionality. +`; + +export class WorkspaceTrustFileSystemProvider implements IFileSystemProviderWithFileReadWriteCapability, IWorkbenchContribution { + readonly capabilities = FileSystemProviderCapabilities.FileReadWrite; + + readonly onDidChangeCapabilities = Event.None; + readonly onDidChangeFile = Event.None; + + constructor( + @IFileService private readonly fileService: IFileService, + @IStorageService private readonly storageService: IStorageService, + ) { + this.fileService.registerProvider(WORKSPACE_TRUST_SCHEMA, this); + } + + stat(resource: URI): Promise { + return Promise.resolve(TRUSTED_WORKSPACES_STAT); + } + + async readFile(resource: URI): Promise { + let workspacesTrustContent = this.storageService.get(WORKSPACE_TRUST_STORAGE_KEY, StorageScope.GLOBAL); + + let objectForm = {}; + try { + objectForm = JSON.parse(workspacesTrustContent || '{}'); + } catch { } + + const buffer = VSBuffer.fromString(PREPENDED_TEXT + JSON.stringify(objectForm, undefined, 2)).buffer; + return buffer; + } + + writeFile(resource: URI, content: Uint8Array, opts: FileWriteOptions): Promise { + try { + const workspacesTrustContent = VSBuffer.wrap(content).toString().replace(PREPENDED_TEXT, ''); + this.storageService.store(WORKSPACE_TRUST_STORAGE_KEY, workspacesTrustContent, StorageScope.GLOBAL, StorageTarget.MACHINE); + } catch (err) { } + + return Promise.resolve(); + } + + watch(resource: URI, opts: IWatchOptions): IDisposable { + return { + dispose() { + return; + } + }; + } + mkdir(resource: URI): Promise { + return Promise.resolve(undefined!); + } + readdir(resource: URI): Promise<[string, FileType][]> { + return Promise.resolve(undefined!); + } + delete(resource: URI, opts: FileDeleteOptions): Promise { + return Promise.resolve(undefined!); + } + rename(from: URI, to: URI, opts: FileOverwriteOptions): Promise { + return Promise.resolve(undefined!); + } +} diff --git a/src/vs/workbench/services/activity/common/activity.ts b/src/vs/workbench/services/activity/common/activity.ts index 3ca5c6a34db..b7665e85069 100644 --- a/src/vs/workbench/services/activity/common/activity.ts +++ b/src/vs/workbench/services/activity/common/activity.ts @@ -5,6 +5,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { ThemeIcon } from 'vs/platform/theme/common/themeService'; export interface IActivity { readonly badge: IBadge; @@ -75,8 +76,7 @@ export class TextBadge extends BaseBadge { } export class IconBadge extends BaseBadge { - - constructor(descriptorFn: () => string) { + constructor(public readonly icon: ThemeIcon, descriptorFn: () => string) { super(descriptorFn); } } diff --git a/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts b/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts index 42c9bd4fae8..d5e0e57ec7b 100644 --- a/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts +++ b/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts @@ -6,7 +6,7 @@ import { localize } from 'vs/nls'; import { Event, Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; -import { IExtensionManagementService, DidUninstallExtensionEvent, IExtensionIdentifier, IGlobalExtensionEnablementService, ENABLED_EXTENSIONS_STORAGE_PATH, DISABLED_EXTENSIONS_STORAGE_PATH } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionManagementService, DidUninstallExtensionEvent, IExtensionIdentifier, IGlobalExtensionEnablementService, ENABLED_EXTENSIONS_STORAGE_PATH, DISABLED_EXTENSIONS_STORAGE_PATH, DidInstallExtensionEvent } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IWorkbenchExtensionEnablementService, EnablementState, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; @@ -25,6 +25,7 @@ import { ILifecycleService, LifecyclePhase } from 'vs/workbench/services/lifecyc import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { IHostService } from 'vs/workbench/services/host/browser/host'; import { IExtensionBisectService } from 'vs/workbench/services/extensionManagement/browser/extensionBisect'; +import { WorkspaceTrustStateChangeEvent, IWorkspaceTrustService, WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust'; import { Promises } from 'vs/base/common/async'; const SOURCE = 'IWorkbenchExtensionEnablementService'; @@ -37,6 +38,7 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench public readonly onEnablementChanged: Event = this._onEnablementChanged.event; private readonly storageManger: StorageManager; + private extensionsDisabledByTrustRequirement: IExtension[] = []; constructor( @IStorageService storageService: IStorageService, @@ -51,13 +53,24 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench @IUserDataSyncAccountService private readonly userDataSyncAccountService: IUserDataSyncAccountService, @ILifecycleService private readonly lifecycleService: ILifecycleService, @INotificationService private readonly notificationService: INotificationService, - @IHostService hostService: IHostService, + @IHostService private readonly hostService: IHostService, @IExtensionBisectService private readonly extensionBisectService: IExtensionBisectService, + @IWorkspaceTrustService private readonly workspaceTrustService: IWorkspaceTrustService ) { super(); this.storageManger = this._register(new StorageManager(storageService)); this._register(this.globalExtensionEnablementService.onDidChangeEnablement(({ extensions, source }) => this.onDidChangeExtensions(extensions, source))); + this._register(extensionManagementService.onDidInstallExtension(this._onDidInstallExtension, this)); this._register(extensionManagementService.onDidUninstallExtension(this._onDidUninstallExtension, this)); + this._register(this.workspaceTrustService.onDidChangeTrustState(this._onDidChangeTrustState, this)); + + // Trusted extensions notification + // TODO: Confirm that this is the right lifecycle phase + this.lifecycleService.when(LifecyclePhase.Eventually).then(() => { + if (this.extensionsDisabledByTrustRequirement.length > 0) { + this.workspaceTrustService.requireWorkspaceTrust({ immediate: false }); + } + }); // delay notification for extensions disabled until workbench restored if (this.allUserExtensionsDisabled) { @@ -88,6 +101,9 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench if (this._isDisabledByExtensionKind(extension)) { return EnablementState.DisabledByExtensionKind; } + if (this._isEnabled(extension) && this._isDisabledByTrustRequirement(extension)) { + return EnablementState.DisabledByTrustRequirement; + } return this._getEnablementState(extension.identifier); } @@ -147,7 +163,23 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench } } - const result = await Promises.settled(extensions.map(e => this._setEnablement(e, newState))); + const result = await Promises.settled(extensions.map(e => { + if (this._isDisabledByTrustRequirement(e)) { + return this.workspaceTrustService.requireWorkspaceTrust({ + immediate: true, + message: 'Enabling this extension requires you to trust the contents of this workspace.' + }).then(trustState => { + if (trustState === WorkspaceTrustState.Trusted) { + return this._setEnablement(e, newState); + } else { + return Promise.resolve(false); + } + }); + } else { + return this._setEnablement(e, newState); + } + })); + const changedExtensions = extensions.filter((e, index) => result[index]); if (changedExtensions.length) { this._onEnablementChanged.fire(changedExtensions); @@ -186,6 +218,11 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench return enablementState === EnablementState.EnabledWorkspace || enablementState === EnablementState.EnabledGlobally; } + private _isEnabled(extension: IExtension): boolean { + const enablementState = this._getEnablementState(extension.identifier); + return enablementState === EnablementState.EnabledWorkspace || enablementState === EnablementState.EnabledGlobally; + } + isDisabledGlobally(extension: IExtension): boolean { return this._isDisabledGlobally(extension.identifier); } @@ -234,6 +271,18 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench return false; } + private _isDisabledByTrustRequirement(extension: IExtension): boolean { + const workspaceTrustState = this.workspaceTrustService.getWorkspaceTrustState(); + + if (extension.manifest.requiresWorkspaceTrust === 'onStart') { + if (workspaceTrustState !== WorkspaceTrustState.Trusted) { + this._addToWorkspaceDisabledExtensionsByTrustRequirement(extension); + } + return workspaceTrustState !== WorkspaceTrustState.Trusted; + } + return false; + } + private _getEnablementState(identifier: IExtensionIdentifier): EnablementState { if (this.hasWorkspace) { if (this._getWorkspaceEnabledExtensions().filter(e => areSameExtensions(e, identifier))[0]) { @@ -334,6 +383,26 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench return false; } + private _addToWorkspaceDisabledExtensionsByTrustRequirement(extension: IExtension): void { + if (this.extensionsDisabledByTrustRequirement.every(e => !areSameExtensions(extension.identifier, e.identifier))) { + this.extensionsDisabledByTrustRequirement.push(extension); + } + } + + private _removeFromWorkspaceDisabledExtensionsByTrustRequirement(identifier: IExtensionIdentifier): void { + let index = -1; + for (let i = 0; i < this.extensionsDisabledByTrustRequirement.length; i++) { + const disabledExtension = this.extensionsDisabledByTrustRequirement[i]; + if (areSameExtensions(disabledExtension.identifier, identifier)) { + index = i; + break; + } + } + if (index !== -1) { + this.extensionsDisabledByTrustRequirement.splice(index, 1); + } + } + protected _getWorkspaceEnabledExtensions(): IExtensionIdentifier[] { return this._getExtensions(ENABLED_EXTENSIONS_STORAGE_PATH); } @@ -369,6 +438,30 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench } } + private async _onDidChangeTrustState(state: WorkspaceTrustStateChangeEvent): Promise { + if (state.previousTrustState === WorkspaceTrustState.Trusted && ( + state.currentTrustState === WorkspaceTrustState.Untrusted || + state.currentTrustState === WorkspaceTrustState.Unknown)) { + // Reload window + this.hostService.reload(); + return; + } + if (state.currentTrustState === WorkspaceTrustState.Trusted) { + // Enable extensions + this._onEnablementChanged.fire(this.extensionsDisabledByTrustRequirement); + this.extensionsDisabledByTrustRequirement = []; + } + } + + private _onDidInstallExtension({ local, error }: DidInstallExtensionEvent): void { + if (local && !error && this._isDisabledByTrustRequirement(local)) { + this.workspaceTrustService.requireWorkspaceTrust({ + immediate: true, + message: 'Enabling this extension requires you to trust the contents of this workspace.' + }); + } + } + private _onDidUninstallExtension({ identifier, error }: DidUninstallExtensionEvent): void { if (!error) { this._reset(identifier); @@ -378,6 +471,7 @@ export class ExtensionEnablementService extends Disposable implements IWorkbench private _reset(extension: IExtensionIdentifier) { this._removeFromWorkspaceDisabledExtensions(extension); this._removeFromWorkspaceEnabledExtensions(extension); + this._removeFromWorkspaceDisabledExtensionsByTrustRequirement(extension); this.globalExtensionEnablementService.enableExtension(extension); } } diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts index 31b04b85480..d8d20d10229 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts @@ -33,6 +33,7 @@ export interface IWorkbenchExtensioManagementService extends IExtensionManagemen } export const enum EnablementState { + DisabledByTrustRequirement, DisabledByExtensionKind, DisabledByEnvironment, DisabledGlobally, diff --git a/src/vs/workbench/services/extensionManagement/test/browser/extensionEnablementService.test.ts b/src/vs/workbench/services/extensionManagement/test/browser/extensionEnablementService.test.ts index 24826debc55..c0ea3e9bf35 100644 --- a/src/vs/workbench/services/extensionManagement/test/browser/extensionEnablementService.test.ts +++ b/src/vs/workbench/services/extensionManagement/test/browser/extensionEnablementService.test.ts @@ -30,6 +30,8 @@ import { TestNotificationService } from 'vs/platform/notification/test/common/te import { IHostService } from 'vs/workbench/services/host/browser/host'; import { mock } from 'vs/base/test/common/mock'; import { IExtensionBisectService } from 'vs/workbench/services/extensionManagement/browser/extensionBisect'; +import { IWorkspaceTrustService } from 'vs/platform/workspace/common/workspaceTrust'; +import { TestWorkspaceTrustService } from 'vs/platform/workspace/test/common/testWorkspaceTrust'; function createStorageService(instantiationService: TestInstantiationService): IStorageService { let service = instantiationService.get(IStorageService); @@ -64,7 +66,8 @@ export class TestExtensionEnablementService extends ExtensionEnablementService { instantiationService.get(ILifecycleService) || instantiationService.stub(ILifecycleService, new TestLifecycleService()), instantiationService.get(INotificationService) || instantiationService.stub(INotificationService, new TestNotificationService()), instantiationService.get(IHostService), - new class extends mock() { isDisabledByBisect() { return false; } } + new class extends mock() { isDisabledByBisect() { return false; } }, + instantiationService.get(IWorkspaceTrustService) || instantiationService.stub(IWorkspaceTrustService, new TestWorkspaceTrustService()) ); } @@ -88,12 +91,17 @@ suite('ExtensionEnablementService Test', () => { let instantiationService: TestInstantiationService; let testObject: IWorkbenchExtensionEnablementService; + const didInstallEvent = new Emitter(); const didUninstallEvent = new Emitter(); setup(() => { instantiationService = new TestInstantiationService(); instantiationService.stub(IConfigurationService, new TestConfigurationService()); - instantiationService.stub(IExtensionManagementService, { onDidUninstallExtension: didUninstallEvent.event, getInstalled: () => Promise.resolve([] as ILocalExtension[]) } as IExtensionManagementService); + instantiationService.stub(IExtensionManagementService, >{ + onDidInstallExtension: didInstallEvent.event, + onDidUninstallExtension: didUninstallEvent.event, + getInstalled: () => Promise.resolve([] as ILocalExtension[]) + }); instantiationService.stub(IExtensionManagementServerService, { localExtensionManagementServer: { extensionManagementService: instantiationService.get(IExtensionManagementService) @@ -455,7 +463,11 @@ suite('ExtensionEnablementService Test', () => { test('test extension is disabled when disabled in environment', async () => { const extension = aLocalExtension('pub.a'); instantiationService.stub(IWorkbenchEnvironmentService, { disableExtensions: ['pub.a'] } as IWorkbenchEnvironmentService); - instantiationService.stub(IExtensionManagementService, { onDidUninstallExtension: didUninstallEvent.event, getInstalled: () => Promise.resolve([extension, aLocalExtension('pub.b')]) } as IExtensionManagementService); + instantiationService.stub(IExtensionManagementService, >{ + onDidInstallExtension: didInstallEvent.event, + onDidUninstallExtension: didUninstallEvent.event, + getInstalled: () => Promise.resolve([extension, aLocalExtension('pub.b')]) + }); testObject = new TestExtensionEnablementService(instantiationService); assert.ok(!testObject.isEnabled(extension)); assert.deepEqual(testObject.getEnablementState(extension), EnablementState.DisabledByEnvironment); diff --git a/src/vs/workbench/services/extensions/common/extensions.ts b/src/vs/workbench/services/extensions/common/extensions.ts index eb04f95a35f..33883bedb25 100644 --- a/src/vs/workbench/services/extensions/common/extensions.ts +++ b/src/vs/workbench/services/extensions/common/extensions.ts @@ -270,6 +270,16 @@ export function throwProposedApiError(extension: IExtensionDescription): never { throw new Error(`[${extension.identifier.value}]: Proposed API is only available when running out of dev or with the following command line switch: --enable-proposed-api ${extension.identifier.value}`); } +export function checkRequiresWorkspaceTrust(extension: IExtensionDescription): void { + if (!extension.requiresWorkspaceTrust) { + throwRequiresWorkspaceTrustError(extension); + } +} + +export function throwRequiresWorkspaceTrustError(extension: IExtensionDescription): void { + throw new Error(`[${extension.identifier.value}]: This API is only available when the "requiresWorkspaceTrust" is set to "onStart" or "onDemand" in the extension's package.json.`); +} + export function toExtension(extensionDescription: IExtensionDescription): IExtension { return { type: extensionDescription.isBuiltin ? ExtensionType.System : ExtensionType.User, diff --git a/src/vs/workbench/test/browser/api/extHostConfiguration.test.ts b/src/vs/workbench/test/browser/api/extHostConfiguration.test.ts index 430eaf3e935..6c27e95c9e0 100644 --- a/src/vs/workbench/test/browser/api/extHostConfiguration.test.ts +++ b/src/vs/workbench/test/browser/api/extHostConfiguration.test.ts @@ -18,6 +18,7 @@ import { IExtHostInitDataService } from 'vs/workbench/api/common/extHostInitData import { IExtHostFileSystemInfo } from 'vs/workbench/api/common/extHostFileSystemInfo'; import { FileSystemProviderCapabilities } from 'vs/platform/files/common/files'; import { isLinux } from 'vs/base/common/platform'; +import { WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust'; suite('ExtHostConfiguration', function () { @@ -318,7 +319,7 @@ suite('ExtHostConfiguration', function () { 'id': 'foo', 'folders': [aWorkspaceFolder(URI.file('foo'), 0)], 'name': 'foo' - }); + }, WorkspaceTrustState.Trusted); const testObject = new ExtHostConfigProvider( new class extends mock() { }, extHostWorkspace, @@ -394,7 +395,7 @@ suite('ExtHostConfiguration', function () { 'id': 'foo', 'folders': [aWorkspaceFolder(firstRoot, 0), aWorkspaceFolder(secondRoot, 1)], 'name': 'foo' - }); + }, WorkspaceTrustState.Trusted); const testObject = new ExtHostConfigProvider( new class extends mock() { }, extHostWorkspace, @@ -497,7 +498,7 @@ suite('ExtHostConfiguration', function () { 'id': 'foo', 'folders': [aWorkspaceFolder(firstRoot, 0), aWorkspaceFolder(secondRoot, 1)], 'name': 'foo' - }); + }, WorkspaceTrustState.Trusted); const testObject = new ExtHostConfigProvider( new class extends mock() { }, extHostWorkspace, @@ -675,7 +676,7 @@ suite('ExtHostConfiguration', function () { 'id': 'foo', 'folders': [workspaceFolder], 'name': 'foo' - }); + }, WorkspaceTrustState.Trusted); const testObject = new ExtHostConfigProvider( new class extends mock() { }, extHostWorkspace, diff --git a/src/vs/workbench/test/browser/api/extHostWorkspace.test.ts b/src/vs/workbench/test/browser/api/extHostWorkspace.test.ts index 894d43726d4..709acc159ba 100644 --- a/src/vs/workbench/test/browser/api/extHostWorkspace.test.ts +++ b/src/vs/workbench/test/browser/api/extHostWorkspace.test.ts @@ -23,6 +23,7 @@ import { IPatternInfo } from 'vs/workbench/services/search/common/search'; import { isLinux, isWindows } from 'vs/base/common/platform'; import { IExtHostFileSystemInfo } from 'vs/workbench/api/common/extHostFileSystemInfo'; import { FileSystemProviderCapabilities } from 'vs/platform/files/common/files'; +import { WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust'; function createExtHostWorkspace(mainContext: IMainContext, data: IWorkspaceData, logService: ILogService): ExtHostWorkspace { const result = new ExtHostWorkspace( @@ -31,7 +32,7 @@ function createExtHostWorkspace(mainContext: IMainContext, data: IWorkspaceData, new class extends mock() { getCapabilities() { return isLinux ? FileSystemProviderCapabilities.PathCaseSensitive : undefined; } }, logService, ); - result.$initializeWorkspace(data); + result.$initializeWorkspace(data, WorkspaceTrustState.Trusted); return result; } diff --git a/src/vs/workbench/test/browser/workbenchTestServices.ts b/src/vs/workbench/test/browser/workbenchTestServices.ts index 4af20b81780..ab712e8834c 100644 --- a/src/vs/workbench/test/browser/workbenchTestServices.ts +++ b/src/vs/workbench/test/browser/workbenchTestServices.ts @@ -124,6 +124,8 @@ import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorIn import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput'; import { SideBySideEditor } from 'vs/workbench/browser/parts/editor/sideBySideEditor'; import { IEnterWorkspaceResult, IRecent, IRecentlyOpened, IWorkspaceFolderCreationData, IWorkspaceIdentifier, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; +import { IWorkspaceTrustService } from 'vs/platform/workspace/common/workspaceTrust'; +import { TestWorkspaceTrustService } from 'vs/platform/workspace/test/common/testWorkspaceTrust'; export function createFileEditorInput(instantiationService: IInstantiationService, resource: URI): FileEditorInput { return instantiationService.createInstance(FileEditorInput, resource, undefined, undefined, undefined, undefined, undefined); @@ -223,6 +225,7 @@ export function workbenchInstantiationService( instantiationService.stub(IListService, new TestListService()); instantiationService.stub(IQuickInputService, disposables.add(new QuickInputService(configService, instantiationService, keybindingService, contextKeyService, themeService, accessibilityService, layoutService))); instantiationService.stub(IWorkspacesService, new TestWorkspacesService()); + instantiationService.stub(IWorkspaceTrustService, new TestWorkspaceTrustService()); return instantiationService; } diff --git a/src/vs/workbench/workbench.common.main.ts b/src/vs/workbench/workbench.common.main.ts index 5b2c3ae159d..aa57432c433 100644 --- a/src/vs/workbench/workbench.common.main.ts +++ b/src/vs/workbench/workbench.common.main.ts @@ -53,6 +53,7 @@ import 'vs/workbench/browser/parts/views/viewsService'; //#region --- workbench services +import 'vs/platform/workspace/common/workspaceTrust'; import 'vs/platform/undoRedo/common/undoRedoService'; import 'vs/workbench/services/extensions/browser/extensionUrlHandler'; import 'vs/workbench/services/keybinding/common/keybindingEditing'; @@ -309,6 +310,9 @@ import 'vs/workbench/contrib/welcome/common/viewsWelcome.contribution'; // Timeline import 'vs/workbench/contrib/timeline/browser/timeline.contribution'; +// Workspace +import 'vs/workbench/contrib/workspace/browser/workspace.contribution'; + // Workspaces import 'vs/workbench/contrib/workspaces/browser/workspaces.contribution'; From f891543df7d842a71345baebb0a5e90f70fe7229 Mon Sep 17 00:00:00 2001 From: jeanp413 Date: Sat, 6 Feb 2021 18:57:17 -0500 Subject: [PATCH 23/91] Properly check for FuzzyScore.Default value. This was a regression from 37a4b96ae1820d21d215b460006e0baab471d6cc --- src/vs/base/common/filters.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 653587dc5e4..48f708a4421 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -547,8 +547,8 @@ export namespace FuzzyScore { */ export const Default: FuzzyScore = ([-100, 0]); - export function isDefault(score?: FuzzyScore): score is [-100, 0, 0] { - return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0); + export function isDefault(score?: FuzzyScore): score is [-100, 0] { + return !score || (score.length === 2 && score[0] === -100 && score[1] === 0); } } From d0205792b0e01ae323cd9c7ef4c10b517e820da4 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 8 Feb 2021 10:42:42 +0100 Subject: [PATCH 24/91] add todo-tags for API feedback --- src/vs/vscode.proposed.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 837425917f5..a1b87145a47 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1982,6 +1982,10 @@ declare module 'vscode' { //#region https://github.com/microsoft/vscode/issues/16221 + // todo@API rename to InlayHint + // todo@API add InlayHintKind with type, argument, etc + // todo@API add "mini-markdown" for links and styles + export namespace languages { /** * Register a inline hints provider. From 9dd25c4d196e2920027afa5645003e6ccf245248 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 8 Feb 2021 13:33:30 +0100 Subject: [PATCH 25/91] Don't show browser preview action in Ports view web Part of microsoft/vscode-remote-release#4436 --- src/vs/workbench/contrib/remote/browser/tunnelView.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/remote/browser/tunnelView.ts b/src/vs/workbench/contrib/remote/browser/tunnelView.ts index 0e2cdc942ce..53b3382d388 100644 --- a/src/vs/workbench/contrib/remote/browser/tunnelView.ts +++ b/src/vs/workbench/contrib/remote/browser/tunnelView.ts @@ -45,6 +45,7 @@ import { ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems'; import { forwardPortIcon, openBrowserIcon, openPreviewIcon, portsViewIcon, privatePortIcon, publicPortIcon, stopForwardIcon } from 'vs/workbench/contrib/remote/browser/remoteIcons'; import { IExternalUriOpenerService } from 'vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; +import { isWeb } from 'vs/base/common/platform'; export const forwardedPortsViewEnabled = new RawContextKey('forwardedPortsViewEnabled', false); export const PORT_AUTO_FORWARD_SETTING = 'remote.autoForwardPorts'; @@ -553,6 +554,7 @@ const TunnelViewFocusContextKey = new RawContextKey('tunnelViewFocus', const TunnelViewSelectionKeyName = 'tunnelViewSelection'; const TunnelViewSelectionContextKey = new RawContextKey(TunnelViewSelectionKeyName, undefined); const PortChangableContextKey = new RawContextKey('portChangable', false); +const WebContextKey = new RawContextKey('isWeb', isWeb); class TunnelDataTree extends WorkbenchAsyncDataTree { } @@ -1297,7 +1299,7 @@ MenuRegistry.appendMenuItem(MenuId.TunnelContext, ({ id: OpenPortInPreviewAction.ID, title: OpenPortInPreviewAction.LABEL, }, - when: ContextKeyExpr.or(TunnelTypeContextKey.isEqualTo(TunnelType.Forwarded), TunnelTypeContextKey.isEqualTo(TunnelType.Detected)) + when: ContextKeyExpr.and(WebContextKey.negate(), ContextKeyExpr.or(TunnelTypeContextKey.isEqualTo(TunnelType.Forwarded), TunnelTypeContextKey.isEqualTo(TunnelType.Detected))) })); MenuRegistry.appendMenuItem(MenuId.TunnelContext, ({ group: '0_manage', @@ -1370,7 +1372,7 @@ MenuRegistry.appendMenuItem(MenuId.TunnelInline, ({ title: OpenPortInPreviewAction.LABEL, icon: openPreviewIcon }, - when: ContextKeyExpr.or(TunnelTypeContextKey.isEqualTo(TunnelType.Forwarded), TunnelTypeContextKey.isEqualTo(TunnelType.Detected)) + when: ContextKeyExpr.and(WebContextKey.negate(), ContextKeyExpr.or(TunnelTypeContextKey.isEqualTo(TunnelType.Forwarded), TunnelTypeContextKey.isEqualTo(TunnelType.Detected))) })); MenuRegistry.appendMenuItem(MenuId.TunnelInline, ({ order: 0, From 82f3379ac67f3b8e08ecc2dc1836e14c80dc343a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 8 Feb 2021 14:35:58 +0100 Subject: [PATCH 26/91] remove getActions*2 from view pane container --- src/vs/workbench/browser/panecomposite.ts | 30 +++---------------- .../browser/parts/views/viewPaneContainer.ts | 20 +++---------- src/vs/workbench/common/views.ts | 2 -- 3 files changed, 8 insertions(+), 44 deletions(-) diff --git a/src/vs/workbench/browser/panecomposite.ts b/src/vs/workbench/browser/panecomposite.ts index 4a8a1144f38..d7c33b15c77 100644 --- a/src/vs/workbench/browser/panecomposite.ts +++ b/src/vs/workbench/browser/panecomposite.ts @@ -15,7 +15,7 @@ import { Composite } from 'vs/workbench/browser/composite'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ViewPaneContainer } from './parts/views/viewPaneContainer'; import { IPaneComposite } from 'vs/workbench/common/panecomposite'; -import { IAction, IActionViewItem, Separator } from 'vs/base/common/actions'; +import { IAction, IActionViewItem } from 'vs/base/common/actions'; export class PaneComposite extends Composite implements IPaneComposite { @@ -64,37 +64,15 @@ export class PaneComposite extends Composite implements IPaneComposite { } getContextMenuActions(): ReadonlyArray { - const result = []; - result.push(...this.viewPaneContainer.getContextMenuActions2()); - - const otherActions = this.viewPaneContainer.getContextMenuActions(); - - if (otherActions.length) { - result.push(new Separator()); - result.push(...otherActions); - } - - return result; + return this.viewPaneContainer.getContextMenuActions(); } getActions(): ReadonlyArray { - const result = []; - result.push(...this.viewPaneContainer.getActions2()); - result.push(...this.viewPaneContainer.getActions()); - return result; + return this.viewPaneContainer.getActions(); } getSecondaryActions(): ReadonlyArray { - const menuActions = this.viewPaneContainer.getSecondaryActions2(); - const viewPaneContainerActions = this.viewPaneContainer.getSecondaryActions(); - if (menuActions.length && viewPaneContainerActions.length) { - return [ - ...menuActions, - new Separator(), - ...viewPaneContainerActions - ]; - } - return menuActions.length ? menuActions : viewPaneContainerActions; + return this.viewPaneContainer.getSecondaryActions(); } getActionViewItem(action: IAction): IActionViewItem | undefined { diff --git a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts index e71e07d0778..d85abe6e979 100644 --- a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts +++ b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts @@ -564,19 +564,15 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { let anchor: { x: number, y: number; } = { x: event.posx, y: event.posy }; this.contextMenuService.showContextMenu({ getAnchor: () => anchor, - getActions: () => [...this.getContextMenuActions2()] + getActions: () => [...this.getContextMenuActions()] }); } - getContextMenuActions2(): ReadonlyArray { + getContextMenuActions(): ReadonlyArray { return this.menuActions.getContextMenuActions(); } - getContextMenuActions(viewDescriptor?: IViewDescriptor): IAction[] { - return []; - } - - getActions2(): IAction[] { + getActions(): IAction[] { const result = []; result.push(...this.menuActions.getPrimaryActions()); if (this.isViewMergedWithContainer()) { @@ -585,11 +581,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { return result; } - getActions(): IAction[] { - return []; - } - - getSecondaryActions2(): IAction[] { + getSecondaryActions(): IAction[] { const viewPaneActions = this.isViewMergedWithContainer() ? this.paneItems[0].pane.getSecondaryActions() : []; let menuActions = this.menuActions.getSecondaryActions(); @@ -619,10 +611,6 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { return menuActions.length ? menuActions : viewPaneActions; } - getSecondaryActions(): IAction[] { - return []; - } - getActionsContext(): unknown { return undefined; } diff --git a/src/vs/workbench/common/views.ts b/src/vs/workbench/common/views.ts index 90a0191738a..fad47a4a92a 100644 --- a/src/vs/workbench/common/views.ts +++ b/src/vs/workbench/common/views.ts @@ -814,8 +814,6 @@ export interface IViewPaneContainer { setVisible(visible: boolean): void; isVisible(): boolean; focus(): void; - getActions(): IAction[]; - getSecondaryActions(): IAction[]; getActionViewItem(action: IAction): IActionViewItem | undefined; getActionsContext(): unknown; getView(viewId: string): IView | undefined; From 75f4a581b7a840e1cd344351a6609a7b1282620e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 8 Feb 2021 14:44:36 +0100 Subject: [PATCH 27/91] fix https://github.com/microsoft/vscode/issues/116104 --- src/vs/editor/contrib/codelens/codelensController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/codelens/codelensController.ts b/src/vs/editor/contrib/codelens/codelensController.ts index da622e6ef5f..232c4196d1f 100644 --- a/src/vs/editor/contrib/codelens/codelensController.ts +++ b/src/vs/editor/contrib/codelens/codelensController.ts @@ -108,7 +108,7 @@ export class CodeLensContribution implements IEditorContribution { newStyle += `.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${fontFamilyVar})}`; } this._styleElement.textContent = newStyle; - this._editor.getDomNode()?.style.setProperty(fontFamilyVar, fontFamily ?? 'inherit'); + this._editor.getContainerDomNode().style.setProperty(fontFamilyVar, fontFamily ?? 'inherit'); // this._editor.changeViewZones(accessor => { From 2a38ef15feb4042dcd448443b2803a6471e3138f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 8 Feb 2021 14:57:35 +0100 Subject: [PATCH 28/91] remove used code --- src/vs/base/common/actions.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/vs/base/common/actions.ts b/src/vs/base/common/actions.ts index 41b0fd8241a..746aa8a1a15 100644 --- a/src/vs/base/common/actions.ts +++ b/src/vs/base/common/actions.ts @@ -205,25 +205,6 @@ export class ActionRunner extends Disposable implements IActionRunner { } } -export class RadioGroup extends Disposable { - - constructor(readonly actions: Action[]) { - super(); - - for (const action of actions) { - this._register(action.onDidChange(e => { - if (e.checked && action.checked) { - for (const candidate of actions) { - if (candidate !== action) { - candidate.checked = false; - } - } - } - })); - } - } -} - export class Separator extends Action { static readonly ID = 'vs.actions.separator'; From 3fa2ca3f7b0838dfd3bcccca4a1b159bda4c9510 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 8 Feb 2021 06:37:10 -0800 Subject: [PATCH 29/91] Fix new terminal keybinding Fixes #116096 --- .../workbench/contrib/terminal/browser/terminalActions.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index 4b4f303f19e..565bda57f2e 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -1214,6 +1214,12 @@ export function registerTerminalActions() { category, precondition: KEYBINDING_CONTEXT_TERMINAL_PROCESS_SUPPORTED, icon: Codicon.plus, + keybinding: { + primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKTICK, + mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.US_BACKTICK }, + weight: KeybindingWeight.WorkbenchContrib, + when: KEYBINDING_CONTEXT_TERMINAL_FOCUS + }, menu: { id: MenuId.ViewTitle, group: 'navigation', From 01ace15b27be0abcfa41d2b9b263d6279b7bf9f8 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 8 Feb 2021 06:39:24 -0800 Subject: [PATCH 30/91] Fix clear terminal command ID Fixes #116095 --- src/vs/workbench/contrib/terminal/browser/terminalActions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index 565bda57f2e..c134548f262 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -1308,7 +1308,7 @@ export function registerTerminalActions() { registerAction2(class extends Action2 { constructor() { super({ - id: TERMINAL_COMMAND_ID.KILL, + id: TERMINAL_COMMAND_ID.CLEAR, title: { value: localize('workbench.action.terminal.clear', "Clear"), original: 'Clear' }, f1: true, category, From 0f1700179046f05c78c07020e1256046db52048c Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 8 Feb 2021 15:36:17 +0100 Subject: [PATCH 31/91] Fix update-grammar scripts for cross-platform use --- extensions/bat/package.json | 2 +- extensions/clojure/package.json | 2 +- extensions/coffeescript/package.json | 2 +- extensions/csharp/package.json | 2 +- extensions/css/package.json | 2 +- extensions/docker/package.json | 2 +- extensions/fsharp/package.json | 2 +- extensions/go/package.json | 2 +- extensions/groovy/package.json | 2 +- extensions/handlebars/package.json | 2 +- extensions/hlsl/package.json | 2 +- extensions/ini/package.json | 2 +- extensions/java/package.json | 2 +- extensions/less/package.json | 2 +- extensions/log/package.json | 2 +- extensions/lua/package.json | 2 +- extensions/make/package.json | 2 +- extensions/markdown-basics/package.json | 2 +- extensions/perl/package.json | 2 +- extensions/powershell/package.json | 2 +- extensions/pug/package.json | 2 +- extensions/python/package.json | 2 +- extensions/r/package.json | 2 +- extensions/razor/package.json | 2 +- extensions/ruby/package.json | 2 +- extensions/rust/package.json | 2 +- extensions/scss/package.json | 2 +- extensions/shaderlab/package.json | 2 +- extensions/shellscript/package.json | 2 +- extensions/swift/package.json | 2 +- extensions/vb/package.json | 2 +- extensions/xml/package.json | 2 +- extensions/yaml/package.json | 2 +- 33 files changed, 33 insertions(+), 33 deletions(-) diff --git a/extensions/bat/package.json b/extensions/bat/package.json index 5d36ae73ab3..f01e5d35ab2 100644 --- a/extensions/bat/package.json +++ b/extensions/bat/package.json @@ -9,7 +9,7 @@ "vscode": "^1.52.0" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater mmims/language-batchfile grammars/batchfile.cson ./syntaxes/batchfile.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin mmims/language-batchfile grammars/batchfile.cson ./syntaxes/batchfile.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/clojure/package.json b/extensions/clojure/package.json index b2c5cf3a577..4ea659b3b91 100644 --- a/extensions/clojure/package.json +++ b/extensions/clojure/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-clojure grammars/clojure.cson ./syntaxes/clojure.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-clojure grammars/clojure.cson ./syntaxes/clojure.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/coffeescript/package.json b/extensions/coffeescript/package.json index 5cfd96f4b86..e8fda02d0a3 100644 --- a/extensions/coffeescript/package.json +++ b/extensions/coffeescript/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-coffee-script grammars/coffeescript.cson ./syntaxes/coffeescript.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-coffee-script grammars/coffeescript.cson ./syntaxes/coffeescript.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/csharp/package.json b/extensions/csharp/package.json index 3d79e1ab112..df77c14cdf9 100644 --- a/extensions/csharp/package.json +++ b/extensions/csharp/package.json @@ -9,7 +9,7 @@ "vscode": "0.10.x" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater dotnet/csharp-tmLanguage grammars/csharp.tmLanguage ./syntaxes/csharp.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin dotnet/csharp-tmLanguage grammars/csharp.tmLanguage ./syntaxes/csharp.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/css/package.json b/extensions/css/package.json index 4e7e307e65b..6b3d8aebc8c 100644 --- a/extensions/css/package.json +++ b/extensions/css/package.json @@ -9,7 +9,7 @@ "vscode": "0.10.x" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater octref/language-css grammars/css.cson ./syntaxes/css.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin octref/language-css grammars/css.cson ./syntaxes/css.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/docker/package.json b/extensions/docker/package.json index 9d36db0825e..cdda622a22f 100644 --- a/extensions/docker/package.json +++ b/extensions/docker/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater moby/moby contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin moby/moby contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/fsharp/package.json b/extensions/fsharp/package.json index 3222205ce42..b6c07d40b1b 100644 --- a/extensions/fsharp/package.json +++ b/extensions/fsharp/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater ionide/ionide-fsgrammar grammars/fsharp.json ./syntaxes/fsharp.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin ionide/ionide-fsgrammar grammars/fsharp.json ./syntaxes/fsharp.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/go/package.json b/extensions/go/package.json index 520e13715aa..7b3bc14971a 100644 --- a/extensions/go/package.json +++ b/extensions/go/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater jeff-hykin/better-go-syntax export/generated.tmLanguage.json ./syntaxes/go.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin jeff-hykin/better-go-syntax export/generated.tmLanguage.json ./syntaxes/go.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/groovy/package.json b/extensions/groovy/package.json index ce5ca27ad9d..a7000f89e20 100644 --- a/extensions/groovy/package.json +++ b/extensions/groovy/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/groovy.tmbundle Syntaxes/Groovy.tmLanguage ./syntaxes/groovy.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/groovy.tmbundle Syntaxes/Groovy.tmLanguage ./syntaxes/groovy.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/handlebars/package.json b/extensions/handlebars/package.json index 9d6d6481146..0eb6cb2eb2b 100644 --- a/extensions/handlebars/package.json +++ b/extensions/handlebars/package.json @@ -9,7 +9,7 @@ "vscode": "0.10.x" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater daaain/Handlebars grammars/Handlebars.json ./syntaxes/Handlebars.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin daaain/Handlebars grammars/Handlebars.json ./syntaxes/Handlebars.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/hlsl/package.json b/extensions/hlsl/package.json index 5c8017addbd..046ff9b31c8 100644 --- a/extensions/hlsl/package.json +++ b/extensions/hlsl/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater tgjones/shaders-tmLanguage grammars/hlsl.json ./syntaxes/hlsl.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin tgjones/shaders-tmLanguage grammars/hlsl.json ./syntaxes/hlsl.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/ini/package.json b/extensions/ini/package.json index acc07eff465..324e4c87f6e 100644 --- a/extensions/ini/package.json +++ b/extensions/ini/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/ini.tmbundle Syntaxes/Ini.plist ./syntaxes/ini.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/ini.tmbundle Syntaxes/Ini.plist ./syntaxes/ini.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/java/package.json b/extensions/java/package.json index 01383db29e9..d71aa1c146c 100644 --- a/extensions/java/package.json +++ b/extensions/java/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-java grammars/java.cson ./syntaxes/java.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-java grammars/java.cson ./syntaxes/java.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/less/package.json b/extensions/less/package.json index 577307a75e1..5974be71933 100644 --- a/extensions/less/package.json +++ b/extensions/less/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-less grammars/less.cson ./syntaxes/less.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-less grammars/less.cson ./syntaxes/less.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/log/package.json b/extensions/log/package.json index 27b58c51eef..73093e1179a 100644 --- a/extensions/log/package.json +++ b/extensions/log/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater emilast/vscode-logfile-highlighter syntaxes/log.tmLanguage ./syntaxes/log.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin emilast/vscode-logfile-highlighter syntaxes/log.tmLanguage ./syntaxes/log.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/lua/package.json b/extensions/lua/package.json index cb4dfe97fbc..8161da9f705 100644 --- a/extensions/lua/package.json +++ b/extensions/lua/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/lua.tmbundle Syntaxes/Lua.plist ./syntaxes/lua.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/lua.tmbundle Syntaxes/Lua.plist ./syntaxes/lua.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/make/package.json b/extensions/make/package.json index f5fc2bb9bbc..ef8209df01c 100644 --- a/extensions/make/package.json +++ b/extensions/make/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater fadeevab/make.tmbundle Syntaxes/Makefile.plist ./syntaxes/make.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin fadeevab/make.tmbundle Syntaxes/Makefile.plist ./syntaxes/make.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/markdown-basics/package.json b/extensions/markdown-basics/package.json index 8ea3bff2e3c..e40265339c3 100644 --- a/extensions/markdown-basics/package.json +++ b/extensions/markdown-basics/package.json @@ -90,7 +90,7 @@ ] }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater microsoft/vscode-markdown-tm-grammar syntaxes/markdown.tmLanguage ./syntaxes/markdown.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin microsoft/vscode-markdown-tm-grammar syntaxes/markdown.tmLanguage ./syntaxes/markdown.tmLanguage.json" }, "repository": { "type": "git", diff --git a/extensions/perl/package.json b/extensions/perl/package.json index 6baa327ab35..e195e517e50 100644 --- a/extensions/perl/package.json +++ b/extensions/perl/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/perl.tmbundle Syntaxes/Perl.plist ./syntaxes/perl.tmLanguage.json Syntaxes/Perl%206.tmLanguage ./syntaxes/perl6.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/perl.tmbundle Syntaxes/Perl.plist ./syntaxes/perl.tmLanguage.json Syntaxes/Perl%206.tmLanguage ./syntaxes/perl6.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/powershell/package.json b/extensions/powershell/package.json index e176f7f412c..f9715a8b21f 100644 --- a/extensions/powershell/package.json +++ b/extensions/powershell/package.json @@ -44,7 +44,7 @@ ] }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater PowerShell/EditorSyntax PowerShellSyntax.tmLanguage ./syntaxes/powershell.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin PowerShell/EditorSyntax PowerShellSyntax.tmLanguage ./syntaxes/powershell.tmLanguage.json" }, "repository": { "type": "git", diff --git a/extensions/pug/package.json b/extensions/pug/package.json index 5dd19cfa3e1..fd74f5b915c 100644 --- a/extensions/pug/package.json +++ b/extensions/pug/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater davidrios/pug-tmbundle Syntaxes/Pug.JSON-tmLanguage ./syntaxes/pug.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin davidrios/pug-tmbundle Syntaxes/Pug.JSON-tmLanguage ./syntaxes/pug.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/python/package.json b/extensions/python/package.json index 7413ef788b1..d99a1cefbf7 100644 --- a/extensions/python/package.json +++ b/extensions/python/package.json @@ -53,7 +53,7 @@ ] }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater MagicStack/MagicPython grammars/MagicPython.tmLanguage ./syntaxes/MagicPython.tmLanguage.json grammars/MagicRegExp.tmLanguage ./syntaxes/MagicRegExp.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin MagicStack/MagicPython grammars/MagicPython.tmLanguage ./syntaxes/MagicPython.tmLanguage.json grammars/MagicRegExp.tmLanguage ./syntaxes/MagicRegExp.tmLanguage.json" }, "repository": { "type": "git", diff --git a/extensions/r/package.json b/extensions/r/package.json index 114c2122cec..44884cf3336 100644 --- a/extensions/r/package.json +++ b/extensions/r/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater Ikuyadeu/vscode-R syntax/r.json ./syntaxes/r.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin Ikuyadeu/vscode-R syntax/r.json ./syntaxes/r.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/razor/package.json b/extensions/razor/package.json index ddcbd6e415e..fcae342cfde 100644 --- a/extensions/razor/package.json +++ b/extensions/razor/package.json @@ -9,7 +9,7 @@ "vscode": "0.10.x" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater demyte/language-cshtml grammars/cshtml.json ./syntaxes/cshtml.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin demyte/language-cshtml grammars/cshtml.json ./syntaxes/cshtml.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/ruby/package.json b/extensions/ruby/package.json index 6b5bd195a9a..1ce625ef7c8 100644 --- a/extensions/ruby/package.json +++ b/extensions/ruby/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/ruby.tmbundle Syntaxes/Ruby.plist ./syntaxes/ruby.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/ruby.tmbundle Syntaxes/Ruby.plist ./syntaxes/ruby.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/rust/package.json b/extensions/rust/package.json index ffa36bdabf0..7584298368e 100644 --- a/extensions/rust/package.json +++ b/extensions/rust/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater dustypomerleau/rust-syntax syntaxes/rust.tmLanguage.json ./syntaxes/rust.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin dustypomerleau/rust-syntax syntaxes/rust.tmLanguage.json ./syntaxes/rust.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/scss/package.json b/extensions/scss/package.json index 4eaedeff263..967b790d9e5 100644 --- a/extensions/scss/package.json +++ b/extensions/scss/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-sass grammars/scss.cson ./syntaxes/scss.tmLanguage.json grammars/sassdoc.cson ./syntaxes/sassdoc.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-sass grammars/scss.cson ./syntaxes/scss.tmLanguage.json grammars/sassdoc.cson ./syntaxes/sassdoc.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/shaderlab/package.json b/extensions/shaderlab/package.json index 905a059db44..7ffb311bea1 100644 --- a/extensions/shaderlab/package.json +++ b/extensions/shaderlab/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater tgjones/shaders-tmLanguage grammars/shaderlab.json ./syntaxes/shaderlab.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin tgjones/shaders-tmLanguage grammars/shaderlab.json ./syntaxes/shaderlab.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/shellscript/package.json b/extensions/shellscript/package.json index 087d6bbe812..3826f2dd934 100644 --- a/extensions/shellscript/package.json +++ b/extensions/shellscript/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-shellscript grammars/shell-unix-bash.cson ./syntaxes/shell-unix-bash.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-shellscript grammars/shell-unix-bash.cson ./syntaxes/shell-unix-bash.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/swift/package.json b/extensions/swift/package.json index 4c7aea0299d..d8786ae14c6 100644 --- a/extensions/swift/package.json +++ b/extensions/swift/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/swift.tmbundle Syntaxes/Swift.tmLanguage ./syntaxes/swift.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/swift.tmbundle Syntaxes/Swift.tmLanguage ./syntaxes/swift.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/vb/package.json b/extensions/vb/package.json index be8464f589c..b3472f80a5a 100644 --- a/extensions/vb/package.json +++ b/extensions/vb/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/asp.vb.net.tmbundle Syntaxes/ASP%20VB.net.plist ./syntaxes/asp-vb-net.tmlanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/asp.vb.net.tmbundle Syntaxes/ASP%20VB.net.plist ./syntaxes/asp-vb-net.tmlanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/xml/package.json b/extensions/xml/package.json index 4555ba757b7..a7a9d2c6422 100644 --- a/extensions/xml/package.json +++ b/extensions/xml/package.json @@ -108,7 +108,7 @@ ] }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-xml grammars/xml.cson ./syntaxes/xml.tmLanguage.json grammars/xsl.cson ./syntaxes/xsl.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-xml grammars/xml.cson ./syntaxes/xml.tmLanguage.json grammars/xsl.cson ./syntaxes/xsl.tmLanguage.json" }, "repository": { "type": "git", diff --git a/extensions/yaml/package.json b/extensions/yaml/package.json index 80005a0d77d..0673aeda746 100644 --- a/extensions/yaml/package.json +++ b/extensions/yaml/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/yaml.tmbundle Syntaxes/YAML.tmLanguage ./syntaxes/yaml.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/yaml.tmbundle Syntaxes/YAML.tmLanguage ./syntaxes/yaml.tmLanguage.json" }, "contributes": { "languages": [ From f5381197bf7312c66edbd236a97a3d01db311e6b Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 8 Feb 2021 16:06:54 +0100 Subject: [PATCH 32/91] Improve ports view welcome text Part of #116058 --- src/vs/workbench/contrib/remote/browser/remoteExplorer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts b/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts index d9e0ea9eb73..e197733b40f 100644 --- a/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts +++ b/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts @@ -52,7 +52,7 @@ export class ForwardedPortsView extends Disposable implements IWorkbenchContribu super(); this.tasExperimentService = tasExperimentService; this._register(Registry.as(Extensions.ViewsRegistry).registerViewWelcomeContent(TUNNEL_VIEW_ID, { - content: `Forwarded ports allow you to access your running services locally.\n[Forward a Port](command:${ForwardPortAction.INLINE_ID})`, + content: `No forwarded ports. Forward a port to access your running services locally.\n[Forward a Port](command:${ForwardPortAction.INLINE_ID})`, })); this.enableBadgeAndStatusBar(); this.enableForwardedPortsView(); From 1da95321b14f4fa68e8b3a23b72c12e1fc4a4ca1 Mon Sep 17 00:00:00 2001 From: David Bailey Date: Mon, 8 Feb 2021 15:07:55 +0000 Subject: [PATCH 33/91] RPM: Don't generate build_id links (#116105) * Don't generate build_id links * add comment explaining change --- resources/linux/rpm/code.spec.template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template index 3407d4a0c51..03272de1a48 100644 --- a/resources/linux/rpm/code.spec.template +++ b/resources/linux/rpm/code.spec.template @@ -14,6 +14,10 @@ AutoReq: 0 %description Visual Studio Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. See https://code.visualstudio.com/docs/setup/linux for installation instructions and FAQ. +# Don't generate build_id links to prevent conflicts when installing multiple +# versions of VS Code alongside each other (e.g. `code` and `code-insiders`) +%define _build_id_links none + %install mkdir -p %{buildroot}/usr/share/@@NAME@@ mkdir -p %{buildroot}/usr/share/applications From ac7918ed6e27495316847e39cf259216cbc26bc3 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 8 Feb 2021 07:18:41 -0800 Subject: [PATCH 34/91] Fix terminal paste command Fixes #116098 --- .../contrib/terminal/browser/terminalActions.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index c134548f262..16064271712 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -1437,14 +1437,7 @@ export function registerTerminalActions() { title: switchTerminalTitle, f1: true, category, - precondition: KEYBINDING_CONTEXT_TERMINAL_PROCESS_SUPPORTED, - keybinding: [{ - primary: KeyMod.CtrlCmd | KeyCode.KEY_V, - win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V] }, - linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V }, - weight: KeybindingWeight.WorkbenchContrib, - when: KEYBINDING_CONTEXT_TERMINAL_FOCUS - }], + precondition: KEYBINDING_CONTEXT_TERMINAL_PROCESS_SUPPORTED }); } async run(accessor: ServicesAccessor, item?: string) { From 50dc6c3c66f53595b9355c7ab731bd3fccc8a707 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 Feb 2021 16:22:32 +0100 Subject: [PATCH 35/91] add search support --- .../syntaxes/generateTMLanguage.js | 1 + .../syntaxes/searchResult.tmLanguage.json | 89 +++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/extensions/search-result/syntaxes/generateTMLanguage.js b/extensions/search-result/syntaxes/generateTMLanguage.js index c0170e514f9..f42955f9fb1 100644 --- a/extensions/search-result/syntaxes/generateTMLanguage.js +++ b/extensions/search-result/syntaxes/generateTMLanguage.js @@ -22,6 +22,7 @@ const mappings = [ ['html', 'text.html.basic'], ['ini', 'source.ini'], ['java', 'source.java'], + ['jl', 'source.julia'], ['js', 'source.js'], ['json', 'source.json.comments'], ['jsx', 'source.js.jsx'], diff --git a/extensions/search-result/syntaxes/searchResult.tmLanguage.json b/extensions/search-result/syntaxes/searchResult.tmLanguage.json index e319191c41f..68f00cfb2a0 100644 --- a/extensions/search-result/syntaxes/searchResult.tmLanguage.json +++ b/extensions/search-result/syntaxes/searchResult.tmLanguage.json @@ -141,6 +141,9 @@ { "include": "#java" }, + { + "include": "#jl" + }, { "include": "#js" }, @@ -2076,6 +2079,92 @@ } ] }, + "jl": { + "name": "meta.resultBlock.search", + "begin": "^(?!\\s)(.*?)([^\\\\\\/\\n]*\\.jl)(:)$", + "end": "^(?!\\s)", + "beginCaptures": { + "0": { + "name": "string meta.path.search" + }, + "1": { + "name": "meta.path.dirname.search" + }, + "2": { + "name": "meta.path.basename.search" + }, + "3": { + "name": "punctuation.separator" + } + }, + "patterns": [ + { + "name": "meta.resultLine.search meta.resultLine.multiLine.search", + "begin": "^ (?:\\s*)((\\d+) )", + "while": "^ (?:\\s*)(?:((\\d+)(:))|((\\d+) ))", + "beginCaptures": { + "0": { + "name": "constant.numeric.integer meta.resultLinePrefix.search" + }, + "1": { + "name": "meta.resultLinePrefix.contextLinePrefix.search" + }, + "2": { + "name": "meta.resultLinePrefix.lineNumber.search" + } + }, + "whileCaptures": { + "0": { + "name": "constant.numeric.integer meta.resultLinePrefix.search" + }, + "1": { + "name": "meta.resultLinePrefix.matchLinePrefix.search" + }, + "2": { + "name": "meta.resultLinePrefix.lineNumber.search" + }, + "3": { + "name": "punctuation.separator" + }, + "4": { + "name": "meta.resultLinePrefix.contextLinePrefix.search" + }, + "5": { + "name": "meta.resultLinePrefix.lineNumber.search" + } + }, + "patterns": [ + { + "include": "source.julia" + } + ] + }, + { + "begin": "^ (?:\\s*)((\\d+)(:))", + "while": "(?=not)possible", + "name": "meta.resultLine.search meta.resultLine.singleLine.search", + "beginCaptures": { + "0": { + "name": "constant.numeric.integer meta.resultLinePrefix.search" + }, + "1": { + "name": "meta.resultLinePrefix.matchLinePrefix.search" + }, + "2": { + "name": "meta.resultLinePrefix.lineNumber.search" + }, + "3": { + "name": "punctuation.separator" + } + }, + "patterns": [ + { + "include": "source.julia" + } + ] + } + ] + }, "js": { "name": "meta.resultBlock.search", "begin": "^(?!\\s)(.*?)([^\\\\\\/\\n]*\\.js)(:)$", From ebac2cfa10b081837869b203f73d67cb8870daa4 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 Feb 2021 16:33:12 +0100 Subject: [PATCH 36/91] add colorizer test --- .../test/colorize-fixtures/test.jl | 26 + .../test/colorize-results/test_jl.json | 2543 +++++++++++++++++ 2 files changed, 2569 insertions(+) create mode 100644 extensions/vscode-colorize-tests/test/colorize-fixtures/test.jl create mode 100644 extensions/vscode-colorize-tests/test/colorize-results/test_jl.json diff --git a/extensions/vscode-colorize-tests/test/colorize-fixtures/test.jl b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.jl new file mode 100644 index 00000000000..3836db893f7 --- /dev/null +++ b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.jl @@ -0,0 +1,26 @@ +# n-queens (nqueens) solver, for nsquaresx-by-nsquaresy board + +struct Queen + x::Int + y::Int +end +hitshorz(queena, queenb) = queena.x == queenb.x +hitsvert(queena, queenb) = queena.y == queenb.y +hitsdiag(queena, queenb) = abs(queena.x - queenb.x) == abs(queena.y - queenb.y) +hitshvd(qa, qb) = hitshorz(qa, qb) || hitsvert(qa, qb) || hitsdiag(qa, qb) +hitsany(testqueen, queens) = any(q -> hitshvd(testqueen, q), queens) + +function trysolve(nsquaresx, nsquaresy, nqueens, presqueens = ()) + nqueens == 0 && return presqueens + for xsquare in 1:nsquaresx + for ysquare in 1:nsquaresy + testqueen = Queen(xsquare, ysquare) + if !hitsany(testqueen, presqueens) + tryqueens = (presqueens..., testqueen) + maybesol = trysolve(nsquaresx, nsquaresy, nqueens - 1, tryqueens) + maybesol !== nothing && return maybesol + end + end + end + return nothing +end diff --git a/extensions/vscode-colorize-tests/test/colorize-results/test_jl.json b/extensions/vscode-colorize-tests/test/colorize-results/test_jl.json new file mode 100644 index 00000000000..74646b2c782 --- /dev/null +++ b/extensions/vscode-colorize-tests/test/colorize-results/test_jl.json @@ -0,0 +1,2543 @@ +[ + { + "c": "#", + "t": "source.julia comment.line.number-sign.julia punctuation.definition.comment.julia", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668" + } + }, + { + "c": " n-queens (nqueens) solver, for nsquaresx-by-nsquaresy board", + "t": "source.julia comment.line.number-sign.julia", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668" + } + }, + { + "c": "struct", + "t": "source.julia keyword.other.julia", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " Queen", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " x", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "::", + "t": "source.julia keyword.operator.relation.types.julia", + "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": "Int", + "t": "source.julia support.type.julia", + "r": { + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.type: #4EC9B0" + } + }, + { + "c": " y", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "::", + "t": "source.julia keyword.operator.relation.types.julia", + "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": "Int", + "t": "source.julia support.type.julia", + "r": { + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.type: #4EC9B0" + } + }, + { + "c": "end", + "t": "source.julia keyword.control.end.julia", + "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": "hitshorz", + "t": "source.julia entity.name.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "queena", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " queenb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.julia keyword.operator.update.julia", + "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": " queena", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ".", + "t": "source.julia keyword.operator.dots.julia", + "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": "x ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "==", + "t": "source.julia keyword.operator.relation.julia", + "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": " queenb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ".", + "t": "source.julia keyword.operator.dots.julia", + "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": "x", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "hitsvert", + "t": "source.julia entity.name.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "queena", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " queenb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.julia keyword.operator.update.julia", + "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": " queena", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ".", + "t": "source.julia keyword.operator.dots.julia", + "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": "y ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "==", + "t": "source.julia keyword.operator.relation.julia", + "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": " queenb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ".", + "t": "source.julia keyword.operator.dots.julia", + "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": "y", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "hitsdiag", + "t": "source.julia entity.name.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "queena", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " queenb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.julia keyword.operator.update.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "abs", + "t": "source.julia support.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "queena", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ".", + "t": "source.julia keyword.operator.dots.julia", + "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": "x ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "-", + "t": "source.julia keyword.operator.arithmetic.julia", + "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": " queenb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ".", + "t": "source.julia keyword.operator.dots.julia", + "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": "x", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "==", + "t": "source.julia keyword.operator.relation.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "abs", + "t": "source.julia support.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "queena", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ".", + "t": "source.julia keyword.operator.dots.julia", + "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": "y ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "-", + "t": "source.julia keyword.operator.arithmetic.julia", + "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": " queenb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ".", + "t": "source.julia keyword.operator.dots.julia", + "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": "y", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "hitshvd", + "t": "source.julia entity.name.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "qa", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " qb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.julia keyword.operator.update.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "hitshorz", + "t": "source.julia support.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "qa", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " qb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "||", + "t": "source.julia keyword.operator.boolean.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "hitsvert", + "t": "source.julia support.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "qa", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " qb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "||", + "t": "source.julia keyword.operator.boolean.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "hitsdiag", + "t": "source.julia support.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "qa", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " qb", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "hitsany", + "t": "source.julia entity.name.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "testqueen", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " queens", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.julia keyword.operator.update.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "any", + "t": "source.julia support.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "q ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "->", + "t": "source.julia keyword.operator.arrow.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "hitshvd", + "t": "source.julia support.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "testqueen", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " q", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "),", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " queens", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "function", + "t": "source.julia keyword.other.julia", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "trysolve", + "t": "source.julia entity.name.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "nsquaresx", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " nsquaresy", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " nqueens", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " presqueens ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.julia keyword.operator.update.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "())", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " nqueens ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "==", + "t": "source.julia keyword.operator.relation.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "0", + "t": "source.julia constant.numeric.julia", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "&&", + "t": "source.julia keyword.operator.boolean.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "return", + "t": "source.julia keyword.control.julia", + "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": " presqueens", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "for", + "t": "source.julia keyword.control.julia", + "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": " xsquare ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "in", + "t": "source.julia keyword.operator.relation.in.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "1", + "t": "source.julia constant.numeric.julia", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ":", + "t": "source.julia keyword.operator.range.julia", + "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": "nsquaresx", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "for", + "t": "source.julia keyword.control.julia", + "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": " ysquare ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "in", + "t": "source.julia keyword.operator.relation.in.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "1", + "t": "source.julia constant.numeric.julia", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ":", + "t": "source.julia keyword.operator.range.julia", + "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": "nsquaresy", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " testqueen ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.julia keyword.operator.update.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "Queen", + "t": "source.julia support.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "xsquare", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ysquare", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "if", + "t": "source.julia keyword.control.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "!", + "t": "source.julia keyword.operator.boolean.julia", + "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": "hitsany", + "t": "source.julia support.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "testqueen", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " presqueens", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " tryqueens ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.julia keyword.operator.update.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "(", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "presqueens", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "...", + "t": "source.julia keyword.operator.dots.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " testqueen", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " maybesol ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.julia keyword.operator.update.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "trysolve", + "t": "source.julia support.function.julia", + "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.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "nsquaresx", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " nsquaresy", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " nqueens ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "-", + "t": "source.julia keyword.operator.arithmetic.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "1", + "t": "source.julia constant.numeric.julia", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ",", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " tryqueens", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.julia meta.bracket.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " maybesol ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "!==", + "t": "source.julia keyword.operator.relation.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "nothing", + "t": "source.julia constant.language.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "&&", + "t": "source.julia keyword.operator.boolean.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "return", + "t": "source.julia keyword.control.julia", + "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": " maybesol", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "end", + "t": "source.julia keyword.control.end.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "end", + "t": "source.julia keyword.control.end.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "end", + "t": "source.julia keyword.control.end.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "return", + "t": "source.julia keyword.control.julia", + "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.julia", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "nothing", + "t": "source.julia constant.language.julia", + "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": "end", + "t": "source.julia keyword.control.end.julia", + "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" + } + } +] \ No newline at end of file From 1a9635193f626e16d2cc2df469c57872d6f8258b Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 Feb 2021 16:33:49 +0100 Subject: [PATCH 37/91] update and fix grammar --- extensions/julia/cgmanifest.json | 4 ++-- extensions/julia/package.json | 2 +- extensions/julia/syntaxes/julia.tmLanguage.json | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/julia/cgmanifest.json b/extensions/julia/cgmanifest.json index ef8a78a5761..9d03ce0d90c 100644 --- a/extensions/julia/cgmanifest.json +++ b/extensions/julia/cgmanifest.json @@ -6,11 +6,11 @@ "git": { "name": " JuliaEditorSupport/atom-language-julia", "repositoryUrl": "https://github.com/JuliaEditorSupport/atom-language-julia", - "commitHash": "df335e026376acd722439aa1ac08f0889ada022e" + "commitHash": "8ae8d9cac742c65ae0bef1a5e2d068e2cae871bc" } }, "license": "MIT", - "version": "0.20.2" + "version": "0.21.0" } ], "version": 1 diff --git a/extensions/julia/package.json b/extensions/julia/package.json index fdf0ce01a7e..971ad4fe96e 100644 --- a/extensions/julia/package.json +++ b/extensions/julia/package.json @@ -9,7 +9,7 @@ "vscode": "0.10.x" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js JuliaEditorSupport/atom-language-julia grammars/julia_vscode.json ./syntaxes/julia.tmLanguage.json" + "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater JuliaEditorSupport/atom-language-julia grammars/julia_vscode.json ./syntaxes/julia.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/julia/syntaxes/julia.tmLanguage.json b/extensions/julia/syntaxes/julia.tmLanguage.json index a5a26c969d5..d128f347693 100644 --- a/extensions/julia/syntaxes/julia.tmLanguage.json +++ b/extensions/julia/syntaxes/julia.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/JuliaEditorSupport/atom-language-julia/commit/df335e026376acd722439aa1ac08f0889ada022e", + "version": "https://github.com/JuliaEditorSupport/atom-language-julia/commit/8ae8d9cac742c65ae0bef1a5e2d068e2cae871bc", "name": "Julia", "scopeName": "source.julia", "comment": "This grammar is used by Atom (Oniguruma), GitHub (PCRE), and VSCode (Oniguruma),\nso all regexps must be compatible with both engines.\n\nSpecs:\n- https://github.com/kkos/oniguruma/blob/master/doc/RE\n- https://www.pcre.org/current/doc/html/", @@ -288,7 +288,7 @@ "match": "(?:\\s*(::|>:|<:)\\s*((?:(?:Union)?\\([^)]*\\)|[[:alpha:]_$∇][[:word:]⁺-ₜ!′\\.]*(?:(?:{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})|(?:\".+?(? Date: Mon, 8 Feb 2021 16:43:28 +0100 Subject: [PATCH 38/91] Update gulp-atom-electron (#116119) * update to latest gulp-atom-electron * update gulp-atom-electron again * use latest gulp-atom-electron, electronMirror option * Revert "use latest gulp-atom-electron, electronMirror option" This reverts commit 47ff28a5e1d6e9941f0b2d8656b0af021f355023. * update gulp-atom-electron * update gulp-atom-electron * one more --- package.json | 2 +- yarn.lock | 194 +++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 157 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index b4e5cfd8a91..a8d93b98375 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "file-loader": "^4.2.0", "glob": "^5.0.13", "gulp": "^4.0.0", - "gulp-atom-electron": "1.22.0", + "gulp-atom-electron": "^1.30.1", "gulp-azure-storage": "^0.11.1", "gulp-bom": "^3.0.0", "gulp-buffer": "0.0.2", diff --git a/yarn.lock b/yarn.lock index 1bf0fd07c68..527de19f3d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -170,6 +170,22 @@ global-agent "^2.0.2" global-tunnel-ng "^2.7.1" +"@electron/get@^1.12.4": + version "1.12.4" + resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.12.4.tgz#a5971113fc1bf8fa12a8789dc20152a7359f06ab" + integrity sha512-6nr9DbJPUR9Xujw6zD3y+rS95TyItEVM0NVjt1EehY2vUWfIgPiIPVHxCvaTS0xr2B+DRxovYVKbuOWqC35kjg== + dependencies: + debug "^4.1.1" + env-paths "^2.2.0" + fs-extra "^8.1.0" + got "^9.6.0" + progress "^2.0.3" + semver "^6.2.0" + sumchecker "^3.0.1" + optionalDependencies: + global-agent "^2.0.2" + global-tunnel-ng "^2.7.1" + "@gulp-sourcemaps/identity-map@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-2.0.1.tgz#a6e8b1abec8f790ec6be2b8c500e6e68037c0019" @@ -229,6 +245,109 @@ dependencies: mkdirp "^1.0.4" +"@octokit/auth-token@^2.4.4": + version "2.4.4" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.4.tgz#ee31c69b01d0378c12fd3ffe406030f3d94d3b56" + integrity sha512-LNfGu3Ro9uFAYh10MUZVaT7X2CnNm2C8IDQmabx+3DygYIQjs9FwzFAHN/0t6mu5HEPhxcb1XOuxdpY82vCg2Q== + dependencies: + "@octokit/types" "^6.0.0" + +"@octokit/core@^3.2.3": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.2.4.tgz#5791256057a962eca972e31818f02454897fd106" + integrity sha512-d9dTsqdePBqOn7aGkyRFe7pQpCXdibSJ5SFnrTr0axevObZrpz3qkWm7t/NjYv5a66z6vhfteriaq4FRz3e0Qg== + dependencies: + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.4.12" + "@octokit/types" "^6.0.3" + before-after-hook "^2.1.0" + universal-user-agent "^6.0.0" + +"@octokit/endpoint@^6.0.1": + version "6.0.10" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.10.tgz#741ce1fa2f4fb77ce8ebe0c6eaf5ce63f565f8e8" + integrity sha512-9+Xef8nT7OKZglfkOMm7IL6VwxXUQyR7DUSU0LH/F7VNqs8vyd7es5pTfz9E7DwUIx7R3pGscxu1EBhYljyu7Q== + dependencies: + "@octokit/types" "^6.0.0" + is-plain-object "^5.0.0" + universal-user-agent "^6.0.0" + +"@octokit/graphql@^4.5.8": + version "4.5.8" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.8.tgz#d42373633c3015d0eafce64a8ce196be167fdd9b" + integrity sha512-WnCtNXWOrupfPJgXe+vSmprZJUr0VIu14G58PMlkWGj3cH+KLZEfKMmbUQ6C3Wwx6fdhzVW1CD5RTnBdUHxhhA== + dependencies: + "@octokit/request" "^5.3.0" + "@octokit/types" "^6.0.0" + universal-user-agent "^6.0.0" + +"@octokit/openapi-types@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-3.2.0.tgz#d62d0ff7147dbf4d218616b2484ee2a5d023055d" + integrity sha512-X7yW/fpzF3uTAE+LbPD3HEeeU+/49o0V4kNA/yv8jQ3BDpFayv/osTOhY1y1mLXljW2bOJcOCSGZo4jFKPJ6Vw== + +"@octokit/plugin-paginate-rest@^2.6.2": + version "2.8.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.8.0.tgz#2b41e12b494e895bf5fb5b12565d2c80a0ecc6ae" + integrity sha512-HtuEQ2AYE4YFEBQN0iHmMsIvVucd5RsnwJmRKIsfAg1/ZeoMaU+jXMnTAZqIUEmcVJA27LjHUm3f1hxf8Fpdxw== + dependencies: + "@octokit/types" "^6.4.0" + +"@octokit/plugin-request-log@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz#394d59ec734cd2f122431fbaf05099861ece3c44" + integrity sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg== + +"@octokit/plugin-rest-endpoint-methods@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.8.0.tgz#c1f24f940fc265f0021c8f544e3d8755f3253759" + integrity sha512-2zRpXDveJH8HsXkeeMtRW21do8wuSxVn1xXFdvhILyxlLWqGQrdJUA1/dk5DM7iAAYvwT/P3bDOLs90yL4S2AA== + dependencies: + "@octokit/types" "^6.5.0" + deprecation "^2.3.1" + +"@octokit/request-error@^2.0.0": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.4.tgz#07dd5c0521d2ee975201274c472a127917741262" + integrity sha512-LjkSiTbsxIErBiRh5wSZvpZqT4t0/c9+4dOe0PII+6jXR+oj/h66s7E4a/MghV7iT8W9ffoQ5Skoxzs96+gBPA== + dependencies: + "@octokit/types" "^6.0.0" + deprecation "^2.0.0" + once "^1.4.0" + +"@octokit/request@^5.3.0", "@octokit/request@^5.4.12": + version "5.4.12" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.12.tgz#b04826fa934670c56b135a81447be2c1723a2ffc" + integrity sha512-MvWYdxengUWTGFpfpefBBpVmmEYfkwMoxonIB3sUGp5rhdgwjXL1ejo6JbgzG/QD9B/NYt/9cJX1pxXeSIUCkg== + dependencies: + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.0.0" + "@octokit/types" "^6.0.3" + deprecation "^2.0.0" + is-plain-object "^5.0.0" + node-fetch "^2.6.1" + once "^1.4.0" + universal-user-agent "^6.0.0" + +"@octokit/rest@^18.0.14": + version "18.0.14" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.14.tgz#a152478465746542e80697b5a5576ccb6151dc4d" + integrity sha512-62mKIaBb/XD2Z2KCBmAPydEk/d0IBMOnwk6DJVo36ICTnxlRPTdQwFE2LzlpBPDR52xOKPlGqb3Bnhh99atltA== + dependencies: + "@octokit/core" "^3.2.3" + "@octokit/plugin-paginate-rest" "^2.6.2" + "@octokit/plugin-request-log" "^1.0.2" + "@octokit/plugin-rest-endpoint-methods" "4.8.0" + +"@octokit/types@^6.0.0", "@octokit/types@^6.0.3", "@octokit/types@^6.4.0", "@octokit/types@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.5.0.tgz#8f27c52d57eb4096fb05a290f4afc90194e08b19" + integrity sha512-mzCy7lkYQv+kM58W37uTg/mWoJ4nvRDRCkjSdqlrgA28hJEYNJTMYiGTvmq39cdtnMPJd0hshysBEAaH4D5C7w== + dependencies: + "@octokit/openapi-types" "^3.2.0" + "@types/node" ">= 8" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -371,6 +490,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-4.2.22.tgz#cf488a0f6b4a9c245d09927f4f757ca278b9c8ce" integrity sha512-LXRap3bb4AjtLZ5NOFc4ssVZrQPTgdPcNm++0SEJuJZaOA+xHkojJNYqy33A5q/94BmG5tA6yaMeD4VdCv5aSA== +"@types/node@>= 8": + version "14.14.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18" + integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw== + "@types/node@^10.11.7": version "10.12.21" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e" @@ -1304,6 +1428,11 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +before-after-hook@^2.1.0: + version "2.1.0" + resolved "https://pkgs.dev.azure.com/terrapin-prod/Terrapin/_packaging/open-source-packages-2/npm/registry/before-after-hook/-/before-after-hook-2.1.0.tgz#0bb562539c98af6479c3e423df1880d022bd9c76" + integrity sha1-C7ViU5yYr2R5w+Qj3xiA0CK9nHY= + big.js@^3.1.3: version "3.2.0" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" @@ -2066,7 +2195,7 @@ colorette@^1.2.1: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== -colors@^1.1.2, colors@^1.3.3: +colors@^1.3.3: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -2711,6 +2840,11 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= +deprecation@^2.0.0, deprecation@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" + integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== + des.js@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" @@ -4037,16 +4171,6 @@ github-from-package@0.0.0: resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= -github-releases-ms@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/github-releases-ms/-/github-releases-ms-0.5.0.tgz#a5b36c3f2cfc5336064165d26708df78affc300a" - integrity sha512-cndYTVDF9LiL+LbMiyUfYLbWjpiMqNiTiJTQprlXJ/p8DoGBK8zZ1yGvIEzfV2SvZXgYt2m/ZFnywMHhb+/goQ== - dependencies: - minimatch "^3.0.4" - optimist "^0.6.1" - prettyjson "^1.2.1" - request "^2.88.0" - glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" @@ -4286,19 +4410,19 @@ growl@1.10.5: resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== -gulp-atom-electron@1.22.0: - version "1.22.0" - resolved "https://registry.yarnpkg.com/gulp-atom-electron/-/gulp-atom-electron-1.22.0.tgz#0e2f4fe7c7310145c6c81d5660d0277cd8338d27" - integrity sha512-K13Ze2+iRIvC1igl+BIbZdF8M2ZzEIM6LF+/j83oWNGNhe7+en77qT9y9rs6SipYeOyoInlbly+pzbFgvwpSHA== +gulp-atom-electron@^1.30.1: + version "1.30.1" + resolved "https://registry.yarnpkg.com/gulp-atom-electron/-/gulp-atom-electron-1.30.1.tgz#d29516d63fa7f0c7841e664a60c6a00c14c6090d" + integrity sha512-lOpvkdS6QwwqtH3CfnoI/uwOc2u1OL9OeH67ZzjfO9cra2dW1GJ6xQl62Pot8fc0kMx+N7qrbGo/+N0hdxfHXg== dependencies: + "@electron/get" "^1.12.4" + "@octokit/rest" "^18.0.14" event-stream "3.3.4" - github-releases-ms "^0.5.0" gulp-filter "^5.1.0" gulp-rename "1.2.2" gulp-symdest "^1.1.1" gulp-vinyl-zip "^2.1.2" mkdirp "^0.5.1" - object-assign "^4.0.1" plist "^3.0.1" progress "^1.1.8" rcedit "^0.3.0" @@ -5251,6 +5375,11 @@ is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + 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" @@ -6214,11 +6343,6 @@ minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= - minipass-collect@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" @@ -6498,6 +6622,11 @@ node-addon-api@^3.0.0, node-addon-api@^3.0.2: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.0.2.tgz#04bc7b83fd845ba785bb6eae25bc857e1ef75681" integrity sha512-+D4s2HCnxPd5PjjI0STKwncjXTUKKqm74MDMz9OPXavjsGmjkvwgLtA5yoxJUdmpj52+2u+RrXgPipahKczMKg== +node-fetch@^2.6.1: + version "2.6.1" + resolved "https://pkgs.dev.azure.com/terrapin-prod/Terrapin/_packaging/open-source-packages-2/npm/registry/node-fetch/-/node-fetch-2.6.1.tgz#71da3def292fc21adc5670825461ea36c316643c" + integrity sha1-cdo97ykvwhrcVnCCVGHqNsMWZDw= + node-gyp@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-7.1.0.tgz#cb8aed7ab772e73ad592ae0c71b0e3741099fe39" @@ -6836,14 +6965,6 @@ optimist@0.3.5: dependencies: wordwrap "~0.0.2" -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - optionator@^0.8.2, optionator@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -7691,14 +7812,6 @@ pretty-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= -prettyjson@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prettyjson/-/prettyjson-1.2.1.tgz#fcffab41d19cab4dfae5e575e64246619b12d289" - integrity sha1-/P+rQdGcq0365eV15kJGYZsS0ok= - dependencies: - colors "^1.1.2" - minimist "^1.2.0" - process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -9672,6 +9785,11 @@ unique-stream@^2.0.2: json-stable-stringify-without-jsonify "^1.0.1" through2-filter "^3.0.0" +universal-user-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" + integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" From 0293b129e376a683eab7e1cd630e7c0ae6e26e24 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 8 Feb 2021 16:53:30 +0100 Subject: [PATCH 39/91] add name attribute, https://github.com/microsoft/vscode/issues/115746 --- extensions/vscode-api-tests/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/vscode-api-tests/package.json b/extensions/vscode-api-tests/package.json index 6974a720072..228a9681278 100644 --- a/extensions/vscode-api-tests/package.json +++ b/extensions/vscode-api-tests/package.json @@ -42,6 +42,7 @@ "remote": [ { "id": "test.treeId", + "name": "test-tree", "when": "never" } ] From fb8bced55bdd7eb151ad9c3f15fc712d540db1c8 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 Feb 2021 17:16:43 +0100 Subject: [PATCH 40/91] after fix for grammar importer --- extensions/julia/syntaxes/julia.tmLanguage.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/julia/syntaxes/julia.tmLanguage.json b/extensions/julia/syntaxes/julia.tmLanguage.json index d128f347693..c18a377c8b9 100644 --- a/extensions/julia/syntaxes/julia.tmLanguage.json +++ b/extensions/julia/syntaxes/julia.tmLanguage.json @@ -956,7 +956,7 @@ ] }, { - "begin": "(? Date: Mon, 8 Feb 2021 08:28:29 -0800 Subject: [PATCH 41/91] debug: update js-debug --- product.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product.json b/product.json index d5dca3d856a..47bb865de2e 100644 --- a/product.json +++ b/product.json @@ -91,7 +91,7 @@ }, { "name": "ms-vscode.js-debug", - "version": "1.54.0", + "version": "1.54.1", "repo": "https://github.com/microsoft/vscode-js-debug", "metadata": { "id": "25629058-ddac-4e17-abba-74678e126c5d", From 3334b1534c9a83a4894d7108903dbfd8eed6110d Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 8 Feb 2021 18:00:37 +0100 Subject: [PATCH 42/91] #114901 associate scoped context key service to target --- src/vs/base/browser/ui/splitview/paneview.ts | 14 ++-- src/vs/workbench/browser/panecomposite.ts | 34 ++++---- src/vs/workbench/browser/panel.ts | 4 +- .../workbench/browser/parts/views/viewPane.ts | 31 ++----- .../browser/parts/views/viewPaneContainer.ts | 22 +---- .../browser/parts/views/viewsService.ts | 80 ++++++++++++------- src/vs/workbench/browser/viewlet.ts | 13 +-- src/vs/workbench/common/panecomposite.ts | 2 +- src/vs/workbench/test/browser/viewlet.test.ts | 4 +- 9 files changed, 93 insertions(+), 111 deletions(-) diff --git a/src/vs/base/browser/ui/splitview/paneview.ts b/src/vs/base/browser/ui/splitview/paneview.ts index 673094b0c57..15bdc774f69 100644 --- a/src/vs/base/browser/ui/splitview/paneview.ts +++ b/src/vs/base/browser/ui/splitview/paneview.ts @@ -432,7 +432,7 @@ export class PaneView extends Disposable { private dnd: IPaneDndController | undefined; private dndContext: IDndContext = { draggable: null }; - private el: HTMLElement; + readonly element: HTMLElement; private paneItems: IPaneItem[] = []; private orthogonalSize: number = 0; private size: number = 0; @@ -450,8 +450,8 @@ export class PaneView extends Disposable { this.dnd = options.dnd; this.orientation = options.orientation ?? Orientation.VERTICAL; - this.el = append(container, $('.monaco-pane-view')); - this.splitview = this._register(new SplitView(this.el, { orientation: this.orientation })); + this.element = append(container, $('.monaco-pane-view')); + this.splitview = this._register(new SplitView(this.element, { orientation: this.orientation })); this.onDidSashChange = this.splitview.onDidSashChange; } @@ -534,9 +534,9 @@ export class PaneView extends Disposable { const paneSizes = this.paneItems.map(pane => this.getPaneSize(pane.pane)); this.splitview.dispose(); - clearNode(this.el); + clearNode(this.element); - this.splitview = this._register(new SplitView(this.el, { orientation: this.orientation })); + this.splitview = this._register(new SplitView(this.element, { orientation: this.orientation })); const newOrthogonalSize = this.orientation === Orientation.VERTICAL ? width : height; const newSize = this.orientation === Orientation.HORIZONTAL ? width : height; @@ -560,11 +560,11 @@ export class PaneView extends Disposable { window.clearTimeout(this.animationTimer); } - this.el.classList.add('animated'); + this.element.classList.add('animated'); this.animationTimer = window.setTimeout(() => { this.animationTimer = undefined; - this.el.classList.remove('animated'); + this.element.classList.remove('animated'); }, 200); } diff --git a/src/vs/workbench/browser/panecomposite.ts b/src/vs/workbench/browser/panecomposite.ts index d7c33b15c77..700678c478a 100644 --- a/src/vs/workbench/browser/panecomposite.ts +++ b/src/vs/workbench/browser/panecomposite.ts @@ -17,11 +17,12 @@ import { ViewPaneContainer } from './parts/views/viewPaneContainer'; import { IPaneComposite } from 'vs/workbench/common/panecomposite'; import { IAction, IActionViewItem } from 'vs/base/common/actions'; -export class PaneComposite extends Composite implements IPaneComposite { +export abstract class PaneComposite extends Composite implements IPaneComposite { + + private viewPaneContainer?: ViewPaneContainer; constructor( id: string, - protected readonly viewPaneContainer: ViewPaneContainer, @ITelemetryService telemetryService: ITelemetryService, @IStorageService protected storageService: IStorageService, @IInstantiationService protected instantiationService: IInstantiationService, @@ -31,56 +32,57 @@ export class PaneComposite extends Composite implements IPaneComposite { @IWorkspaceContextService protected contextService: IWorkspaceContextService ) { super(id, telemetryService, themeService, storageService); - this._register(this.viewPaneContainer.onTitleAreaUpdate(() => this.updateTitleArea())); } create(parent: HTMLElement): void { + this.viewPaneContainer = this._register(this.createViewPaneContainer(parent)); + this._register(this.viewPaneContainer.onTitleAreaUpdate(() => this.updateTitleArea())); this.viewPaneContainer.create(parent); } setVisible(visible: boolean): void { super.setVisible(visible); - this.viewPaneContainer.setVisible(visible); + this.viewPaneContainer?.setVisible(visible); } layout(dimension: Dimension): void { - this.viewPaneContainer.layout(dimension); + this.viewPaneContainer?.layout(dimension); } getOptimalWidth(): number { - return this.viewPaneContainer.getOptimalWidth(); + return this.viewPaneContainer?.getOptimalWidth() ?? 0; } openView(id: string, focus?: boolean): T | undefined { - return this.viewPaneContainer.openView(id, focus) as T; + return this.viewPaneContainer?.openView(id, focus) as T; } - getViewPaneContainer(): ViewPaneContainer { + getViewPaneContainer(): ViewPaneContainer | undefined { return this.viewPaneContainer; } getActionsContext(): unknown { - return this.getViewPaneContainer().getActionsContext(); + return this.getViewPaneContainer()?.getActionsContext(); } getContextMenuActions(): ReadonlyArray { - return this.viewPaneContainer.getContextMenuActions(); + return this.viewPaneContainer?.getContextMenuActions() ?? []; } getActions(): ReadonlyArray { - return this.viewPaneContainer.getActions(); + return this.viewPaneContainer?.getActions() ?? []; } getSecondaryActions(): ReadonlyArray { - return this.viewPaneContainer.getSecondaryActions(); + return this.viewPaneContainer?.getSecondaryActions() ?? []; } getActionViewItem(action: IAction): IActionViewItem | undefined { - return this.viewPaneContainer.getActionViewItem(action); + return this.viewPaneContainer?.getActionViewItem(action); } getTitle(): string { - return this.viewPaneContainer.getTitle(); + return this.viewPaneContainer?.getTitle() ?? ''; } saveState(): void { @@ -88,6 +90,8 @@ export class PaneComposite extends Composite implements IPaneComposite { } focus(): void { - this.viewPaneContainer.focus(); + this.viewPaneContainer?.focus(); } + + protected abstract createViewPaneContainer(parent: HTMLElement): ViewPaneContainer; } diff --git a/src/vs/workbench/browser/panel.ts b/src/vs/workbench/browser/panel.ts index 0d04a6a1ce0..ab678781a3c 100644 --- a/src/vs/workbench/browser/panel.ts +++ b/src/vs/workbench/browser/panel.ts @@ -17,7 +17,6 @@ import { IStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; export abstract class Panel extends PaneComposite implements IPanel { @@ -25,7 +24,6 @@ export abstract class Panel extends PaneComposite implements IPanel { private readonly panelActions: CompositeMenuActions; constructor(id: string, - viewPaneContainer: ViewPaneContainer, @ITelemetryService telemetryService: ITelemetryService, @IStorageService storageService: IStorageService, @IInstantiationService instantiationService: IInstantiationService, @@ -34,7 +32,7 @@ export abstract class Panel extends PaneComposite implements IPanel { @IExtensionService extensionService: IExtensionService, @IWorkspaceContextService contextService: IWorkspaceContextService, ) { - super(id, viewPaneContainer, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); + super(id, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); this.panelActions = this._register(this.instantiationService.createInstance(CompositeMenuActions, MenuId.PanelTitle, undefined, undefined)); this._register(this.panelActions.onDidChange(() => this.updateTitleArea())); } diff --git a/src/vs/workbench/browser/parts/views/viewPane.ts b/src/vs/workbench/browser/parts/views/viewPane.ts index 27f5af3cfb0..9b6dff584e1 100644 --- a/src/vs/workbench/browser/parts/views/viewPane.ts +++ b/src/vs/workbench/browser/parts/views/viewPane.ts @@ -21,11 +21,11 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService, ThemeIcon } from 'vs/platform/theme/common/themeService'; import { IPaneOptions, Pane, IPaneStyles } from 'vs/base/browser/ui/splitview/paneview'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { Extensions as ViewContainerExtensions, IView, FocusedViewContext, IViewDescriptorService, ViewContainerLocation, IViewsRegistry, IViewContentDescriptor, defaultViewIcon, IViewsService, ViewContainerLocationToString } from 'vs/workbench/common/views'; +import { Extensions as ViewContainerExtensions, IView, FocusedViewContext, IViewDescriptorService, ViewContainerLocation, IViewsRegistry, IViewContentDescriptor, defaultViewIcon, IViewsService } from 'vs/workbench/common/views'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { assertIsDefined } from 'vs/base/common/types'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; -import { MenuId, Action2, IAction2Options, IMenuService } from 'vs/platform/actions/common/actions'; +import { MenuId, Action2, IAction2Options } from 'vs/platform/actions/common/actions'; import { createActionViewItem } from 'vs/platform/actions/browser/menuEntryActionViewItem'; import { parseLinkedText } from 'vs/base/common/linkedText'; import { IOpenerService } from 'vs/platform/opener/common/opener'; @@ -41,6 +41,7 @@ import { URI } from 'vs/base/common/uri'; import { registerIcon } from 'vs/platform/theme/common/iconRegistry'; import { Codicon } from 'vs/base/common/codicons'; import { CompositeMenuActions } from 'vs/workbench/browser/menuActions'; +import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; export interface IViewPaneOptions extends IPaneOptions { id: string; @@ -140,25 +141,6 @@ class ViewWelcomeController { } } -class ViewMenuActions extends CompositeMenuActions { - constructor( - viewId: string, - menuId: MenuId, - contextMenuId: MenuId, - @IContextKeyService contextKeyService: IContextKeyService, - @IMenuService menuService: IMenuService, - @IViewDescriptorService viewDescriptorService: IViewDescriptorService, - ) { - const scopedContextKeyService = contextKeyService.createScoped(); - scopedContextKeyService.createKey('view', viewId); - const viewLocationKey = scopedContextKeyService.createKey('viewLocation', ViewContainerLocationToString(viewDescriptorService.getViewLocationById(viewId)!)); - super(menuId, contextMenuId, { shouldForwardArgs: true }, scopedContextKeyService, menuService); - this._register(scopedContextKeyService); - this._register(Event.filter(viewDescriptorService.onDidChangeLocation, e => e.views.some(view => view.id === viewId))(() => viewLocationKey.set(ViewContainerLocationToString(viewDescriptorService.getViewLocationById(viewId)!)))); - } - -} - export abstract class ViewPane extends Pane implements IView { private static readonly AlwaysShowActionsConfig = 'workbench.view.alwaysShowHeaderActions'; @@ -193,7 +175,7 @@ export abstract class ViewPane extends Pane implements IView { return this._titleDescription; } - private readonly menuActions: ViewMenuActions; + private readonly menuActions: CompositeMenuActions; private progressBar!: ProgressBar; private progressIndicator!: IProgressIndicator; @@ -230,7 +212,10 @@ export abstract class ViewPane extends Pane implements IView { this.showActionsAlways = !!options.showActionsAlways; this.focusedViewContextKey = FocusedViewContext.bindTo(contextKeyService); - this.menuActions = this._register(instantiationService.createInstance(ViewMenuActions, this.id, options.titleMenuId || MenuId.ViewTitle, MenuId.ViewTitleContext)); + const scopedContextKeyService = this._register(contextKeyService.createScoped(this.element)); + scopedContextKeyService.createKey('view', this.id); + const scopedInstantiationService = instantiationService.createChild(new ServiceCollection([IContextKeyService, scopedContextKeyService])); + this.menuActions = this._register(scopedInstantiationService.createInstance(CompositeMenuActions, options.titleMenuId || MenuId.ViewTitle, MenuId.ViewTitleContext, { shouldForwardArgs: true })); this._register(this.menuActions.onDidChange(() => this.updateActions())); this.viewWelcomeController = new ViewWelcomeController(this.id, contextKeyService); diff --git a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts index d85abe6e979..d24ecdf1eb7 100644 --- a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts +++ b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts @@ -28,7 +28,7 @@ import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewl import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { Component } from 'vs/workbench/common/component'; -import { registerAction2, Action2, IAction2Options, IMenuService, MenuId, MenuRegistry, ISubmenuItem, SubmenuItemAction } from 'vs/platform/actions/common/actions'; +import { registerAction2, Action2, IAction2Options, MenuId, MenuRegistry, ISubmenuItem, SubmenuItemAction } from 'vs/platform/actions/common/actions'; import { CompositeDragAndDropObserver, DragAndDropObserver, toggleDropEffect } from 'vs/workbench/browser/dnd'; import { Orientation } from 'vs/base/browser/ui/sash/sash'; import { RunOnceScheduler } from 'vs/base/common/async'; @@ -293,22 +293,6 @@ class ViewPaneDropOverlay extends Themable { } } -class ViewContainerMenuActions extends CompositeMenuActions { - constructor( - viewContainer: ViewContainer, - @IViewDescriptorService viewDescriptorService: IViewDescriptorService, - @IContextKeyService contextKeyService: IContextKeyService, - @IMenuService menuService: IMenuService, - ) { - const scopedContextKeyService = contextKeyService.createScoped(); - scopedContextKeyService.createKey('viewContainer', viewContainer.id); - const viewContainerLocationKey = scopedContextKeyService.createKey('viewContainerLocation', ViewContainerLocationToString(viewDescriptorService.getViewContainerLocation(viewContainer)!)); - super(MenuId.ViewContainerTitle, MenuId.ViewContainerTitleContext, { shouldForwardArgs: true }, scopedContextKeyService, menuService); - this._register(scopedContextKeyService); - this._register(Event.filter(viewDescriptorService.onDidChangeContainerLocation, e => e.viewContainer === viewContainer)(() => viewContainerLocationKey.set(ViewContainerLocationToString(viewDescriptorService.getViewContainerLocation(viewContainer)!)))); - } -} - export class ViewPaneContainer extends Component implements IViewPaneContainer { readonly viewContainer: ViewContainer; @@ -359,7 +343,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { return this.paneItems.length; } - private readonly menuActions: ViewContainerMenuActions; + private readonly menuActions: CompositeMenuActions; constructor( id: string, @@ -390,7 +374,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { this._register(toDisposable(() => this.viewDisposables = dispose(this.viewDisposables))); this.viewContainerModel = this.viewDescriptorService.getViewContainerModel(container); - this.menuActions = this._register(instantiationService.createInstance(ViewContainerMenuActions, container)); + this.menuActions = this._register(this.instantiationService.createInstance(CompositeMenuActions, MenuId.ViewContainerTitle, MenuId.ViewContainerTitleContext, { shouldForwardArgs: true })); this._register(this.menuActions.onDidChange(() => this.updateTitleArea())); } diff --git a/src/vs/workbench/browser/parts/views/viewsService.ts b/src/vs/workbench/browser/parts/views/viewsService.ts index a76607f2e8e..88ee4b8d2cc 100644 --- a/src/vs/workbench/browser/parts/views/viewsService.ts +++ b/src/vs/workbench/browser/parts/views/viewsService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Disposable, IDisposable, toDisposable, DisposableStore } from 'vs/base/common/lifecycle'; -import { IViewDescriptorService, ViewContainer, IViewDescriptor, IView, ViewContainerLocation, IViewsService, IViewPaneContainer, getVisbileViewContextKey, getEnabledViewContainerContextKey, FocusedViewContext } from 'vs/workbench/common/views'; +import { IViewDescriptorService, ViewContainer, IViewDescriptor, IView, ViewContainerLocation, IViewsService, IViewPaneContainer, getVisbileViewContextKey, getEnabledViewContainerContextKey, FocusedViewContext, ViewContainerLocationToString } from 'vs/workbench/common/views'; import { Registry } from 'vs/platform/registry/common/platform'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; @@ -32,13 +32,15 @@ import { URI } from 'vs/base/common/uri'; import { IProgressIndicator } from 'vs/platform/progress/common/progress'; import { CATEGORIES } from 'vs/workbench/common/actions'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; +import { FilterViewPaneContainer } from 'vs/workbench/browser/parts/views/viewsViewlet'; +import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; export class ViewsService extends Disposable implements IViewsService { declare readonly _serviceBrand: undefined; private readonly viewDisposable: Map; - private readonly viewPaneContainers: Map; + private readonly viewPaneContainers: Map; private readonly _onDidChangeViewVisibility: Emitter<{ id: string, visible: boolean }> = this._register(new Emitter<{ id: string, visible: boolean }>()); readonly onDidChangeViewVisibility: Event<{ id: string, visible: boolean }> = this._onDidChangeViewVisibility.event; @@ -59,7 +61,7 @@ export class ViewsService extends Disposable implements IViewsService { this.viewDisposable = new Map(); this.visibleViewContextKeys = new Map>(); - this.viewPaneContainers = new Map(); + this.viewPaneContainers = new Map(); this._register(toDisposable(() => { this.viewDisposable.forEach(disposable => disposable.dispose()); @@ -78,24 +80,6 @@ export class ViewsService extends Disposable implements IViewsService { } - private registerViewPaneContainer(viewPaneContainer: ViewPaneContainer): void { - const disposable = new DisposableStore(); - disposable.add(viewPaneContainer); - disposable.add(viewPaneContainer.onDidAddViews(views => this.onViewsAdded(views))); - disposable.add(viewPaneContainer.onDidChangeViewVisibility(view => this.onViewsVisibilityChanged(view, view.isBodyVisible()))); - disposable.add(viewPaneContainer.onDidRemoveViews(views => this.onViewsRemoved(views))); - - this.viewPaneContainers.set(viewPaneContainer.getId(), { viewPaneContainer, disposable }); - } - - private deregisterViewPaneContainer(id: string): void { - const viewPaneContainerItem = this.viewPaneContainers.get(id); - if (viewPaneContainerItem) { - viewPaneContainerItem.disposable.dispose(); - this.viewPaneContainers.delete(id); - } - } - private onViewsAdded(added: IView[]): void { for (const view of added) { this.onViewsVisibilityChanged(view, view.isBodyVisible()); @@ -340,7 +324,7 @@ export class ViewsService extends Disposable implements IViewsService { return undefined; } - const viewPaneContainer = this.viewPaneContainers.get(viewContainer.id)?.viewPaneContainer; + const viewPaneContainer = this.viewPaneContainers.get(viewContainer.id); if (!viewPaneContainer) { return undefined; } @@ -583,6 +567,24 @@ export class ViewsService extends Disposable implements IViewsService { } } + private createViewPaneContainer(element: HTMLElement, viewContainer: ViewContainer, viewContainerLocation: ViewContainerLocation, disposables: DisposableStore, contextKeyService: IContextKeyService, instantiationService: IInstantiationService): ViewPaneContainer { + const scopedContextKeyService = this._register(contextKeyService.createScoped(element)); + scopedContextKeyService.createKey('viewContainer', viewContainer.id); + scopedContextKeyService.createKey('viewContainerLocation', ViewContainerLocationToString(viewContainerLocation)); + scopedContextKeyService.createKey('viewLocation', ViewContainerLocationToString(viewContainerLocation)); + + const scopedInstantiationService = instantiationService.createChild(new ServiceCollection([IContextKeyService, scopedContextKeyService])); + const viewPaneContainer: ViewPaneContainer = (scopedInstantiationService as any).createInstance(viewContainer.ctorDescriptor!.ctor, ...(viewContainer.ctorDescriptor!.staticArguments || [])); + + this.viewPaneContainers.set(viewPaneContainer.getId(), viewPaneContainer); + disposables.add(toDisposable(() => this.viewPaneContainers.delete(viewPaneContainer.getId()))); + disposables.add(viewPaneContainer.onDidAddViews(views => this.onViewsAdded(views))); + disposables.add(viewPaneContainer.onDidChangeViewVisibility(view => this.onViewsVisibilityChanged(view, view.isBodyVisible()))); + disposables.add(viewPaneContainer.onDidRemoveViews(views => this.onViewsRemoved(views))); + + return viewPaneContainer; + } + private registerPanel(viewContainer: ViewContainer): void { const that = this; class PaneContainerPanel extends Panel { @@ -594,11 +596,16 @@ export class ViewsService extends Disposable implements IViewsService { @IContextMenuService contextMenuService: IContextMenuService, @IExtensionService extensionService: IExtensionService, @IWorkspaceContextService contextService: IWorkspaceContextService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, ) { + super(viewContainer.id, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); + } + + protected createViewPaneContainer(element: HTMLElement): ViewPaneContainer { + const viewPaneContainerDisposables = this._register(new DisposableStore()); + // Use composite's instantiation service to get the editor progress service for any editors instantiated within the composite - const viewPaneContainer = (instantiationService as any).createInstance(viewContainer.ctorDescriptor!.ctor, ...(viewContainer.ctorDescriptor!.staticArguments || [])); - super(viewContainer.id, viewPaneContainer, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); - that.registerViewPaneContainer(this.viewPaneContainer); + return that.createViewPaneContainer(element, viewContainer, ViewContainerLocation.Panel, viewPaneContainerDisposables, this.contextKeyService, this.instantiationService); } } Registry.as(PanelExtensions.Panels).registerPanel(PanelDescriptor.create( @@ -612,7 +619,6 @@ export class ViewsService extends Disposable implements IViewsService { } private deregisterPanel(viewContainer: ViewContainer): void { - this.deregisterViewPaneContainer(viewContainer.id); Registry.as(PanelExtensions.Panels).deregisterPanel(viewContainer.id); } @@ -629,11 +635,26 @@ export class ViewsService extends Disposable implements IViewsService { @IThemeService themeService: IThemeService, @IContextMenuService contextMenuService: IContextMenuService, @IExtensionService extensionService: IExtensionService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, ) { + super(viewContainer.id, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService, layoutService, configurationService); + } + + protected createViewPaneContainer(element: HTMLElement): ViewPaneContainer { + const viewPaneContainerDisposables = this._register(new DisposableStore()); + // Use composite's instantiation service to get the editor progress service for any editors instantiated within the composite - const viewPaneContainer = (instantiationService as any).createInstance(viewContainer.ctorDescriptor!.ctor, ...(viewContainer.ctorDescriptor!.staticArguments || [])); - super(viewContainer.id, viewPaneContainer, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService, layoutService, configurationService); - that.registerViewPaneContainer(this.viewPaneContainer); + const viewPaneContainer = that.createViewPaneContainer(element, viewContainer, ViewContainerLocation.Sidebar, viewPaneContainerDisposables, this.contextKeyService, this.instantiationService); + + // Only updateTitleArea for non-filter views: microsoft/vscode-remote-release#3676 + if (!(viewPaneContainer instanceof FilterViewPaneContainer)) { + viewPaneContainerDisposables.add(Event.any(viewPaneContainer.onDidAddViews, viewPaneContainer.onDidRemoveViews, viewPaneContainer.onTitleAreaUpdate)(() => { + // Update title area since there is no better way to update secondary actions + this.updateTitleArea(); + })); + } + + return viewPaneContainer; } } Registry.as(ViewletExtensions.Viewlets).registerViewlet(ViewletDescriptor.create( @@ -648,7 +669,6 @@ export class ViewsService extends Disposable implements IViewsService { } private deregisterViewlet(viewContainer: ViewContainer): void { - this.deregisterViewPaneContainer(viewContainer.id); Registry.as(ViewletExtensions.Viewlets).deregisterViewlet(viewContainer.id); } } diff --git a/src/vs/workbench/browser/viewlet.ts b/src/vs/workbench/browser/viewlet.ts index c869428ab68..4d1fe97779c 100644 --- a/src/vs/workbench/browser/viewlet.ts +++ b/src/vs/workbench/browser/viewlet.ts @@ -12,19 +12,15 @@ import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/la import { IThemeService } from 'vs/platform/theme/common/themeService'; import { URI } from 'vs/base/common/uri'; import { IStorageService } from 'vs/platform/storage/common/storage'; -import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { PaneComposite } from 'vs/workbench/browser/panecomposite'; -import { Event } from 'vs/base/common/event'; -import { FilterViewPaneContainer } from 'vs/workbench/browser/parts/views/viewsViewlet'; export abstract class Viewlet extends PaneComposite implements IViewlet { constructor(id: string, - viewPaneContainer: ViewPaneContainer, @ITelemetryService telemetryService: ITelemetryService, @IStorageService protected storageService: IStorageService, @IInstantiationService protected instantiationService: IInstantiationService, @@ -35,14 +31,7 @@ export abstract class Viewlet extends PaneComposite implements IViewlet { @IWorkbenchLayoutService protected layoutService: IWorkbenchLayoutService, @IConfigurationService protected configurationService: IConfigurationService ) { - super(id, viewPaneContainer, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); - // Only updateTitleArea for non-filter views: microsoft/vscode-remote-release#3676 - if (!(viewPaneContainer instanceof FilterViewPaneContainer)) { - this._register(Event.any(viewPaneContainer.onDidAddViews, viewPaneContainer.onDidRemoveViews, viewPaneContainer.onTitleAreaUpdate)(() => { - // Update title area since there is no better way to update secondary actions - this.updateTitleArea(); - })); - } + super(id, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); } } diff --git a/src/vs/workbench/common/panecomposite.ts b/src/vs/workbench/common/panecomposite.ts index 89ba7027305..653c2e581e3 100644 --- a/src/vs/workbench/common/panecomposite.ts +++ b/src/vs/workbench/common/panecomposite.ts @@ -8,6 +8,6 @@ import { IComposite } from 'vs/workbench/common/composite'; export interface IPaneComposite extends IComposite { openView(id: string, focus?: boolean): T | undefined; - getViewPaneContainer(): IViewPaneContainer; + getViewPaneContainer(): IViewPaneContainer | undefined; saveState(): void; } diff --git a/src/vs/workbench/test/browser/viewlet.test.ts b/src/vs/workbench/test/browser/viewlet.test.ts index e76dbaa83c4..d3b57ab52e9 100644 --- a/src/vs/workbench/test/browser/viewlet.test.ts +++ b/src/vs/workbench/test/browser/viewlet.test.ts @@ -13,12 +13,14 @@ suite('Viewlets', () => { class TestViewlet extends Viewlet { constructor() { - super('id', null!, null!, null!, null!, null!, null!, null!, null!, null!, null!); + super('id', null!, null!, null!, null!, null!, null!, null!, null!, null!); } layout(dimension: any): void { throw new Error('Method not implemented.'); } + + createViewPaneContainer() { return null!; } } test('ViewletDescriptor API', function () { From 5cfa6b7e263f01d48be0f0605deec629f0853682 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 Feb 2021 18:26:09 +0100 Subject: [PATCH 43/91] update vscode-grammar-updater --- extensions/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/package.json b/extensions/package.json index 5222855bf93..69f8501b208 100644 --- a/extensions/package.json +++ b/extensions/package.json @@ -10,6 +10,6 @@ "postinstall": "node ./postinstall" }, "devDependencies": { - "vscode-grammar-updater": "^1.0.2" + "vscode-grammar-updater": "^1.0.3" } } From e146dd28e120fe389370896af22b2b24bb7bbaa2 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Mon, 8 Feb 2021 19:50:01 +0100 Subject: [PATCH 44/91] Extension management - refactoring workspace trust signal (#116118) --- .../browser/extensionsWorkbenchService.ts | 67 ++++++------------- .../common/extensionManagementService.ts | 27 +++++++- .../extensionManagementService.ts | 12 +++- 3 files changed, 56 insertions(+), 50 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index 6c093794e37..7097869562e 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -41,7 +41,6 @@ import { FileAccess } from 'vs/base/common/network'; import { IIgnoredExtensionsManagementService } from 'vs/platform/userDataSync/common/ignoredExtensions'; import { IUserDataAutoSyncService } from 'vs/platform/userDataSync/common/userDataSync'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { IWorkspaceTrustService, WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust'; interface IExtensionStateProvider { (extension: Extension): T; @@ -525,8 +524,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension @IIgnoredExtensionsManagementService private readonly extensionsSyncManagementService: IIgnoredExtensionsManagementService, @IUserDataAutoSyncService private readonly userDataAutoSyncService: IUserDataAutoSyncService, @IProductService private readonly productService: IProductService, - @IContextKeyService contextKeyService: IContextKeyService, - @IWorkspaceTrustService private readonly workspaceTrustService: IWorkspaceTrustService + @IContextKeyService contextKeyService: IContextKeyService ) { super(); this.hasOutdatedExtensionsContextKey = HasOutdatedExtensionsContext.bindTo(contextKeyService); @@ -1033,54 +1031,33 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension private async installFromVSIX(vsix: URI): Promise { const manifest = await this.extensionManagementService.getManifest(vsix); - return this.promptForTrustIfNeededAndInstall(manifest, async () => { - const existingExtension = this.local.find(local => areSameExtensions(local.identifier, { id: getGalleryExtensionId(manifest.publisher, manifest.name) })); - const { identifier } = await this.extensionManagementService.install(vsix); + const existingExtension = this.local.find(local => areSameExtensions(local.identifier, { id: getGalleryExtensionId(manifest.publisher, manifest.name) })); + const { identifier } = await this.extensionManagementService.install(vsix); - if (existingExtension && existingExtension.latestVersion !== manifest.version) { - this.ignoreAutoUpdate(new ExtensionIdentifierWithVersion(identifier, manifest.version)); - } + if (existingExtension && existingExtension.latestVersion !== manifest.version) { + this.ignoreAutoUpdate(new ExtensionIdentifierWithVersion(identifier, manifest.version)); + } - return this.local.filter(local => areSameExtensions(local.identifier, identifier))[0]; - }); + return this.local.filter(local => areSameExtensions(local.identifier, identifier))[0]; } private async installFromGallery(extension: IExtension, gallery: IGalleryExtension, installOptions?: InstallOptions): Promise { - const manifest = await extension.getManifest(CancellationToken.None); - - if (manifest) { - this.promptForTrustIfNeededAndInstall(manifest, async () => { - this.installing.push(extension); - this._onChange.fire(extension); - try { - if (extension.state === ExtensionState.Installed && extension.local) { - await this.extensionManagementService.updateFromGallery(gallery, extension.local); - } else { - await this.extensionManagementService.installFromGallery(gallery, installOptions); - } - const ids: string[] | undefined = extension.identifier.uuid ? [extension.identifier.uuid] : undefined; - const names: string[] | undefined = extension.identifier.uuid ? undefined : [extension.identifier.id]; - this.queryGallery({ names, ids, pageSize: 1 }, CancellationToken.None); - return this.local.filter(local => areSameExtensions(local.identifier, gallery.identifier))[0]; - } finally { - this.installing = this.installing.filter(e => e !== extension); - this._onChange.fire(this.local.filter(e => areSameExtensions(e.identifier, extension.identifier))[0]); - } - }); + this.installing.push(extension); + this._onChange.fire(extension); + try { + if (extension.state === ExtensionState.Installed && extension.local) { + await this.extensionManagementService.updateFromGallery(gallery, extension.local); + } else { + await this.extensionManagementService.installFromGallery(gallery, installOptions); + } + const ids: string[] | undefined = extension.identifier.uuid ? [extension.identifier.uuid] : undefined; + const names: string[] | undefined = extension.identifier.uuid ? undefined : [extension.identifier.id]; + this.queryGallery({ names, ids, pageSize: 1 }, CancellationToken.None); + return this.local.filter(local => areSameExtensions(local.identifier, gallery.identifier))[0]; + } finally { + this.installing = this.installing.filter(e => e !== extension); + this._onChange.fire(this.local.filter(e => areSameExtensions(e.identifier, extension.identifier))[0]); } - return Promise.reject(); - } - - private async promptForTrustIfNeededAndInstall(manifest: IExtensionManifest, installTask: () => Promise): Promise { - if (manifest.requiresWorkspaceTrust === 'onStart') { - const trustState = await this.workspaceTrustService.requireWorkspaceTrust( - { - immediate: true, - message: 'Installing this extension requires you to trust the contents of this workspace.' - }); - return trustState === WorkspaceTrustState.Trusted ? installTask() : Promise.reject(); - } - return installTask(); } private promptAndSetEnablement(extensions: IExtension[], enablementState: EnablementState): Promise { diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts index d53559be436..93d35892e9f 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts @@ -25,6 +25,7 @@ import Severity from 'vs/base/common/severity'; import { canceled } from 'vs/base/common/errors'; import { IUserDataAutoSyncEnablementService, IUserDataSyncResourceEnablementService, SyncResource } from 'vs/platform/userDataSync/common/userDataSync'; import { Promises } from 'vs/base/common/async'; +import { IWorkspaceTrustService, WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust'; export class ExtensionManagementService extends Disposable implements IWorkbenchExtensioManagementService { @@ -46,6 +47,7 @@ export class ExtensionManagementService extends Disposable implements IWorkbench @IUserDataAutoSyncEnablementService private readonly userDataAutoSyncEnablementService: IUserDataAutoSyncEnablementService, @IUserDataSyncResourceEnablementService private readonly userDataSyncResourceEnablementService: IUserDataSyncResourceEnablementService, @IDialogService private readonly dialogService: IDialogService, + @IWorkspaceTrustService private readonly workspaceTrustService: IWorkspaceTrustService ) { super(); if (this.extensionManagementServerService.localExtensionManagementServer) { @@ -128,9 +130,10 @@ export class ExtensionManagementService extends Disposable implements IWorkbench } - reinstallFromGallery(extension: ILocalExtension): Promise { + async reinstallFromGallery(extension: ILocalExtension): Promise { const server = this.getServer(extension); if (server) { + await this.checkForWorkspaceTrust(extension.manifest); return server.extensionManagementService.reinstallFromGallery(extension); } return Promise.reject(`Invalid location ${extension.location.toString()}`); @@ -191,8 +194,13 @@ export class ExtensionManagementService extends Disposable implements IWorkbench return Promise.reject('No Servers to Install'); } - protected installVSIX(vsix: URI, server: IExtensionManagementServer): Promise { - return server.extensionManagementService.install(vsix); + protected async installVSIX(vsix: URI, server: IExtensionManagementServer): Promise { + const manifest = await this.getManifest(vsix); + if (manifest) { + await this.checkForWorkspaceTrust(manifest); + return server.extensionManagementService.install(vsix); + } + return Promise.reject('Unable to get the extension manifest.'); } getManifest(vsix: URI): Promise { @@ -269,6 +277,7 @@ export class ExtensionManagementService extends Disposable implements IWorkbench servers.push(this.extensionManagementServerService.localExtensionManagementServer); } } + await this.checkForWorkspaceTrust(manifest); return Promises.settled(servers.map(server => server.extensionManagementService.installFromGallery(gallery, installOptions))).then(([local]) => local); } @@ -346,4 +355,16 @@ export class ExtensionManagementService extends Disposable implements IWorkbench private getServer(extension: ILocalExtension): IExtensionManagementServer | null { return this.extensionManagementServerService.getExtensionManagementServer(extension); } + + protected async checkForWorkspaceTrust(manifest: IExtensionManifest): Promise { + if (manifest.requiresWorkspaceTrust === 'onStart') { + const trustState = await this.workspaceTrustService.requireWorkspaceTrust( + { + immediate: true, + message: 'Installing this extension requires you to trust the contents of this workspace.' + }); + return trustState === WorkspaceTrustState.Trusted ? Promise.resolve() : Promise.reject(canceled()); + } + return Promise.resolve(); + } } diff --git a/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService.ts b/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService.ts index e8a05aff21b..fc5103a1ad6 100644 --- a/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService.ts +++ b/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService.ts @@ -17,6 +17,7 @@ import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/enviro import { joinPath } from 'vs/base/common/resources'; import { IUserDataAutoSyncEnablementService, IUserDataSyncResourceEnablementService } from 'vs/platform/userDataSync/common/userDataSync'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; +import { IWorkspaceTrustService } from 'vs/platform/workspace/common/workspaceTrust'; export class ExtensionManagementService extends BaseExtensionManagementService { @@ -30,8 +31,9 @@ export class ExtensionManagementService extends BaseExtensionManagementService { @IUserDataAutoSyncEnablementService userDataAutoSyncEnablementService: IUserDataAutoSyncEnablementService, @IUserDataSyncResourceEnablementService userDataSyncResourceEnablementService: IUserDataSyncResourceEnablementService, @IDialogService dialogService: IDialogService, + @IWorkspaceTrustService workspaceTrustService: IWorkspaceTrustService ) { - super(extensionManagementServerService, extensionGalleryService, configurationService, productService, downloadService, userDataAutoSyncEnablementService, userDataSyncResourceEnablementService, dialogService); + super(extensionManagementServerService, extensionGalleryService, configurationService, productService, downloadService, userDataAutoSyncEnablementService, userDataSyncResourceEnablementService, dialogService, workspaceTrustService); } protected async installVSIX(vsix: URI, server: IExtensionManagementServer): Promise { @@ -40,7 +42,13 @@ export class ExtensionManagementService extends BaseExtensionManagementService { await this.downloadService.download(vsix, downloadedLocation); vsix = downloadedLocation; } - return server.extensionManagementService.install(vsix); + const manifest = await this.getManifest(vsix); + if (manifest) { + await this.checkForWorkspaceTrust(manifest); + return server.extensionManagementService.install(vsix); + } + + return Promise.reject('Unable to get the extension manifest.'); } } From 280cbff391c653ed9e8994be61ff1de5130f1b12 Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Mon, 8 Feb 2021 12:20:46 -0800 Subject: [PATCH 45/91] fix home menu items not appearing --- .../browser/parts/titlebar/menubarControl.ts | 59 +++++++++++-------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts index 886c2ff68ba..f3587a51a51 100644 --- a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts +++ b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as nls from 'vs/nls'; -import { IMenuService, MenuId, IMenu, SubmenuItemAction, registerAction2, Action2, MenuRegistry, MenuItemAction } from 'vs/platform/actions/common/actions'; +import { IMenuService, MenuId, IMenu, SubmenuItemAction, registerAction2, Action2, MenuItemAction } from 'vs/platform/actions/common/actions'; import { registerThemingParticipant, IThemeService } from 'vs/platform/theme/common/themeService'; import { MenuBarVisibility, getTitleBarStyle, IWindowOpenable, getMenuBarVisibility } from 'vs/platform/windows/common/windows'; -import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IAction, Action, SubmenuAction, Separator } from 'vs/base/common/actions'; import * as DOM from 'vs/base/browser/dom'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; @@ -291,6 +291,7 @@ export class CustomMenubarControl extends MenubarControl { private alwaysOnMnemonics: boolean = false; private focusInsideMenubar: boolean = false; private visible: boolean = true; + private readonly webNavigationMenu = this._register(this.menuService.createMenu(MenuId.MenubarHomeMenu, this.contextKeyService)); private readonly _onVisibilityChange: Emitter; private readonly _onFocusStateChange: Emitter; @@ -326,16 +327,6 @@ export class CustomMenubarControl extends MenubarControl { this.registerActions(); - // Register web menu actions to the file menu when its in the title - this.getWebNavigationMenuItemActions().forEach(actionItem => { - this._register(MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, { - command: actionItem.item, - title: actionItem.item.title, - group: 'z_Web', - when: ContextKeyExpr.and(IsWebContext, ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'compact')) - })); - }); - registerThemingParticipant((theme, collector) => { const menubarActiveWindowFgColor = theme.getColor(TITLE_BAR_ACTIVE_FOREGROUND); if (menubarActiveWindowFgColor) { @@ -640,6 +631,15 @@ export class CustomMenubarControl extends MenubarControl { target.push(new Separator()); } + // Append web navigation menu items to the file menu when not compact + if (menu === this.menus.File && this.currentCompactMenuMode === undefined) { + const webActions = this.getWebNavigationActions(); + if (webActions.length) { + target.push(...webActions); + target.push(new Separator()); // to account for pop below + } + } + target.pop(); }; @@ -655,6 +655,19 @@ export class CustomMenubarControl extends MenubarControl { } } })); + + // For the file menu, we need to update if the web nav menu updates as well + if (menu === this.menus.File) { + this._register(this.webNavigationMenu.onDidChange(() => { + if (!this.focusInsideMenubar) { + const actions: IAction[] = []; + updateActions(menu, actions, title); + if (this.menubar) { + this.menubar.updateMenu({ actions: actions, label: mnemonicMenuLabel(this.topLevelTitles[title]) }); + } + } + })); + } } const actions: IAction[] = []; @@ -672,24 +685,24 @@ export class CustomMenubarControl extends MenubarControl { } } - private getWebNavigationMenuItemActions(): MenuItemAction[] { + private getWebNavigationActions(): IAction[] { if (!isWeb) { return []; // only for web } const webNavigationActions = []; - const webNavigationMenu = this.menuService.createMenu(MenuId.MenubarHomeMenu, this.contextKeyService); - for (const groups of webNavigationMenu.getActions()) { + for (const groups of this.webNavigationMenu.getActions()) { const [, actions] = groups; for (const action of actions) { if (action instanceof MenuItemAction) { - webNavigationActions.push(action); + const title = typeof action.item.title === 'string' + ? action.item.title + : action.item.title.mnemonicTitle ?? action.item.title.value; + webNavigationActions.push(new Action(action.id, mnemonicMenuLabel(title), action.class, action.enabled, () => this.commandService.executeCommand(action.id))); } } } - webNavigationMenu.dispose(); - return webNavigationActions; } @@ -719,14 +732,7 @@ export class CustomMenubarControl extends MenubarControl { })); } - const otherActions = this.getWebNavigationMenuItemActions().map(action => { - const title = typeof action.item.title === 'string' - ? action.item.title - : action.item.title.mnemonicTitle ?? action.item.title.value; - return new Action(action.id, mnemonicMenuLabel(title), action.class, action.enabled, () => this.commandService.executeCommand(action.id)); - }); - - webNavigationActions.push(...otherActions); + webNavigationActions.push(...this.getWebNavigationActions()); return webNavigationActions; } }; @@ -787,6 +793,7 @@ export class CustomMenubarControl extends MenubarControl { // Mnemonics require fullscreen in web if (isWeb) { this._register(this.layoutService.onFullscreenChange(e => this.updateMenubar())); + this._register(this.webNavigationMenu.onDidChange(() => this.updateMenubar())); } } From c7d527f9cecf0a14edc8ef7bd572e1d65c294e07 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Mon, 8 Feb 2021 12:24:20 -0800 Subject: [PATCH 46/91] update yarn.lock --- extensions/yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/yarn.lock b/extensions/yarn.lock index efb462f3c33..3274642a159 100644 --- a/extensions/yarn.lock +++ b/extensions/yarn.lock @@ -24,10 +24,10 @@ typescript@^4.2.0-dev.20210201: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.0-dev.20210201.tgz#3d8ae7214cd4b23d3ae400f84d1afe5679f3e2f0" integrity sha512-By8G30ZYs+b/8084cSnjP7ILd8ExUBC4Qi9FY2iRlBApHu/A08ExLlCRnYkHN1PgxcNs4rTaozJsgXHJ6cg92g== -vscode-grammar-updater@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/vscode-grammar-updater/-/vscode-grammar-updater-1.0.2.tgz#ad4eba5f69c02ec8bf8143517d736a587e059657" - integrity sha512-gzJ9QQhtcYznm7WaY473hU/wWq7mWhEJJdcJPLZNwL3v0+FlWwXU/oIe7Z/k/DFR8g5dFOhqgQAiX22cneG5VA== +vscode-grammar-updater@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/vscode-grammar-updater/-/vscode-grammar-updater-1.0.3.tgz#695ccaf0567c6a000005a969cd87ecc3b5c25018" + integrity sha512-V/OnMGyAk7Ldv5NC2p+NovidsAghdfbFFnimEzQ7F/TYIqDLJCVe28RcvaU2gywCSCtxNfS5MYe0egiaRIWNEw== dependencies: cson-parser "^1.3.3" fast-plist "0.1.2" From 15616c186929f1095992d49dcc7a753428c4ff61 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 8 Feb 2021 22:13:59 +0100 Subject: [PATCH 47/91] focused view context key should be set at global context --- .../workbench/browser/parts/views/viewPane.ts | 20 ++++--------------- .../browser/parts/views/viewPaneContainer.ts | 14 +++++++++++-- .../browser/parts/views/viewsService.ts | 8 ++++++++ 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/vs/workbench/browser/parts/views/viewPane.ts b/src/vs/workbench/browser/parts/views/viewPane.ts index 9b6dff584e1..04545f944c4 100644 --- a/src/vs/workbench/browser/parts/views/viewPane.ts +++ b/src/vs/workbench/browser/parts/views/viewPane.ts @@ -21,8 +21,8 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService, ThemeIcon } from 'vs/platform/theme/common/themeService'; import { IPaneOptions, Pane, IPaneStyles } from 'vs/base/browser/ui/splitview/paneview'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { Extensions as ViewContainerExtensions, IView, FocusedViewContext, IViewDescriptorService, ViewContainerLocation, IViewsRegistry, IViewContentDescriptor, defaultViewIcon, IViewsService } from 'vs/workbench/common/views'; -import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { Extensions as ViewContainerExtensions, IView, IViewDescriptorService, ViewContainerLocation, IViewsRegistry, IViewContentDescriptor, defaultViewIcon, IViewsService } from 'vs/workbench/common/views'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { assertIsDefined } from 'vs/base/common/types'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { MenuId, Action2, IAction2Options } from 'vs/platform/actions/common/actions'; @@ -160,8 +160,6 @@ export abstract class ViewPane extends Pane implements IView { protected _onDidChangeViewWelcomeState = this._register(new Emitter()); readonly onDidChangeViewWelcomeState: Event = this._onDidChangeViewWelcomeState.event; - private focusedViewContextKey: IContextKey; - private _isVisible: boolean = false; readonly id: string; @@ -210,7 +208,6 @@ export abstract class ViewPane extends Pane implements IView { this._title = options.title; this._titleDescription = options.titleDescription; this.showActionsAlways = !!options.showActionsAlways; - this.focusedViewContextKey = FocusedViewContext.bindTo(contextKeyService); const scopedContextKeyService = this._register(contextKeyService.createScoped(this.element)); scopedContextKeyService.createKey('view', this.id); @@ -265,17 +262,8 @@ export abstract class ViewPane extends Pane implements IView { const focusTracker = trackFocus(this.element); this._register(focusTracker); - this._register(focusTracker.onDidFocus(() => { - this.focusedViewContextKey.set(this.id); - this._onDidFocus.fire(); - })); - this._register(focusTracker.onDidBlur(() => { - if (this.focusedViewContextKey.get() === this.id) { - this.focusedViewContextKey.reset(); - } - - this._onDidBlur.fire(); - })); + this._register(focusTracker.onDidFocus(() => this._onDidFocus.fire())); + this._register(focusTracker.onDidBlur(() => this._onDidBlur.fire())); } protected renderHeader(container: HTMLElement): void { diff --git a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts index d24ecdf1eb7..a6d4892875c 100644 --- a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts +++ b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts @@ -327,6 +327,12 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { private readonly _onDidChangeViewVisibility = this._register(new Emitter()); readonly onDidChangeViewVisibility = this._onDidChangeViewVisibility.event; + private readonly _onDidFocusView = this._register(new Emitter()); + readonly onDidFocusView = this._onDidFocusView.event; + + private readonly _onDidBlurView = this._register(new Emitter()); + readonly onDidBlurView = this._onDidBlurView.event; + get onDidSashChange(): Event { return assertIsDefined(this.paneview).onDidSashChange; } @@ -835,7 +841,11 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { } private addPane(pane: ViewPane, size: number, index = this.paneItems.length - 1): void { - const onDidFocus = pane.onDidFocus(() => this.lastFocusedPane = pane); + const onDidFocus = pane.onDidFocus(() => { + this._onDidFocusView.fire(pane); + this.lastFocusedPane = pane; + }); + const onDidBlur = pane.onDidBlur(() => this._onDidBlurView.fire(pane)); const onDidChangeTitleArea = pane.onDidChangeTitleArea(() => { if (this.isViewMergedWithContainer()) { this.updateTitleArea(); @@ -857,7 +867,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { dropBackground: isPanel ? PANEL_SECTION_DRAG_AND_DROP_BACKGROUND : SIDE_BAR_DRAG_AND_DROP_BACKGROUND, leftBorder: isPanel ? PANEL_SECTION_BORDER : undefined }, pane); - const disposable = combinedDisposable(pane, onDidFocus, onDidChangeTitleArea, paneStyler, onDidChange, onDidChangeVisibility); + const disposable = combinedDisposable(pane, onDidFocus, onDidBlur, onDidChangeTitleArea, paneStyler, onDidChange, onDidChangeVisibility); const paneItem: IViewPaneItem = { pane, disposable }; this.paneItems.splice(index, 0, paneItem); diff --git a/src/vs/workbench/browser/parts/views/viewsService.ts b/src/vs/workbench/browser/parts/views/viewsService.ts index 88ee4b8d2cc..ad98045d32f 100644 --- a/src/vs/workbench/browser/parts/views/viewsService.ts +++ b/src/vs/workbench/browser/parts/views/viewsService.ts @@ -49,6 +49,7 @@ export class ViewsService extends Disposable implements IViewsService { readonly onDidChangeViewContainerVisibility = this._onDidChangeViewContainerVisibility.event; private readonly visibleViewContextKeys: Map>; + private readonly focusedViewContextKey: IContextKey; constructor( @IViewDescriptorService private readonly viewDescriptorService: IViewDescriptorService, @@ -78,6 +79,7 @@ export class ViewsService extends Disposable implements IViewsService { this._register(this.viewletService.onDidViewletClose(viewlet => this._onDidChangeViewContainerVisibility.fire({ id: viewlet.getId(), visible: false, location: ViewContainerLocation.Sidebar }))); this._register(this.panelService.onDidPanelClose(panel => this._onDidChangeViewContainerVisibility.fire({ id: panel.getId(), visible: false, location: ViewContainerLocation.Panel }))); + this.focusedViewContextKey = FocusedViewContext.bindTo(contextKeyService); } private onViewsAdded(added: IView[]): void { @@ -581,6 +583,12 @@ export class ViewsService extends Disposable implements IViewsService { disposables.add(viewPaneContainer.onDidAddViews(views => this.onViewsAdded(views))); disposables.add(viewPaneContainer.onDidChangeViewVisibility(view => this.onViewsVisibilityChanged(view, view.isBodyVisible()))); disposables.add(viewPaneContainer.onDidRemoveViews(views => this.onViewsRemoved(views))); + disposables.add(viewPaneContainer.onDidFocusView(view => this.focusedViewContextKey.set(view.id))); + disposables.add(viewPaneContainer.onDidBlurView(view => { + if (this.focusedViewContextKey.get() === view.id) { + this.focusedViewContextKey.reset(); + } + })); return viewPaneContainer; } From b06d9007ef456a8fa07153ea87919fad6887ed28 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 8 Feb 2021 14:25:59 -0800 Subject: [PATCH 48/91] chore: bump electron@11.2.3 --- .yarnrc | 2 +- cgmanifest.json | 4 ++-- package.json | 4 ++-- yarn.lock | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.yarnrc b/.yarnrc index 9738cd535ab..c157931dce7 100644 --- a/.yarnrc +++ b/.yarnrc @@ -1,3 +1,3 @@ disturl "https://electronjs.org/headers" -target "11.2.2" +target "11.2.3" runtime "electron" diff --git a/cgmanifest.json b/cgmanifest.json index f9aa3cd5fb0..0459d39bfe7 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -60,12 +60,12 @@ "git": { "name": "electron", "repositoryUrl": "https://github.com/electron/electron", - "commitHash": "805e442ff873e10735a1ea18021f491597afa885" + "commitHash": "137f45750f7319442c511183c0ad0f3c4fe7e07a" } }, "isOnlyProductionDependency": true, "license": "MIT", - "version": "11.2.2" + "version": "11.2.3" }, { "component": { diff --git a/package.json b/package.json index a8d93b98375..7142a61206a 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "compile-web": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile-web", "watch-web": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js watch-web", "eslint": "node build/eslint", - "electron-rebuild": "electron-rebuild --arch=arm64 --force --version=11.2.2", + "electron-rebuild": "electron-rebuild --arch=arm64 --force --version=11.2.3", "playwright-install": "node build/azure-pipelines/common/installPlaywright.js", "compile-build": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile-build", "compile-extensions-build": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile-extensions-build", @@ -125,7 +125,7 @@ "cssnano": "^4.1.10", "debounce": "^1.0.0", "deemon": "^1.4.0", - "electron": "11.2.2", + "electron": "11.2.3", "electron-rebuild": "2.0.3", "eslint": "6.8.0", "eslint-plugin-jsdoc": "^19.1.0", diff --git a/yarn.lock b/yarn.lock index 527de19f3d3..8559099a526 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3048,10 +3048,10 @@ electron-to-chromium@^1.3.634: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.642.tgz#8b884f50296c2ae2a9997f024d0e3e57facc2b94" integrity sha512-cev+jOrz/Zm1i+Yh334Hed6lQVOkkemk2wRozfMF4MtTR7pxf3r3L5Rbd7uX1zMcEqVJ7alJBnJL7+JffkC6FQ== -electron@11.2.2: - version "11.2.2" - resolved "https://registry.yarnpkg.com/electron/-/electron-11.2.2.tgz#c2e53eb56bd21ae1dc01bc781f2f6bcbe0c18033" - integrity sha512-+OitkBrnCFwOF5LXAeNnfIJDKhdBm77jboc16WCIpDsCyT+JpGsKK4y6o30nRZq3zC+wZggUm5w6Ujw5n76CGg== +electron@11.2.3: + version "11.2.3" + resolved "https://registry.yarnpkg.com/electron/-/electron-11.2.3.tgz#8ad1d9858436cfca0e2e5ea7fea326794ae58ebb" + integrity sha512-6yxOc42nDAptHKNlUG/vcOh2GI9x2fqp2nQbZO0/3sz2CrwsJkwR3i3oMN9XhVJaqI7GK1vSCJz0verOkWlXcQ== dependencies: "@electron/get" "^1.0.1" "@types/node" "^12.0.12" From eb62ecb01e2abace98dadcb02d034ae89822dcf3 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 8 Feb 2021 13:58:58 -0800 Subject: [PATCH 49/91] Use white background in simple browser by default --- extensions/simple-browser/media/main.css | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/simple-browser/media/main.css b/extensions/simple-browser/media/main.css index 9192d4b6b63..4775dc4a795 100644 --- a/extensions/simple-browser/media/main.css +++ b/extensions/simple-browser/media/main.css @@ -93,6 +93,7 @@ iframe { width: 100%; height: 100%; border: none; + background: white; /* Browsers default to a white background */ } .iframe-focused-alert { From 5b32b280375f9da88ed09078cf40d9f042422647 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 8 Feb 2021 14:26:02 -0800 Subject: [PATCH 50/91] Mark simple browser as a UI extension --- extensions/simple-browser/package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/simple-browser/package.json b/extensions/simple-browser/package.json index a9489bc24c4..4d8cf441f9f 100644 --- a/extensions/simple-browser/package.json +++ b/extensions/simple-browser/package.json @@ -16,6 +16,11 @@ "categories": [ "Other" ], + "extensionKind": [ + "ui", + "workspace", + "web" + ], "activationEvents": [ "onCommand:simpleBrowser.show", "onCommand:simpleBrowser.api.open", From 46e28e3bbea3c33771ca999402350b1b17527d0c Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 8 Feb 2021 14:26:58 -0800 Subject: [PATCH 51/91] Copy codicon files directly into sources instead of taking a non dev dependecy on the entire package --- extensions/simple-browser/media/codicon.css | 449 ++++++++++++++++++ extensions/simple-browser/media/codicon.ttf | Bin 0 -> 62792 bytes extensions/simple-browser/package.json | 5 +- .../simple-browser/src/simpleBrowserView.ts | 7 +- extensions/simple-browser/yarn.lock | 8 +- 5 files changed, 461 insertions(+), 8 deletions(-) create mode 100644 extensions/simple-browser/media/codicon.css create mode 100644 extensions/simple-browser/media/codicon.ttf diff --git a/extensions/simple-browser/media/codicon.css b/extensions/simple-browser/media/codicon.css new file mode 100644 index 00000000000..209c4e8f730 --- /dev/null +++ b/extensions/simple-browser/media/codicon.css @@ -0,0 +1,449 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +@font-face { + font-family: "codicon"; + src: url("./codicon.ttf?756fa482df4f1610f1e0548d031e8c29") format("truetype"); +} + +.codicon[class*='codicon-'] { + font: normal normal normal 16px/1 codicon; + display: inline-block; + text-decoration: none; + text-rendering: auto; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + user-select: none; + -webkit-user-select: none; + -ms-user-select: none; +} + + +.codicon-add:before { content: "\ea60" } +.codicon-plus:before { content: "\ea60" } +.codicon-gist-new:before { content: "\ea60" } +.codicon-repo-create:before { content: "\ea60" } +.codicon-lightbulb:before { content: "\ea61" } +.codicon-light-bulb:before { content: "\ea61" } +.codicon-repo:before { content: "\ea62" } +.codicon-repo-delete:before { content: "\ea62" } +.codicon-gist-fork:before { content: "\ea63" } +.codicon-repo-forked:before { content: "\ea63" } +.codicon-git-pull-request:before { content: "\ea64" } +.codicon-git-pull-request-abandoned:before { content: "\ea64" } +.codicon-record-keys:before { content: "\ea65" } +.codicon-keyboard:before { content: "\ea65" } +.codicon-tag:before { content: "\ea66" } +.codicon-tag-add:before { content: "\ea66" } +.codicon-tag-remove:before { content: "\ea66" } +.codicon-person:before { content: "\ea67" } +.codicon-person-add:before { content: "\ea67" } +.codicon-person-follow:before { content: "\ea67" } +.codicon-person-outline:before { content: "\ea67" } +.codicon-person-filled:before { content: "\ea67" } +.codicon-git-branch:before { content: "\ea68" } +.codicon-git-branch-create:before { content: "\ea68" } +.codicon-git-branch-delete:before { content: "\ea68" } +.codicon-source-control:before { content: "\ea68" } +.codicon-mirror:before { content: "\ea69" } +.codicon-mirror-public:before { content: "\ea69" } +.codicon-star:before { content: "\ea6a" } +.codicon-star-add:before { content: "\ea6a" } +.codicon-star-delete:before { content: "\ea6a" } +.codicon-star-empty:before { content: "\ea6a" } +.codicon-comment:before { content: "\ea6b" } +.codicon-comment-add:before { content: "\ea6b" } +.codicon-alert:before { content: "\ea6c" } +.codicon-warning:before { content: "\ea6c" } +.codicon-search:before { content: "\ea6d" } +.codicon-search-save:before { content: "\ea6d" } +.codicon-log-out:before { content: "\ea6e" } +.codicon-sign-out:before { content: "\ea6e" } +.codicon-log-in:before { content: "\ea6f" } +.codicon-sign-in:before { content: "\ea6f" } +.codicon-eye:before { content: "\ea70" } +.codicon-eye-unwatch:before { content: "\ea70" } +.codicon-eye-watch:before { content: "\ea70" } +.codicon-circle-filled:before { content: "\ea71" } +.codicon-primitive-dot:before { content: "\ea71" } +.codicon-close-dirty:before { content: "\ea71" } +.codicon-debug-breakpoint:before { content: "\ea71" } +.codicon-debug-breakpoint-disabled:before { content: "\ea71" } +.codicon-debug-hint:before { content: "\ea71" } +.codicon-primitive-square:before { content: "\ea72" } +.codicon-edit:before { content: "\ea73" } +.codicon-pencil:before { content: "\ea73" } +.codicon-info:before { content: "\ea74" } +.codicon-issue-opened:before { content: "\ea74" } +.codicon-gist-private:before { content: "\ea75" } +.codicon-git-fork-private:before { content: "\ea75" } +.codicon-lock:before { content: "\ea75" } +.codicon-mirror-private:before { content: "\ea75" } +.codicon-close:before { content: "\ea76" } +.codicon-remove-close:before { content: "\ea76" } +.codicon-x:before { content: "\ea76" } +.codicon-repo-sync:before { content: "\ea77" } +.codicon-sync:before { content: "\ea77" } +.codicon-clone:before { content: "\ea78" } +.codicon-desktop-download:before { content: "\ea78" } +.codicon-beaker:before { content: "\ea79" } +.codicon-microscope:before { content: "\ea79" } +.codicon-vm:before { content: "\ea7a" } +.codicon-device-desktop:before { content: "\ea7a" } +.codicon-file:before { content: "\ea7b" } +.codicon-file-text:before { content: "\ea7b" } +.codicon-more:before { content: "\ea7c" } +.codicon-ellipsis:before { content: "\ea7c" } +.codicon-kebab-horizontal:before { content: "\ea7c" } +.codicon-mail-reply:before { content: "\ea7d" } +.codicon-reply:before { content: "\ea7d" } +.codicon-organization:before { content: "\ea7e" } +.codicon-organization-filled:before { content: "\ea7e" } +.codicon-organization-outline:before { content: "\ea7e" } +.codicon-new-file:before { content: "\ea7f" } +.codicon-file-add:before { content: "\ea7f" } +.codicon-new-folder:before { content: "\ea80" } +.codicon-file-directory-create:before { content: "\ea80" } +.codicon-trash:before { content: "\ea81" } +.codicon-trashcan:before { content: "\ea81" } +.codicon-history:before { content: "\ea82" } +.codicon-clock:before { content: "\ea82" } +.codicon-folder:before { content: "\ea83" } +.codicon-file-directory:before { content: "\ea83" } +.codicon-symbol-folder:before { content: "\ea83" } +.codicon-logo-github:before { content: "\ea84" } +.codicon-mark-github:before { content: "\ea84" } +.codicon-github:before { content: "\ea84" } +.codicon-terminal:before { content: "\ea85" } +.codicon-console:before { content: "\ea85" } +.codicon-repl:before { content: "\ea85" } +.codicon-zap:before { content: "\ea86" } +.codicon-symbol-event:before { content: "\ea86" } +.codicon-error:before { content: "\ea87" } +.codicon-stop:before { content: "\ea87" } +.codicon-variable:before { content: "\ea88" } +.codicon-symbol-variable:before { content: "\ea88" } +.codicon-array:before { content: "\ea8a" } +.codicon-symbol-array:before { content: "\ea8a" } +.codicon-symbol-module:before { content: "\ea8b" } +.codicon-symbol-package:before { content: "\ea8b" } +.codicon-symbol-namespace:before { content: "\ea8b" } +.codicon-symbol-object:before { content: "\ea8b" } +.codicon-symbol-method:before { content: "\ea8c" } +.codicon-symbol-function:before { content: "\ea8c" } +.codicon-symbol-constructor:before { content: "\ea8c" } +.codicon-symbol-boolean:before { content: "\ea8f" } +.codicon-symbol-null:before { content: "\ea8f" } +.codicon-symbol-numeric:before { content: "\ea90" } +.codicon-symbol-number:before { content: "\ea90" } +.codicon-symbol-structure:before { content: "\ea91" } +.codicon-symbol-struct:before { content: "\ea91" } +.codicon-symbol-parameter:before { content: "\ea92" } +.codicon-symbol-type-parameter:before { content: "\ea92" } +.codicon-symbol-key:before { content: "\ea93" } +.codicon-symbol-text:before { content: "\ea93" } +.codicon-symbol-reference:before { content: "\ea94" } +.codicon-go-to-file:before { content: "\ea94" } +.codicon-symbol-enum:before { content: "\ea95" } +.codicon-symbol-value:before { content: "\ea95" } +.codicon-symbol-ruler:before { content: "\ea96" } +.codicon-symbol-unit:before { content: "\ea96" } +.codicon-activate-breakpoints:before { content: "\ea97" } +.codicon-archive:before { content: "\ea98" } +.codicon-arrow-both:before { content: "\ea99" } +.codicon-arrow-down:before { content: "\ea9a" } +.codicon-arrow-left:before { content: "\ea9b" } +.codicon-arrow-right:before { content: "\ea9c" } +.codicon-arrow-small-down:before { content: "\ea9d" } +.codicon-arrow-small-left:before { content: "\ea9e" } +.codicon-arrow-small-right:before { content: "\ea9f" } +.codicon-arrow-small-up:before { content: "\eaa0" } +.codicon-arrow-up:before { content: "\eaa1" } +.codicon-bell:before { content: "\eaa2" } +.codicon-bold:before { content: "\eaa3" } +.codicon-book:before { content: "\eaa4" } +.codicon-bookmark:before { content: "\eaa5" } +.codicon-debug-breakpoint-conditional-unverified:before { content: "\eaa6" } +.codicon-debug-breakpoint-conditional:before { content: "\eaa7" } +.codicon-debug-breakpoint-conditional-disabled:before { content: "\eaa7" } +.codicon-debug-breakpoint-data-unverified:before { content: "\eaa8" } +.codicon-debug-breakpoint-data:before { content: "\eaa9" } +.codicon-debug-breakpoint-data-disabled:before { content: "\eaa9" } +.codicon-debug-breakpoint-log-unverified:before { content: "\eaaa" } +.codicon-debug-breakpoint-log:before { content: "\eaab" } +.codicon-debug-breakpoint-log-disabled:before { content: "\eaab" } +.codicon-briefcase:before { content: "\eaac" } +.codicon-broadcast:before { content: "\eaad" } +.codicon-browser:before { content: "\eaae" } +.codicon-bug:before { content: "\eaaf" } +.codicon-calendar:before { content: "\eab0" } +.codicon-case-sensitive:before { content: "\eab1" } +.codicon-check:before { content: "\eab2" } +.codicon-checklist:before { content: "\eab3" } +.codicon-chevron-down:before { content: "\eab4" } +.codicon-chevron-left:before { content: "\eab5" } +.codicon-chevron-right:before { content: "\eab6" } +.codicon-chevron-up:before { content: "\eab7" } +.codicon-chrome-close:before { content: "\eab8" } +.codicon-chrome-maximize:before { content: "\eab9" } +.codicon-chrome-minimize:before { content: "\eaba" } +.codicon-chrome-restore:before { content: "\eabb" } +.codicon-circle-outline:before { content: "\eabc" } +.codicon-debug-breakpoint-unverified:before { content: "\eabc" } +.codicon-circle-slash:before { content: "\eabd" } +.codicon-circuit-board:before { content: "\eabe" } +.codicon-clear-all:before { content: "\eabf" } +.codicon-clippy:before { content: "\eac0" } +.codicon-close-all:before { content: "\eac1" } +.codicon-cloud-download:before { content: "\eac2" } +.codicon-cloud-upload:before { content: "\eac3" } +.codicon-code:before { content: "\eac4" } +.codicon-collapse-all:before { content: "\eac5" } +.codicon-color-mode:before { content: "\eac6" } +.codicon-comment-discussion:before { content: "\eac7" } +.codicon-credit-card:before { content: "\eac9" } +.codicon-dash:before { content: "\eacc" } +.codicon-dashboard:before { content: "\eacd" } +.codicon-database:before { content: "\eace" } +.codicon-debug-continue:before { content: "\eacf" } +.codicon-debug-disconnect:before { content: "\ead0" } +.codicon-debug-pause:before { content: "\ead1" } +.codicon-debug-restart:before { content: "\ead2" } +.codicon-debug-start:before { content: "\ead3" } +.codicon-debug-step-into:before { content: "\ead4" } +.codicon-debug-step-out:before { content: "\ead5" } +.codicon-debug-step-over:before { content: "\ead6" } +.codicon-debug-stop:before { content: "\ead7" } +.codicon-debug:before { content: "\ead8" } +.codicon-device-camera-video:before { content: "\ead9" } +.codicon-device-camera:before { content: "\eada" } +.codicon-device-mobile:before { content: "\eadb" } +.codicon-diff-added:before { content: "\eadc" } +.codicon-diff-ignored:before { content: "\eadd" } +.codicon-diff-modified:before { content: "\eade" } +.codicon-diff-removed:before { content: "\eadf" } +.codicon-diff-renamed:before { content: "\eae0" } +.codicon-diff:before { content: "\eae1" } +.codicon-discard:before { content: "\eae2" } +.codicon-editor-layout:before { content: "\eae3" } +.codicon-empty-window:before { content: "\eae4" } +.codicon-exclude:before { content: "\eae5" } +.codicon-extensions:before { content: "\eae6" } +.codicon-eye-closed:before { content: "\eae7" } +.codicon-file-binary:before { content: "\eae8" } +.codicon-file-code:before { content: "\eae9" } +.codicon-file-media:before { content: "\eaea" } +.codicon-file-pdf:before { content: "\eaeb" } +.codicon-file-submodule:before { content: "\eaec" } +.codicon-file-symlink-directory:before { content: "\eaed" } +.codicon-file-symlink-file:before { content: "\eaee" } +.codicon-file-zip:before { content: "\eaef" } +.codicon-files:before { content: "\eaf0" } +.codicon-filter:before { content: "\eaf1" } +.codicon-flame:before { content: "\eaf2" } +.codicon-fold-down:before { content: "\eaf3" } +.codicon-fold-up:before { content: "\eaf4" } +.codicon-fold:before { content: "\eaf5" } +.codicon-folder-active:before { content: "\eaf6" } +.codicon-folder-opened:before { content: "\eaf7" } +.codicon-gear:before { content: "\eaf8" } +.codicon-gift:before { content: "\eaf9" } +.codicon-gist-secret:before { content: "\eafa" } +.codicon-gist:before { content: "\eafb" } +.codicon-git-commit:before { content: "\eafc" } +.codicon-git-compare:before { content: "\eafd" } +.codicon-compare-changes:before { content: "\eafd" } +.codicon-git-merge:before { content: "\eafe" } +.codicon-github-action:before { content: "\eaff" } +.codicon-github-alt:before { content: "\eb00" } +.codicon-globe:before { content: "\eb01" } +.codicon-grabber:before { content: "\eb02" } +.codicon-graph:before { content: "\eb03" } +.codicon-gripper:before { content: "\eb04" } +.codicon-heart:before { content: "\eb05" } +.codicon-home:before { content: "\eb06" } +.codicon-horizontal-rule:before { content: "\eb07" } +.codicon-hubot:before { content: "\eb08" } +.codicon-inbox:before { content: "\eb09" } +.codicon-issue-closed:before { content: "\eb0a" } +.codicon-issue-reopened:before { content: "\eb0b" } +.codicon-issues:before { content: "\eb0c" } +.codicon-italic:before { content: "\eb0d" } +.codicon-jersey:before { content: "\eb0e" } +.codicon-json:before { content: "\eb0f" } +.codicon-kebab-vertical:before { content: "\eb10" } +.codicon-key:before { content: "\eb11" } +.codicon-law:before { content: "\eb12" } +.codicon-lightbulb-autofix:before { content: "\eb13" } +.codicon-link-external:before { content: "\eb14" } +.codicon-link:before { content: "\eb15" } +.codicon-list-ordered:before { content: "\eb16" } +.codicon-list-unordered:before { content: "\eb17" } +.codicon-live-share:before { content: "\eb18" } +.codicon-loading:before { content: "\eb19" } +.codicon-location:before { content: "\eb1a" } +.codicon-mail-read:before { content: "\eb1b" } +.codicon-mail:before { content: "\eb1c" } +.codicon-markdown:before { content: "\eb1d" } +.codicon-megaphone:before { content: "\eb1e" } +.codicon-mention:before { content: "\eb1f" } +.codicon-milestone:before { content: "\eb20" } +.codicon-mortar-board:before { content: "\eb21" } +.codicon-move:before { content: "\eb22" } +.codicon-multiple-windows:before { content: "\eb23" } +.codicon-mute:before { content: "\eb24" } +.codicon-no-newline:before { content: "\eb25" } +.codicon-note:before { content: "\eb26" } +.codicon-octoface:before { content: "\eb27" } +.codicon-open-preview:before { content: "\eb28" } +.codicon-package:before { content: "\eb29" } +.codicon-paintcan:before { content: "\eb2a" } +.codicon-pin:before { content: "\eb2b" } +.codicon-play:before { content: "\eb2c" } +.codicon-run:before { content: "\eb2c" } +.codicon-plug:before { content: "\eb2d" } +.codicon-preserve-case:before { content: "\eb2e" } +.codicon-preview:before { content: "\eb2f" } +.codicon-project:before { content: "\eb30" } +.codicon-pulse:before { content: "\eb31" } +.codicon-question:before { content: "\eb32" } +.codicon-quote:before { content: "\eb33" } +.codicon-radio-tower:before { content: "\eb34" } +.codicon-reactions:before { content: "\eb35" } +.codicon-references:before { content: "\eb36" } +.codicon-refresh:before { content: "\eb37" } +.codicon-regex:before { content: "\eb38" } +.codicon-remote-explorer:before { content: "\eb39" } +.codicon-remote:before { content: "\eb3a" } +.codicon-remove:before { content: "\eb3b" } +.codicon-replace-all:before { content: "\eb3c" } +.codicon-replace:before { content: "\eb3d" } +.codicon-repo-clone:before { content: "\eb3e" } +.codicon-repo-force-push:before { content: "\eb3f" } +.codicon-repo-pull:before { content: "\eb40" } +.codicon-repo-push:before { content: "\eb41" } +.codicon-report:before { content: "\eb42" } +.codicon-request-changes:before { content: "\eb43" } +.codicon-rocket:before { content: "\eb44" } +.codicon-root-folder-opened:before { content: "\eb45" } +.codicon-root-folder:before { content: "\eb46" } +.codicon-rss:before { content: "\eb47" } +.codicon-ruby:before { content: "\eb48" } +.codicon-save-all:before { content: "\eb49" } +.codicon-save-as:before { content: "\eb4a" } +.codicon-save:before { content: "\eb4b" } +.codicon-screen-full:before { content: "\eb4c" } +.codicon-screen-normal:before { content: "\eb4d" } +.codicon-search-stop:before { content: "\eb4e" } +.codicon-server:before { content: "\eb50" } +.codicon-settings-gear:before { content: "\eb51" } +.codicon-settings:before { content: "\eb52" } +.codicon-shield:before { content: "\eb53" } +.codicon-smiley:before { content: "\eb54" } +.codicon-sort-precedence:before { content: "\eb55" } +.codicon-split-horizontal:before { content: "\eb56" } +.codicon-split-vertical:before { content: "\eb57" } +.codicon-squirrel:before { content: "\eb58" } +.codicon-star-full:before { content: "\eb59" } +.codicon-star-half:before { content: "\eb5a" } +.codicon-symbol-class:before { content: "\eb5b" } +.codicon-symbol-color:before { content: "\eb5c" } +.codicon-symbol-constant:before { content: "\eb5d" } +.codicon-symbol-enum-member:before { content: "\eb5e" } +.codicon-symbol-field:before { content: "\eb5f" } +.codicon-symbol-file:before { content: "\eb60" } +.codicon-symbol-interface:before { content: "\eb61" } +.codicon-symbol-keyword:before { content: "\eb62" } +.codicon-symbol-misc:before { content: "\eb63" } +.codicon-symbol-operator:before { content: "\eb64" } +.codicon-symbol-property:before { content: "\eb65" } +.codicon-wrench:before { content: "\eb65" } +.codicon-wrench-subaction:before { content: "\eb65" } +.codicon-symbol-snippet:before { content: "\eb66" } +.codicon-tasklist:before { content: "\eb67" } +.codicon-telescope:before { content: "\eb68" } +.codicon-text-size:before { content: "\eb69" } +.codicon-three-bars:before { content: "\eb6a" } +.codicon-thumbsdown:before { content: "\eb6b" } +.codicon-thumbsup:before { content: "\eb6c" } +.codicon-tools:before { content: "\eb6d" } +.codicon-triangle-down:before { content: "\eb6e" } +.codicon-triangle-left:before { content: "\eb6f" } +.codicon-triangle-right:before { content: "\eb70" } +.codicon-triangle-up:before { content: "\eb71" } +.codicon-twitter:before { content: "\eb72" } +.codicon-unfold:before { content: "\eb73" } +.codicon-unlock:before { content: "\eb74" } +.codicon-unmute:before { content: "\eb75" } +.codicon-unverified:before { content: "\eb76" } +.codicon-verified:before { content: "\eb77" } +.codicon-versions:before { content: "\eb78" } +.codicon-vm-active:before { content: "\eb79" } +.codicon-vm-outline:before { content: "\eb7a" } +.codicon-vm-running:before { content: "\eb7b" } +.codicon-watch:before { content: "\eb7c" } +.codicon-whitespace:before { content: "\eb7d" } +.codicon-whole-word:before { content: "\eb7e" } +.codicon-window:before { content: "\eb7f" } +.codicon-word-wrap:before { content: "\eb80" } +.codicon-zoom-in:before { content: "\eb81" } +.codicon-zoom-out:before { content: "\eb82" } +.codicon-list-filter:before { content: "\eb83" } +.codicon-list-flat:before { content: "\eb84" } +.codicon-list-selection:before { content: "\eb85" } +.codicon-selection:before { content: "\eb85" } +.codicon-list-tree:before { content: "\eb86" } +.codicon-debug-breakpoint-function-unverified:before { content: "\eb87" } +.codicon-debug-breakpoint-function:before { content: "\eb88" } +.codicon-debug-breakpoint-function-disabled:before { content: "\eb88" } +.codicon-debug-stackframe-active:before { content: "\eb89" } +.codicon-debug-stackframe-dot:before { content: "\eb8a" } +.codicon-debug-stackframe:before { content: "\eb8b" } +.codicon-debug-stackframe-focused:before { content: "\eb8b" } +.codicon-debug-breakpoint-unsupported:before { content: "\eb8c" } +.codicon-symbol-string:before { content: "\eb8d" } +.codicon-debug-reverse-continue:before { content: "\eb8e" } +.codicon-debug-step-back:before { content: "\eb8f" } +.codicon-debug-restart-frame:before { content: "\eb90" } +.codicon-debug-alt:before { content: "\eb91" } +.codicon-call-incoming:before { content: "\eb92" } +.codicon-call-outgoing:before { content: "\eb93" } +.codicon-menu:before { content: "\eb94" } +.codicon-expand-all:before { content: "\eb95" } +.codicon-feedback:before { content: "\eb96" } +.codicon-group-by-ref-type:before { content: "\eb97" } +.codicon-ungroup-by-ref-type:before { content: "\eb98" } +.codicon-account:before { content: "\eb99" } +.codicon-bell-dot:before { content: "\eb9a" } +.codicon-debug-console:before { content: "\eb9b" } +.codicon-library:before { content: "\eb9c" } +.codicon-output:before { content: "\eb9d" } +.codicon-run-all:before { content: "\eb9e" } +.codicon-sync-ignored:before { content: "\eb9f" } +.codicon-pinned:before { content: "\eba0" } +.codicon-github-inverted:before { content: "\eba1" } +.codicon-server-process:before { content: "\eba2" } +.codicon-server-environment:before { content: "\eba3" } +.codicon-pass:before { content: "\eba4" } +.codicon-stop-circle:before { content: "\eba5" } +.codicon-play-circle:before { content: "\eba6" } +.codicon-record:before { content: "\eba7" } +.codicon-debug-alt-small:before { content: "\eba8" } +.codicon-vm-connect:before { content: "\eba9" } +.codicon-cloud:before { content: "\ebaa" } +.codicon-merge:before { content: "\ebab" } +.codicon-export:before { content: "\ebac" } +.codicon-graph-left:before { content: "\ebad" } +.codicon-magnet:before { content: "\ebae" } +.codicon-notebook:before { content: "\ebaf" } +.codicon-redo:before { content: "\ebb0" } +.codicon-check-all:before { content: "\ebb1" } +.codicon-pinned-dirty:before { content: "\ebb2" } +.codicon-pass-filled:before { content: "\ebb3" } +.codicon-circle-large-filled:before { content: "\ebb4" } +.codicon-circle-large-outline:before { content: "\ebb5" } +.codicon-combine:before { content: "\ebb6" } +.codicon-gather:before { content: "\ebb6" } diff --git a/extensions/simple-browser/media/codicon.ttf b/extensions/simple-browser/media/codicon.ttf new file mode 100644 index 0000000000000000000000000000000000000000..39ca0a60807de52b035e1a438f9d4782966cd25b GIT binary patch literal 62792 zcmeFacYqt!xi@^yjLNEaX(g>RDl2J=v_)D;TP1sU-P^jY*KJ*~jZLw^U{hpzG0h}^ zX$BHH4grS*--KNVAtaCloZL`u5(kn1HzCrE!%Iv;_IfAp@66eC;pV>I_kRC=cdegh zG@2Qm`aHjkhqs*?$n?w-O>eeD1p4+l6i9hxoo4Cxy;ickWr?r>5ff zfA=K5*Ka@n!kyo_Z|2_#`4GQnyOW^o;>YZM?EN4ADgKEaIsK0gC`WL#=^H;kca5d{ zGh*OZ{5oZQj-AQ3{}>bhB>oW}tB5dhJ+8skFA$sZnH|;RAAaW4_xRjG3Pk9iK6eQ* zpR;b~dBjIlr+t6=K0W8`&FgS~+*W}~Ig{cDC7Q{j;=j||i5j0Q0&B5b_?G^bv{IBn zAZigu|HYx!?Pitv_ z?4#8*4yB?(?KDJ-66;V012Ga4u|n_JiGxfbQ%NuBBh$$Y;v_EOCLU5v{3JkvL?R&) zCJ_=PwIoL3q=7V|9a5x;G?P}6CT%23a-^Mfk}lFsddO@ths-7O$zrmU43cGJh%6^7 z$ttoM^>wAA3&~D$5xJP`BD=|@&Xq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J?z335G%7PwZTJv@>h-*s5Z>zcHP)=t8f7SS(9QEtNF z5%rPoEG;UJbWijS=#C5wPRO-~MKr}Y)wxO*K0Y=!LcNH8 { @@ -86,8 +89,8 @@ export class SimpleBrowserView extends Disposable { const mainJs = this.extensionResourceUrl('media', 'index.js'); const mainCss = this.extensionResourceUrl('media', 'main.css'); - const codiconsUri = this.extensionResourceUrl('node_modules', 'vscode-codicons', 'dist', 'codicon.css'); - const codiconsFontUri = this.extensionResourceUrl('node_modules', 'vscode-codicons', 'dist', 'codicon.ttf'); + const codiconsUri = this.extensionResourceUrl('media', 'codicon.css'); + const codiconsFontUri = this.extensionResourceUrl('media', 'codicon.ttf'); return /* html */ ` diff --git a/extensions/simple-browser/yarn.lock b/extensions/simple-browser/yarn.lock index 1daa22f5798..721ede37a6a 100644 --- a/extensions/simple-browser/yarn.lock +++ b/extensions/simple-browser/yarn.lock @@ -2565,10 +2565,10 @@ vm-browserify@^1.0.1: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -vscode-codicons@^0.0.12: - version "0.0.12" - resolved "https://registry.yarnpkg.com/vscode-codicons/-/vscode-codicons-0.0.12.tgz#94b867156f3e3a6a4cf7661e9bf2bd0060042390" - integrity sha512-CyGFDf3OmQhtBql/BFheUAlvEZ1MKAgvyCrGktGXEsqYvK5m9456kckDTNvnEAGG8gYjE2ds5O1cle82sMgmAg== +vscode-codicons@^0.0.14: + version "0.0.14" + resolved "https://registry.yarnpkg.com/vscode-codicons/-/vscode-codicons-0.0.14.tgz#e0d05418e2e195564ff6f6a2199d70415911c18f" + integrity sha512-6CEH5KT9ct5WMw7n5dlX7rB8ya4CUI2FSq1Wk36XaW+c5RglFtAanUV0T+gvZVVFhl/WxfjTvFHq06Hz9c1SLA== vscode-extension-telemetry@0.1.1: version "0.1.1" From ff03697a1aa7a8c9290280adb425650321f74eea Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 8 Feb 2021 14:54:37 -0800 Subject: [PATCH 52/91] Use node script instead of 'cp' command this should also work on widnows --- extensions/simple-browser/build/copy.js | 14 ++++++++++++++ extensions/simple-browser/package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 extensions/simple-browser/build/copy.js diff --git a/extensions/simple-browser/build/copy.js b/extensions/simple-browser/build/copy.js new file mode 100644 index 00000000000..d48747399a8 --- /dev/null +++ b/extensions/simple-browser/build/copy.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. + *--------------------------------------------------------------------------------------------*/ +const fs = require('fs'); +const path = require('path'); + +fs.copyFileSync( + path.join('node_modules', 'vscode-codicons', 'dist', 'codicon.css'), + path.join('media', 'codicon.css')); + +fs.copyFileSync( + path.join('node_modules', 'vscode-codicons', 'dist', 'codicon.ttf'), + path.join('media', 'codicon.ttf')); diff --git a/extensions/simple-browser/package.json b/extensions/simple-browser/package.json index 62f2dc2fc42..d5c6da0a701 100644 --- a/extensions/simple-browser/package.json +++ b/extensions/simple-browser/package.json @@ -58,7 +58,7 @@ "build-preview-production": "webpack --mode production", "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose", - "postinstall": "cp node_modules/vscode-codicons/dist/codicon.css media/ ; cp node_modules/vscode-codicons/dist/codicon.ttf media/" + "postinstall": "node ./build/copy" }, "dependencies": { "vscode-extension-telemetry": "0.1.1", From 64a164c9d5c8381b13cd34b47ef443d212c4f23d Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Mon, 8 Feb 2021 16:38:57 -0800 Subject: [PATCH 53/91] Add default color for sash hover border color (refs #114636) --- src/vs/platform/theme/common/colorRegistry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 7bf7747c421..1256437a0d7 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -258,7 +258,7 @@ export const editorInfoBorder = registerColor('editorInfo.border', { dark: null, export const editorHintForeground = registerColor('editorHint.foreground', { dark: Color.fromHex('#eeeeee').transparent(0.7), light: '#6c6c6c', hc: null }, nls.localize('editorHint.foreground', 'Foreground color of hint squigglies in the editor.')); export const editorHintBorder = registerColor('editorHint.border', { dark: null, light: null, hc: Color.fromHex('#eeeeee').transparent(0.8) }, nls.localize('hintBorder', 'Border color of hint boxes in the editor.')); -export const sashHoverBorder = registerColor('sash.hoverBorder', { dark: null, light: null, hc: null }, nls.localize('sashActiveBorder', "Border color of active sashes.")); +export const sashHoverBorder = registerColor('sash.hoverBorder', { dark: focusBorder, light: focusBorder, hc: focusBorder }, nls.localize('sashActiveBorder', "Border color of active sashes.")); /** * Editor background color. From 4623a509954c0fef186c2a1b421e2c4d1c96fc32 Mon Sep 17 00:00:00 2001 From: Jackson Kearl Date: Mon, 8 Feb 2021 17:46:12 -0800 Subject: [PATCH 54/91] Fix #116154 --- test/automation/src/settings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/automation/src/settings.ts b/test/automation/src/settings.ts index 87366ed5e03..914cb8113c2 100644 --- a/test/automation/src/settings.ts +++ b/test/automation/src/settings.ts @@ -19,7 +19,7 @@ export class SettingsEditor { await this.editor.waitForEditorFocus('settings.json', 1); await this.code.dispatchKeybinding('right'); - await this.editor.waitForTypeInEditor('settings.json', `"${setting}": ${value}`); + await this.editor.waitForTypeInEditor('settings.json', `"${setting}": ${value},`); await this.editors.saveOpenedFile(); } From 29844a0baf309a3fb4d07a8a63f1b61c39085622 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Mon, 8 Feb 2021 18:21:23 -0800 Subject: [PATCH 55/91] disable smoke tests that time out --- .../src/areas/extensions/extensions.test.ts | 32 ++++++++-------- .../src/areas/languages/languages.test.ts | 38 +++++++++---------- .../src/areas/statusbar/statusbar.test.ts | 10 ++--- .../src/areas/workbench/localization.test.ts | 34 ++++++++--------- 4 files changed, 57 insertions(+), 57 deletions(-) diff --git a/test/smoke/src/areas/extensions/extensions.test.ts b/test/smoke/src/areas/extensions/extensions.test.ts index 72a3460d8fe..fe65087f74c 100644 --- a/test/smoke/src/areas/extensions/extensions.test.ts +++ b/test/smoke/src/areas/extensions/extensions.test.ts @@ -3,31 +3,31 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Application, Quality } from '../../../../automation'; +import { Application } from '../../../../automation'; export function setup() { describe('Extensions', () => { - it(`install and activate vscode-smoketest-check extension`, async function () { - const app = this.app as Application; + // it(`install and activate vscode-smoketest-check extension`, async function () { + // const app = this.app as Application; - if (app.quality === Quality.Dev) { - this.skip(); - return; - } + // if (app.quality === Quality.Dev) { + // this.skip(); + // return; + // } - if (!app.web) { - await app.workbench.settingsEditor.addUserSetting('webview.experimental.useIframes', 'true'); - } + // if (!app.web) { + // await app.workbench.settingsEditor.addUserSetting('webview.experimental.useIframes', 'true'); + // } - await app.workbench.extensions.openExtensionsViewlet(); + // await app.workbench.extensions.openExtensionsViewlet(); - await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', true); + // await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', true); - await app.workbench.extensions.waitForExtensionsViewlet(); + // await app.workbench.extensions.waitForExtensionsViewlet(); - await app.workbench.quickaccess.runCommand('Smoke Test Check'); - await app.workbench.statusbar.waitForStatusbarText('smoke test', 'VS Code Smoke Test Check'); - }); + // await app.workbench.quickaccess.runCommand('Smoke Test Check'); + // await app.workbench.statusbar.waitForStatusbarText('smoke test', 'VS Code Smoke Test Check'); + // }); after(async function () { const app = this.app as Application; diff --git a/test/smoke/src/areas/languages/languages.test.ts b/test/smoke/src/areas/languages/languages.test.ts index ef1bf9455cf..8f8e38da297 100644 --- a/test/smoke/src/areas/languages/languages.test.ts +++ b/test/smoke/src/areas/languages/languages.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Application, ProblemSeverity, Problems } from '../../../../automation/out'; +import { Application } from '../../../../automation/out'; export function setup() { describe('Language Features', () => { @@ -15,28 +15,28 @@ export function setup() { await app.workbench.quickinput.waitForQuickInputElements(names => names.length === 2); }); - it('verifies problems view', async function () { - const app = this.app as Application; - await app.workbench.quickaccess.openFile('style.css'); - await app.workbench.editor.waitForTypeInEditor('style.css', '.foo{}'); + // it('verifies problems view', async function () { + // const app = this.app as Application; + // await app.workbench.quickaccess.openFile('style.css'); + // await app.workbench.editor.waitForTypeInEditor('style.css', '.foo{}'); - await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.WARNING)); + // await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.WARNING)); - await app.workbench.problems.showProblemsView(); - await app.code.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.WARNING)); - await app.workbench.problems.hideProblemsView(); - }); + // await app.workbench.problems.showProblemsView(); + // await app.code.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.WARNING)); + // await app.workbench.problems.hideProblemsView(); + // }); - it('verifies settings', async function () { - const app = this.app as Application; - await app.workbench.settingsEditor.addUserSetting('css.lint.emptyRules', '"error"'); - await app.workbench.quickaccess.openFile('style.css'); + // it('verifies settings', async function () { + // const app = this.app as Application; + // await app.workbench.settingsEditor.addUserSetting('css.lint.emptyRules', '"error"'); + // await app.workbench.quickaccess.openFile('style.css'); - await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.ERROR)); + // await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.ERROR)); - await app.workbench.problems.showProblemsView(); - await app.code.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.ERROR)); - await app.workbench.problems.hideProblemsView(); - }); + // await app.workbench.problems.showProblemsView(); + // await app.code.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.ERROR)); + // await app.workbench.problems.hideProblemsView(); + // }); }); } diff --git a/test/smoke/src/areas/statusbar/statusbar.test.ts b/test/smoke/src/areas/statusbar/statusbar.test.ts index 4cbf56526b4..585e6409b5b 100644 --- a/test/smoke/src/areas/statusbar/statusbar.test.ts +++ b/test/smoke/src/areas/statusbar/statusbar.test.ts @@ -53,12 +53,12 @@ export function setup(isWeb) { await app.workbench.quickinput.closeQuickInput(); }); - it(`verifies that 'Problems View' appears when clicking on 'Problems' status element`, async function () { - const app = this.app as Application; + // it(`verifies that 'Problems View' appears when clicking on 'Problems' status element`, async function () { + // const app = this.app as Application; - await app.workbench.statusbar.clickOn(StatusBarElement.PROBLEMS_STATUS); - await app.workbench.problems.waitForProblemsView(); - }); + // await app.workbench.statusbar.clickOn(StatusBarElement.PROBLEMS_STATUS); + // await app.workbench.problems.waitForProblemsView(); + // }); it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () { const app = this.app as Application; diff --git a/test/smoke/src/areas/workbench/localization.test.ts b/test/smoke/src/areas/workbench/localization.test.ts index 1101625ba3e..6f559f45941 100644 --- a/test/smoke/src/areas/workbench/localization.test.ts +++ b/test/smoke/src/areas/workbench/localization.test.ts @@ -20,28 +20,28 @@ export function setup() { await app.restart({ extraArgs: ['--locale=DE'] }); }); - it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () { - const app = this.app as Application; + // it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () { + // const app = this.app as Application; - if (app.quality === Quality.Dev) { - this.skip(); - return; - } + // if (app.quality === Quality.Dev) { + // this.skip(); + // return; + // } - // await app.workbench.explorer.waitForOpenEditorsViewTitle(title => /geöffnete editoren/i.test(title)); + // // await app.workbench.explorer.waitForOpenEditorsViewTitle(title => /geöffnete editoren/i.test(title)); - await app.workbench.search.openSearchViewlet(); - await app.workbench.search.waitForTitle(title => /suchen/i.test(title)); + // await app.workbench.search.openSearchViewlet(); + // await app.workbench.search.waitForTitle(title => /suchen/i.test(title)); - // await app.workbench.scm.openSCMViewlet(); - // await app.workbench.scm.waitForTitle(title => /quellcodeverwaltung/i.test(title)); + // // await app.workbench.scm.openSCMViewlet(); + // // await app.workbench.scm.waitForTitle(title => /quellcodeverwaltung/i.test(title)); - // See https://github.com/microsoft/vscode/issues/93462 - // await app.workbench.debug.openDebugViewlet(); - // await app.workbench.debug.waitForTitle(title => /starten/i.test(title)); + // // See https://github.com/microsoft/vscode/issues/93462 + // // await app.workbench.debug.openDebugViewlet(); + // // await app.workbench.debug.waitForTitle(title => /starten/i.test(title)); - // await app.workbench.extensions.openExtensionsViewlet(); - // await app.workbench.extensions.waitForTitle(title => /extensions/i.test(title)); - }); + // // await app.workbench.extensions.openExtensionsViewlet(); + // // await app.workbench.extensions.waitForTitle(title => /extensions/i.test(title)); + // }); }); } From 518097377de2ca84d9ba1f01933dee5393e0d76f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 8 Feb 2021 21:00:12 -0800 Subject: [PATCH 56/91] Handle 304s for remote resources Now that we send along etag caching headers, the remote can return 304s. Make sure we forward these --- src/vs/platform/webview/common/resourceLoader.ts | 12 +++++++++--- .../webview/electron-main/webviewProtocolProvider.ts | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/vs/platform/webview/common/resourceLoader.ts b/src/vs/platform/webview/common/resourceLoader.ts index 52577d327e8..06f243e40aa 100644 --- a/src/vs/platform/webview/common/resourceLoader.ts +++ b/src/vs/platform/webview/common/resourceLoader.ts @@ -137,10 +137,16 @@ export async function loadLocalResource( logService.debug(`loadLocalResource - Loaded over http(s). requestUri=${requestUri}, response=${response.res.statusCode}`); - if (response.res.statusCode === 200) { - return new WebviewResourceResponse.StreamSuccess(response.stream, response.res.headers['etag'], mime); + switch (response.res.statusCode) { + case 200: + return new WebviewResourceResponse.StreamSuccess(response.stream, response.res.headers['etag'], mime); + + case 304: // Not modified + return new WebviewResourceResponse.NotModified(mime); + + default: + return WebviewResourceResponse.Failed; } - return WebviewResourceResponse.Failed; } try { diff --git a/src/vs/platform/webview/electron-main/webviewProtocolProvider.ts b/src/vs/platform/webview/electron-main/webviewProtocolProvider.ts index ede8d2ad556..bb0aafe22ee 100644 --- a/src/vs/platform/webview/electron-main/webviewProtocolProvider.ts +++ b/src/vs/platform/webview/electron-main/webviewProtocolProvider.ts @@ -224,7 +224,7 @@ export class WebviewProtocolProvider extends Disposable { }, fileReader, this.requestService, this.logService, CancellationToken.None); switch (result.type) { - case WebviewFileReadResponse.Type.Success: + case WebviewResourceResponse.Type.Success: { const cacheHeaders: Record = result.etag ? { 'ETag': result.etag, From 87a3effc79a191a64854547fb6d05bd57433099f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 8 Feb 2021 21:31:04 -0800 Subject: [PATCH 57/91] Try to disable caching in the simple browser's iframes --- extensions/simple-browser/media/index.js | 14 ++++++++++++-- extensions/simple-browser/media/index.js.map | 2 +- extensions/simple-browser/preview-src/index.ts | 16 ++++++++++++++-- .../simple-browser/src/simpleBrowserView.ts | 2 +- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/extensions/simple-browser/media/index.js b/extensions/simple-browser/media/index.js index 5a7763a93de..ca44111a2ea 100644 --- a/extensions/simple-browser/media/index.js +++ b/extensions/simple-browser/media/index.js @@ -194,9 +194,19 @@ events_1.onceDocumentLoaded(() => { iframe.src = input.value; }); navigateTo(settings.url); + input.value = settings.url; toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled); - function navigateTo(url) { - iframe.src = url; + function navigateTo(rawUrl) { + try { + const url = new URL(rawUrl); + // Try to bust the cache for the iframe + // There does not appear to be any way to reliably do this except modifying the url + url.searchParams.append('vscodeBrowserReqId', Date.now().toString()); + iframe.src = url.toString(); + } + catch (_a) { + iframe.src = rawUrl; + } } }); function toggleFocusLockIndicatorEnabled(enabled) { diff --git a/extensions/simple-browser/media/index.js.map b/extensions/simple-browser/media/index.js.map index d6128aae7e3..d4e76529981 100644 --- a/extensions/simple-browser/media/index.js.map +++ b/extensions/simple-browser/media/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./preview-src/events.ts","webpack:///./preview-src/index.ts"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;AACb;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACfa;AACb;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,iBAAiB,mBAAO,CAAC,yCAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./preview-src/index.ts\");\n","\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onceDocumentLoaded = void 0;\nfunction onceDocumentLoaded(f) {\n if (document.readyState === 'loading' || document.readyState === 'uninitialized') {\n document.addEventListener('DOMContentLoaded', f);\n }\n else {\n f();\n }\n}\nexports.onceDocumentLoaded = onceDocumentLoaded;\n","\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"./events\");\nconst vscode = acquireVsCodeApi();\nfunction getSettings() {\n const element = document.getElementById('simple-browser-settings');\n if (element) {\n const data = element.getAttribute('data-settings');\n if (data) {\n return JSON.parse(data);\n }\n }\n throw new Error(`Could not load settings`);\n}\nconst settings = getSettings();\nconst iframe = document.querySelector('iframe');\nconst header = document.querySelector('.header');\nconst input = header.querySelector('.url-input');\nconst forwardButton = header.querySelector('.forward-button');\nconst backButton = header.querySelector('.back-button');\nconst reloadButton = header.querySelector('.reload-button');\nconst openExternalButton = header.querySelector('.open-external-button');\nwindow.addEventListener('message', e => {\n switch (e.data.type) {\n case 'focus':\n {\n iframe.focus();\n break;\n }\n case 'didChangeFocusLockIndicatorEnabled':\n {\n toggleFocusLockIndicatorEnabled(e.data.enabled);\n break;\n }\n }\n});\nevents_1.onceDocumentLoaded(() => {\n setInterval(() => {\n var _a;\n const iframeFocused = ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName) === 'IFRAME';\n document.body.classList.toggle('iframe-focused', iframeFocused);\n }, 50);\n iframe.addEventListener('load', () => {\n // Noop\n });\n input.addEventListener('change', e => {\n const url = e.target.value;\n navigateTo(url);\n });\n forwardButton.addEventListener('click', () => {\n history.forward();\n });\n backButton.addEventListener('click', () => {\n history.back();\n });\n openExternalButton.addEventListener('click', () => {\n vscode.postMessage({\n type: 'openExternal',\n url: input.value\n });\n });\n reloadButton.addEventListener('click', () => {\n // This does not seem to trigger what we want\n // history.go(0);\n // This incorrectly adds entries to the history but does reload\n iframe.src = input.value;\n });\n navigateTo(settings.url);\n toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled);\n function navigateTo(url) {\n iframe.src = url;\n }\n});\nfunction toggleFocusLockIndicatorEnabled(enabled) {\n document.body.classList.toggle('enable-focus-lock-indicator', enabled);\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./preview-src/events.ts","webpack:///./preview-src/index.ts"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;AACb;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACfa;AACb;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,iBAAiB,mBAAO,CAAC,yCAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./preview-src/index.ts\");\n","\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onceDocumentLoaded = void 0;\nfunction onceDocumentLoaded(f) {\n if (document.readyState === 'loading' || document.readyState === 'uninitialized') {\n document.addEventListener('DOMContentLoaded', f);\n }\n else {\n f();\n }\n}\nexports.onceDocumentLoaded = onceDocumentLoaded;\n","\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"./events\");\nconst vscode = acquireVsCodeApi();\nfunction getSettings() {\n const element = document.getElementById('simple-browser-settings');\n if (element) {\n const data = element.getAttribute('data-settings');\n if (data) {\n return JSON.parse(data);\n }\n }\n throw new Error(`Could not load settings`);\n}\nconst settings = getSettings();\nconst iframe = document.querySelector('iframe');\nconst header = document.querySelector('.header');\nconst input = header.querySelector('.url-input');\nconst forwardButton = header.querySelector('.forward-button');\nconst backButton = header.querySelector('.back-button');\nconst reloadButton = header.querySelector('.reload-button');\nconst openExternalButton = header.querySelector('.open-external-button');\nwindow.addEventListener('message', e => {\n switch (e.data.type) {\n case 'focus':\n {\n iframe.focus();\n break;\n }\n case 'didChangeFocusLockIndicatorEnabled':\n {\n toggleFocusLockIndicatorEnabled(e.data.enabled);\n break;\n }\n }\n});\nevents_1.onceDocumentLoaded(() => {\n setInterval(() => {\n var _a;\n const iframeFocused = ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName) === 'IFRAME';\n document.body.classList.toggle('iframe-focused', iframeFocused);\n }, 50);\n iframe.addEventListener('load', () => {\n // Noop\n });\n input.addEventListener('change', e => {\n const url = e.target.value;\n navigateTo(url);\n });\n forwardButton.addEventListener('click', () => {\n history.forward();\n });\n backButton.addEventListener('click', () => {\n history.back();\n });\n openExternalButton.addEventListener('click', () => {\n vscode.postMessage({\n type: 'openExternal',\n url: input.value\n });\n });\n reloadButton.addEventListener('click', () => {\n // This does not seem to trigger what we want\n // history.go(0);\n // This incorrectly adds entries to the history but does reload\n iframe.src = input.value;\n });\n navigateTo(settings.url);\n input.value = settings.url;\n toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled);\n function navigateTo(rawUrl) {\n try {\n const url = new URL(rawUrl);\n // Try to bust the cache for the iframe\n // There does not appear to be any way to reliably do this except modifying the url\n url.searchParams.append('vscodeBrowserReqId', Date.now().toString());\n iframe.src = url.toString();\n }\n catch (_a) {\n iframe.src = rawUrl;\n }\n }\n});\nfunction toggleFocusLockIndicatorEnabled(enabled) {\n document.body.classList.toggle('enable-focus-lock-indicator', enabled);\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/simple-browser/preview-src/index.ts b/extensions/simple-browser/preview-src/index.ts index 564224fd3bf..83cb3dedb16 100644 --- a/extensions/simple-browser/preview-src/index.ts +++ b/extensions/simple-browser/preview-src/index.ts @@ -84,10 +84,22 @@ onceDocumentLoaded(() => { }); navigateTo(settings.url); + input.value = settings.url; + toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled); - function navigateTo(url: string): void { - iframe.src = url; + function navigateTo(rawUrl: string): void { + try { + const url = new URL(rawUrl); + + // Try to bust the cache for the iframe + // There does not appear to be any way to reliably do this except modifying the url + url.searchParams.append('vscodeBrowserReqId', Date.now().toString()); + + iframe.src = url.toString(); + } catch { + iframe.src = rawUrl; + } } }); diff --git a/extensions/simple-browser/src/simpleBrowserView.ts b/extensions/simple-browser/src/simpleBrowserView.ts index 306e56986e4..ef491d60eff 100644 --- a/extensions/simple-browser/src/simpleBrowserView.ts +++ b/extensions/simple-browser/src/simpleBrowserView.ts @@ -129,7 +129,7 @@ export class SimpleBrowserView extends Disposable { class="reload-button icon"> - +