Merge branch 'master' into sandy081/httpEndPointSync
|
@ -100,7 +100,7 @@ steps:
|
|||
|
||||
- script: |
|
||||
set -e
|
||||
DISPLAY=:10 ./scripts/test.sh --build --tfs --no-sandbox "Unit Tests"
|
||||
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests
|
||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ var editorResources = [
|
|||
'!out-build/vs/base/browser/ui/splitview/**/*',
|
||||
'!out-build/vs/base/browser/ui/toolbar/**/*',
|
||||
'!out-build/vs/base/browser/ui/octiconLabel/**/*',
|
||||
'!out-build/vs/base/browser/ui/codiconLabel/**/*',
|
||||
'!out-build/vs/workbench/**',
|
||||
'!**/test/**'
|
||||
];
|
||||
|
@ -91,6 +92,7 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
|
|||
],
|
||||
redirects: {
|
||||
'vs/base/browser/ui/octiconLabel/octiconLabel': 'vs/base/browser/ui/octiconLabel/octiconLabel.mock',
|
||||
'vs/base/browser/ui/codiconLabel/codiconLabel': 'vs/base/browser/ui/codiconLabel/codiconLabel.mock',
|
||||
},
|
||||
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
|
||||
importIgnorePattern: /(^vs\/css!)|(promise-polyfill\/polyfill)/,
|
||||
|
|
|
@ -72,6 +72,7 @@ const indentationFilter = [
|
|||
|
||||
// except multiple specific folders
|
||||
'!**/octicons/**',
|
||||
'!**/codicon/**',
|
||||
'!**/fixtures/**',
|
||||
'!**/lib/**',
|
||||
'!extensions/**/out/**',
|
||||
|
|
|
@ -68,6 +68,7 @@ const vscodeResources = [
|
|||
'out-build/vs/base/node/languagePacks.js',
|
||||
'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh,ps.sh}',
|
||||
'out-build/vs/base/browser/ui/octiconLabel/octicons/**',
|
||||
'out-build/vs/base/browser/ui/codiconLabel/codicon/**',
|
||||
'out-build/vs/workbench/browser/media/*-theme.css',
|
||||
'out-build/vs/workbench/contrib/debug/**/*.json',
|
||||
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp keyword.control.directive.conditional.ifndef.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -14,8 +14,8 @@
|
|||
"c": "ifndef",
|
||||
"t": "source.cpp keyword.control.directive.conditional.ifndef.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -36,8 +36,8 @@
|
|||
"c": "_UCRT",
|
||||
"t": "source.cpp meta.preprocessor.conditional.cpp entity.name.function.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_plus": "source.cpp entity.name.function.preprocessor: #C586C0",
|
||||
"light_plus": "source.cpp entity.name.function.preprocessor: #AF00DB",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
|
@ -58,8 +58,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -69,8 +69,8 @@
|
|||
"c": "define",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -91,8 +91,8 @@
|
|||
"c": "_UCRT",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp entity.name.function.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_plus": "source.cpp entity.name.function.preprocessor: #C586C0",
|
||||
"light_plus": "source.cpp entity.name.function.preprocessor: #AF00DB",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
|
@ -102,8 +102,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp keyword.control.directive.endif.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -113,8 +113,8 @@
|
|||
"c": "endif",
|
||||
"t": "source.cpp keyword.control.directive.endif.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp keyword.control.directive.conditional.ifndef.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -14,8 +14,8 @@
|
|||
"c": "ifndef",
|
||||
"t": "source.cpp keyword.control.directive.conditional.ifndef.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -36,8 +36,8 @@
|
|||
"c": "_UCRT",
|
||||
"t": "source.cpp meta.preprocessor.conditional.cpp entity.name.function.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_plus": "source.cpp entity.name.function.preprocessor: #C586C0",
|
||||
"light_plus": "source.cpp entity.name.function.preprocessor: #AF00DB",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
|
@ -47,8 +47,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -58,8 +58,8 @@
|
|||
"c": "define",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -80,8 +80,8 @@
|
|||
"c": "_UCRT",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp entity.name.function.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_plus": "source.cpp entity.name.function.preprocessor: #C586C0",
|
||||
"light_plus": "source.cpp entity.name.function.preprocessor: #AF00DB",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
|
@ -91,8 +91,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp keyword.control.directive.endif.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -102,8 +102,8 @@
|
|||
"c": "endif",
|
||||
"t": "source.cpp keyword.control.directive.endif.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -14,8 +14,8 @@
|
|||
"c": "define",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -36,8 +36,8 @@
|
|||
"c": "DOCTEST_IMPLEMENT_FIXTURE",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp entity.name.function.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_plus": "source.cpp entity.name.function.preprocessor: #C586C0",
|
||||
"light_plus": "source.cpp entity.name.function.preprocessor: #AF00DB",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
|
@ -58,8 +58,8 @@
|
|||
"c": "der",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp variable.parameter.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_plus": "source.cpp variable.parameter: #7F7F7F",
|
||||
"light_plus": "source.cpp variable.parameter: #808080",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
|
@ -91,8 +91,8 @@
|
|||
"c": "base",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp variable.parameter.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_plus": "source.cpp variable.parameter: #7F7F7F",
|
||||
"light_plus": "source.cpp variable.parameter: #808080",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
|
@ -124,8 +124,8 @@
|
|||
"c": "func",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp variable.parameter.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_plus": "source.cpp variable.parameter: #7F7F7F",
|
||||
"light_plus": "source.cpp variable.parameter: #808080",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
|
@ -157,8 +157,8 @@
|
|||
"c": "decorators",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp variable.parameter.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_plus": "source.cpp variable.parameter: #7F7F7F",
|
||||
"light_plus": "source.cpp variable.parameter: #808080",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp keyword.control.directive.conditional.if.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -14,8 +14,8 @@
|
|||
"c": "if",
|
||||
"t": "source.cpp keyword.control.directive.conditional.if.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -36,8 +36,8 @@
|
|||
"c": "B4G_DEBUG_CHECK",
|
||||
"t": "source.cpp meta.preprocessor.conditional.cpp entity.name.function.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_plus": "source.cpp entity.name.function.preprocessor: #C586C0",
|
||||
"light_plus": "source.cpp entity.name.function.preprocessor: #AF00DB",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
|
@ -652,8 +652,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp keyword.control.directive.endif.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -663,8 +663,8 @@
|
|||
"c": "endif",
|
||||
"t": "source.cpp keyword.control.directive.endif.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -751,8 +751,8 @@
|
|||
"c": "obj",
|
||||
"t": "source.cpp meta.function.definition.cpp meta.head.function.definition.cpp meta.function.definition.parameters.cpp meta.parameter.cpp variable.parameter.cpp",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_plus": "source.cpp variable.parameter: #7F7F7F",
|
||||
"light_plus": "source.cpp variable.parameter: #808080",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
|
@ -1037,7 +1037,7 @@
|
|||
"c": "x",
|
||||
"t": "source.cpp meta.function.definition.cpp meta.body.function.definition.cpp variable.other.property.cpp",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"dark_plus": "source.cpp variable.other.property: #DADADA",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.include.cpp keyword.control.directive.include.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -36,8 +36,8 @@
|
|||
"c": "include",
|
||||
"t": "source.cpp meta.preprocessor.include.cpp keyword.control.directive.include.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -157,8 +157,8 @@
|
|||
"c": "#",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp punctuation.definition.directive.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -168,8 +168,8 @@
|
|||
"c": "define",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp keyword.control.directive.define.cpp",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_plus": "source.cpp keyword.control.directive: #9B9B9B",
|
||||
"light_plus": "source.cpp keyword.control.directive: #808080",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #C586C0"
|
||||
|
@ -190,8 +190,8 @@
|
|||
"c": "EXTERN_C",
|
||||
"t": "source.cpp meta.preprocessor.macro.cpp entity.name.function.preprocessor.cpp",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.function: #DCDCAA",
|
||||
"light_plus": "entity.name.function: #795E26",
|
||||
"dark_plus": "source.cpp entity.name.function.preprocessor: #C586C0",
|
||||
"light_plus": "source.cpp entity.name.function.preprocessor: #AF00DB",
|
||||
"dark_vs": "meta.preprocessor: #569CD6",
|
||||
"light_vs": "meta.preprocessor: #0000FF",
|
||||
"hc_black": "entity.name.function: #DCDCAA"
|
||||
|
@ -817,8 +817,8 @@
|
|||
"c": "x",
|
||||
"t": "source.cpp meta.function.definition.cpp meta.head.function.definition.cpp meta.function.definition.parameters.cpp meta.parameter.cpp variable.parameter.cpp",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_plus": "source.cpp variable.parameter: #7F7F7F",
|
||||
"light_plus": "source.cpp variable.parameter: #808080",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
|
@ -872,8 +872,8 @@
|
|||
"c": "y",
|
||||
"t": "source.cpp meta.function.definition.cpp meta.head.function.definition.cpp meta.function.definition.parameters.cpp meta.parameter.cpp variable.parameter.cpp",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_plus": "source.cpp variable.parameter: #7F7F7F",
|
||||
"light_plus": "source.cpp variable.parameter: #808080",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
|
|
|
@ -170,6 +170,73 @@
|
|||
"settings": {
|
||||
"foreground": "#d7ba7d"
|
||||
}
|
||||
},
|
||||
// Scopes that are potentially C++ only follow
|
||||
{
|
||||
"scope": "source.cpp entity.name",
|
||||
"settings": {
|
||||
"foreground": "#C8C8C8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp keyword.control.directive",
|
||||
"settings": {
|
||||
"foreground": "#9B9B9B"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp entity.name.function.operator",
|
||||
"settings": {
|
||||
"foreground": "#B4B4B4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp entity.name.function.preprocessor",
|
||||
"settings": {
|
||||
"foreground": "#C586C0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp entity.name.label",
|
||||
"settings": {
|
||||
"foreground": "#C8C8C8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp entity.name.operator.custom-literal",
|
||||
"settings": {
|
||||
"foreground": "#DADADA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp entity.name.operator.custom-literal.number",
|
||||
"settings": {
|
||||
"foreground": "#B5CEA8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp entity.name.operator.custom-literal.string",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp variable.other.enummember",
|
||||
"settings": {
|
||||
"foreground": "#B8D7A3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp variable.other.property",
|
||||
"settings": {
|
||||
"foreground": "#DADADA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp variable.parameter",
|
||||
"settings": {
|
||||
"foreground": "#7F7F7F"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -170,7 +170,55 @@
|
|||
"settings": {
|
||||
"foreground": "#ff0000"
|
||||
}
|
||||
},
|
||||
// Scopes that are potentially C++ only follow
|
||||
{
|
||||
"scope": "source.cpp entity.name",
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp keyword.control.directive",
|
||||
"settings": {
|
||||
"foreground": "#808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp entity.name.function.operator",
|
||||
"settings": {
|
||||
"foreground": "#008080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp entity.name.function.preprocessor",
|
||||
"settings": {
|
||||
"foreground": "#AF00DB"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp entity.name.label",
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp entity.name.operator.custom-literal.string",
|
||||
"settings": {
|
||||
"foreground": "#0451a5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp variable.other.enummember",
|
||||
"settings": {
|
||||
"foreground": "#2F4F4F"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "source.cpp variable.parameter",
|
||||
"settings": {
|
||||
"foreground": "#808080"
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "code-oss-dev",
|
||||
"version": "1.39.0",
|
||||
"distro": "e892717dc1ae3cea3824697bc2c28d64f8476f93",
|
||||
"distro": "8ec29a9878d2ca77f73efc02f382f177d200fbb9",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Name=@@NAME_LONG@@ - URL Handler
|
||||
Comment=Code Editing. Redefined.
|
||||
GenericName=Text Editor
|
||||
Exec=@@EXEC@@ --open-url %U
|
||||
Exec=@@EXEC@@ --no-sandbox --open-url %U
|
||||
Icon=@@ICON@@
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Name=@@NAME_LONG@@
|
||||
Comment=Code Editing. Redefined.
|
||||
GenericName=Text Editor
|
||||
Exec=@@EXEC@@ --unity-launch %F
|
||||
Exec=@@EXEC@@ --no-sandbox --unity-launch %F
|
||||
Icon=@@ICON@@
|
||||
Type=Application
|
||||
StartupNotify=false
|
||||
|
@ -14,5 +14,5 @@ Keywords=vscode;
|
|||
|
||||
[Desktop Action new-empty-window]
|
||||
Name=New Empty Window
|
||||
Exec=@@EXEC@@ --new-window %F
|
||||
Exec=@@EXEC@@ --no-sandbox --new-window %F
|
||||
Icon=@@ICON@@
|
||||
|
|
|
@ -27,15 +27,15 @@ if grep -qi Microsoft /proc/version; then
|
|||
WSL_EXT_ID="ms-vscode-remote.remote-wsl"
|
||||
|
||||
if [ $WSL_BUILD -ge 41955 -a $WSL_BUILD -lt 41959 ]; then
|
||||
# WSL2 in workaround for https://github.com/microsoft/WSL/issues/4337
|
||||
# WSL2 workaround for https://github.com/microsoft/WSL/issues/4337
|
||||
CWD="$(pwd)"
|
||||
cd "$VSCODE_PATH"
|
||||
cmd.exe /C ".\\bin\\$APP_NAME.cmd --locate-extension $WSL_EXT_ID >remote-wsl-loc.txt"
|
||||
WSL_EXT_WLOC="$(cat ./remote-wsl-loc.txt)"
|
||||
rm remote-wsl-loc.txt
|
||||
cmd.exe /C ".\\bin\\$APP_NAME.cmd --locate-extension $WSL_EXT_ID >%TEMP%\\remote-wsl-loc.txt"
|
||||
WSL_EXT_WLOC=$(cmd.exe /C type %TEMP%\\remote-wsl-loc.txt)
|
||||
cd "$CWD"
|
||||
else
|
||||
WSL_EXT_WLOC=$(ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --locate-extension $WSL_EXT_ID)
|
||||
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --locate-extension $WSL_EXT_ID >/tmp/remote-wsl-loc.txt
|
||||
WSL_EXT_WLOC=$(cat /tmp/remote-wsl-loc.txt)
|
||||
fi
|
||||
if [ -n "$WSL_EXT_WLOC" ]; then
|
||||
# replace \r\n with \n in WSL_EXT_WLOC
|
||||
|
|
|
@ -8,7 +8,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
|||
else
|
||||
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
||||
VSCODEUSERDATADIR=`mktemp -d 2>/dev/null`
|
||||
LINUX_NO_SANDBOX="--no-sandbox" # workaround Electron 6 issue on Linux when running tests in container
|
||||
LINUX_NO_SANDBOX="--no-sandbox" # Electron 6 introduces a chrome-sandbox that requires root to run. This can fail. Disable sandbox via --no-sandbox.
|
||||
fi
|
||||
|
||||
cd $ROOT
|
||||
|
@ -34,7 +34,7 @@ else
|
|||
fi
|
||||
|
||||
# Integration tests in AMD
|
||||
./scripts/test.sh $LINUX_NO_SANDBOX --runGlob **/*.integrationTest.js "$@"
|
||||
./scripts/test.sh --runGlob **/*.integrationTest.js "$@"
|
||||
|
||||
# Tests in the extension host
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_NO_SANDBOX $ROOT/extensions/vscode-api-tests/testWorkspace --extensionDevelopmentPath=$ROOT/extensions/vscode-api-tests --extensionTestsPath=$ROOT/extensions/vscode-api-tests/out/singlefolder-tests --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --skip-getting-started --disable-inspect --user-data-dir=$VSCODEUSERDATADIR
|
||||
|
|
|
@ -34,5 +34,5 @@ else
|
|||
cd $ROOT ; \
|
||||
ELECTRON_ENABLE_LOGGING=1 \
|
||||
"$CODE" \
|
||||
test/electron/index.js "$@"
|
||||
test/electron/index.js --no-sandbox "$@" # Electron 6 introduces a chrome-sandbox that requires root to run. This can fail. Disable sandbox via --no-sandbox.
|
||||
fi
|
||||
|
|
|
@ -40,7 +40,8 @@
|
|||
transform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */
|
||||
}
|
||||
|
||||
.monaco-action-bar .action-item .icon {
|
||||
.monaco-action-bar .action-item .icon,
|
||||
.monaco-action-bar .action-item .codicon {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
@ -95,4 +96,4 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -311,14 +311,14 @@ export class ActionViewItem extends BaseActionViewItem {
|
|||
|
||||
if (this.options.icon) {
|
||||
this.cssClass = this.getAction().class;
|
||||
DOM.addClass(this.label, 'icon');
|
||||
DOM.addClass(this.label, 'codicon');
|
||||
if (this.cssClass) {
|
||||
DOM.addClasses(this.label, this.cssClass);
|
||||
}
|
||||
|
||||
this.updateEnabled();
|
||||
} else {
|
||||
DOM.removeClass(this.label, 'icon');
|
||||
DOM.removeClass(this.label, 'codicon');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
@keyframes codicon-spin {
|
||||
100% {
|
||||
transform:rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.codicon-animation-spin {
|
||||
animation: octicon-spin 1.5s linear infinite;
|
||||
}
|
354
src/vs/base/browser/ui/codiconLabel/codicon/codicon.css
Normal file
|
@ -0,0 +1,354 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* 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?e042d2dda15ef7b36b910e3edf539f26") 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;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
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-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-stop:before { content: "\ea72" }
|
||||
.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-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-Vector:before { content: "\f101" }
|
||||
.codicon-activate-breakpoints:before { content: "\f102" }
|
||||
.codicon-archive:before { content: "\f103" }
|
||||
.codicon-array:before { content: "\f104" }
|
||||
.codicon-arrow-both:before { content: "\f105" }
|
||||
.codicon-arrow-down:before { content: "\f106" }
|
||||
.codicon-arrow-left:before { content: "\f107" }
|
||||
.codicon-arrow-right:before { content: "\f108" }
|
||||
.codicon-arrow-small-down:before { content: "\f109" }
|
||||
.codicon-arrow-small-left:before { content: "\f10a" }
|
||||
.codicon-arrow-small-right:before { content: "\f10b" }
|
||||
.codicon-arrow-small-up:before { content: "\f10c" }
|
||||
.codicon-arrow-up:before { content: "\f10d" }
|
||||
.codicon-bell:before { content: "\f10e" }
|
||||
.codicon-bold:before { content: "\f10f" }
|
||||
.codicon-book:before { content: "\f110" }
|
||||
.codicon-bookmark:before { content: "\f111" }
|
||||
.codicon-boolean:before { content: "\f112" }
|
||||
.codicon-breakpoint-conditional-unverified:before { content: "\f113" }
|
||||
.codicon-breakpoint-conditional:before { content: "\f114" }
|
||||
.codicon-breakpoint-data-unverified:before { content: "\f115" }
|
||||
.codicon-breakpoint-data:before { content: "\f116" }
|
||||
.codicon-breakpoint-log-unverified:before { content: "\f117" }
|
||||
.codicon-breakpoint-log:before { content: "\f118" }
|
||||
.codicon-briefcase:before { content: "\f119" }
|
||||
.codicon-broadcast:before { content: "\f11a" }
|
||||
.codicon-browser:before { content: "\f11b" }
|
||||
.codicon-bug:before { content: "\f11c" }
|
||||
.codicon-calendar:before { content: "\f11d" }
|
||||
.codicon-case-sensitive:before { content: "\f11e" }
|
||||
.codicon-check:before { content: "\f11f" }
|
||||
.codicon-checklist:before { content: "\f120" }
|
||||
.codicon-chevron-down:before { content: "\f121" }
|
||||
.codicon-chevron-left:before { content: "\f122" }
|
||||
.codicon-chevron-right:before { content: "\f123" }
|
||||
.codicon-chevron-up:before { content: "\f124" }
|
||||
.codicon-circle-outline:before { content: "\f125" }
|
||||
.codicon-circle-slash:before { content: "\f126" }
|
||||
.codicon-circuit-board:before { content: "\f127" }
|
||||
.codicon-class:before { content: "\f128" }
|
||||
.codicon-clear-all:before { content: "\f129" }
|
||||
.codicon-clippy:before { content: "\f12a" }
|
||||
.codicon-close-all:before { content: "\f12b" }
|
||||
.codicon-cloud-download:before { content: "\f12c" }
|
||||
.codicon-cloud-upload:before { content: "\f12d" }
|
||||
.codicon-code:before { content: "\f12e" }
|
||||
.codicon-collapse-all:before { content: "\f12f" }
|
||||
.codicon-color-mode:before { content: "\f130" }
|
||||
.codicon-color:before { content: "\f131" }
|
||||
.codicon-comment-discussion:before { content: "\f132" }
|
||||
.codicon-compare-changes:before { content: "\f133" }
|
||||
.codicon-console:before { content: "\f134" }
|
||||
.codicon-constant:before { content: "\f135" }
|
||||
.codicon-continue:before { content: "\f136" }
|
||||
.codicon-credit-card:before { content: "\f137" }
|
||||
.codicon-current-and-breakpoint:before { content: "\f138" }
|
||||
.codicon-current:before { content: "\f139" }
|
||||
.codicon-dash:before { content: "\f13a" }
|
||||
.codicon-dashboard:before { content: "\f13b" }
|
||||
.codicon-database:before { content: "\f13c" }
|
||||
.codicon-debug:before { content: "\f13d" }
|
||||
.codicon-device-camera-video:before { content: "\f13e" }
|
||||
.codicon-device-camera:before { content: "\f13f" }
|
||||
.codicon-device-mobile:before { content: "\f140" }
|
||||
.codicon-diff-added:before { content: "\f141" }
|
||||
.codicon-diff-ignored:before { content: "\f142" }
|
||||
.codicon-diff-modified:before { content: "\f143" }
|
||||
.codicon-diff-removed:before { content: "\f144" }
|
||||
.codicon-diff-renamed:before { content: "\f145" }
|
||||
.codicon-diff:before { content: "\f146" }
|
||||
.codicon-discard:before { content: "\f147" }
|
||||
.codicon-disconnect-:before { content: "\f148" }
|
||||
.codicon-editor-layout:before { content: "\f149" }
|
||||
.codicon-ellipsis:before { content: "\f14a" }
|
||||
.codicon-empty-window:before { content: "\f14b" }
|
||||
.codicon-enumerator-member:before { content: "\f14c" }
|
||||
.codicon-enumerator:before { content: "\f14d" }
|
||||
.codicon-error:before { content: "\f14e" }
|
||||
.codicon-event:before { content: "\f14f" }
|
||||
.codicon-exclude:before { content: "\f150" }
|
||||
.codicon-extensions:before { content: "\f151" }
|
||||
.codicon-eye-closed:before { content: "\f152" }
|
||||
.codicon-field:before { content: "\f153" }
|
||||
.codicon-file-binary:before { content: "\f154" }
|
||||
.codicon-file-code:before { content: "\f155" }
|
||||
.codicon-file-media:before { content: "\f156" }
|
||||
.codicon-file-pdf:before { content: "\f157" }
|
||||
.codicon-file-submodule:before { content: "\f158" }
|
||||
.codicon-file-symlink-directory:before { content: "\f159" }
|
||||
.codicon-file-symlink-file:before { content: "\f15a" }
|
||||
.codicon-file-zip:before { content: "\f15b" }
|
||||
.codicon-files:before { content: "\f15c" }
|
||||
.codicon-filter:before { content: "\f15d" }
|
||||
.codicon-flame:before { content: "\f15e" }
|
||||
.codicon-fold-down:before { content: "\f15f" }
|
||||
.codicon-fold-up:before { content: "\f160" }
|
||||
.codicon-fold:before { content: "\f161" }
|
||||
.codicon-folder-active:before { content: "\f162" }
|
||||
.codicon-folder-opened:before { content: "\f163" }
|
||||
.codicon-folder:before { content: "\f164" }
|
||||
.codicon-gift:before { content: "\f165" }
|
||||
.codicon-gist-secret:before { content: "\f166" }
|
||||
.codicon-gist:before { content: "\f167" }
|
||||
.codicon-git-commit:before { content: "\f168" }
|
||||
.codicon-git-compare:before { content: "\f169" }
|
||||
.codicon-git-merge:before { content: "\f16a" }
|
||||
.codicon-github-action:before { content: "\f16b" }
|
||||
.codicon-github-alt:before { content: "\f16c" }
|
||||
.codicon-github:before { content: "\f16d" }
|
||||
.codicon-globe:before { content: "\f16e" }
|
||||
.codicon-go-to-file:before { content: "\f16f" }
|
||||
.codicon-grabber:before { content: "\f170" }
|
||||
.codicon-graph:before { content: "\f171" }
|
||||
.codicon-gripper:before { content: "\f172" }
|
||||
.codicon-heart:before { content: "\f173" }
|
||||
.codicon-history:before { content: "\f174" }
|
||||
.codicon-home:before { content: "\f175" }
|
||||
.codicon-horizontal-rule:before { content: "\f176" }
|
||||
.codicon-hubot:before { content: "\f177" }
|
||||
.codicon-inbox:before { content: "\f178" }
|
||||
.codicon-interface:before { content: "\f179" }
|
||||
.codicon-issue-closed:before { content: "\f17a" }
|
||||
.codicon-issue-reopened:before { content: "\f17b" }
|
||||
.codicon-issues:before { content: "\f17c" }
|
||||
.codicon-italic:before { content: "\f17d" }
|
||||
.codicon-jersey:before { content: "\f17e" }
|
||||
.codicon-json:before { content: "\f17f" }
|
||||
.codicon-kebab-vertical:before { content: "\f180" }
|
||||
.codicon-key:before { content: "\f181" }
|
||||
.codicon-keyword:before { content: "\f182" }
|
||||
.codicon-law:before { content: "\f183" }
|
||||
.codicon-lightbulb-autofix:before { content: "\f184" }
|
||||
.codicon-link-external:before { content: "\f185" }
|
||||
.codicon-link:before { content: "\f186" }
|
||||
.codicon-list-ordered:before { content: "\f187" }
|
||||
.codicon-list-unordered:before { content: "\f188" }
|
||||
.codicon-live-share:before { content: "\f189" }
|
||||
.codicon-loading:before { content: "\f18a" }
|
||||
.codicon-location:before { content: "\f18b" }
|
||||
.codicon-mail-read:before { content: "\f18c" }
|
||||
.codicon-mail:before { content: "\f18d" }
|
||||
.codicon-markdown:before { content: "\f18e" }
|
||||
.codicon-megaphone:before { content: "\f18f" }
|
||||
.codicon-mention:before { content: "\f190" }
|
||||
.codicon-method:before { content: "\f191" }
|
||||
.codicon-milestone:before { content: "\f192" }
|
||||
.codicon-misc:before { content: "\f193" }
|
||||
.codicon-mortar-board:before { content: "\f194" }
|
||||
.codicon-move:before { content: "\f195" }
|
||||
.codicon-multiple-windows:before { content: "\f196" }
|
||||
.codicon-mute:before { content: "\f197" }
|
||||
.codicon-namespace:before { content: "\f198" }
|
||||
.codicon-no-newline:before { content: "\f199" }
|
||||
.codicon-note:before { content: "\f19a" }
|
||||
.codicon-numeric:before { content: "\f19b" }
|
||||
.codicon-octoface:before { content: "\f19c" }
|
||||
.codicon-open-preview:before { content: "\f19d" }
|
||||
.codicon-operator:before { content: "\f19e" }
|
||||
.codicon-package:before { content: "\f19f" }
|
||||
.codicon-paintcan:before { content: "\f1a0" }
|
||||
.codicon-parameter:before { content: "\f1a1" }
|
||||
.codicon-pause:before { content: "\f1a2" }
|
||||
.codicon-pin:before { content: "\f1a3" }
|
||||
.codicon-play:before { content: "\f1a4" }
|
||||
.codicon-plug:before { content: "\f1a5" }
|
||||
.codicon-preserve-case:before { content: "\f1a6" }
|
||||
.codicon-preview:before { content: "\f1a7" }
|
||||
.codicon-project:before { content: "\f1a8" }
|
||||
.codicon-property:before { content: "\f1a9" }
|
||||
.codicon-pulse:before { content: "\f1aa" }
|
||||
.codicon-question:before { content: "\f1ab" }
|
||||
.codicon-quote:before { content: "\f1ac" }
|
||||
.codicon-radio-tower:before { content: "\f1ad" }
|
||||
.codicon-reactions:before { content: "\f1ae" }
|
||||
.codicon-references:before { content: "\f1af" }
|
||||
.codicon-refresh:before { content: "\f1b0" }
|
||||
.codicon-regex:before { content: "\f1b1" }
|
||||
.codicon-remote:before { content: "\f1b2" }
|
||||
.codicon-remove:before { content: "\f1b3" }
|
||||
.codicon-replace-all:before { content: "\f1b4" }
|
||||
.codicon-replace:before { content: "\f1b5" }
|
||||
.codicon-repo-clone:before { content: "\f1b6" }
|
||||
.codicon-repo-force-push:before { content: "\f1b7" }
|
||||
.codicon-repo-pull:before { content: "\f1b8" }
|
||||
.codicon-repo-push:before { content: "\f1b9" }
|
||||
.codicon-report:before { content: "\f1ba" }
|
||||
.codicon-request-changes:before { content: "\f1bb" }
|
||||
.codicon-restart:before { content: "\f1bc" }
|
||||
.codicon-rocket:before { content: "\f1bd" }
|
||||
.codicon-root-folder-opened:before { content: "\f1be" }
|
||||
.codicon-root-folder:before { content: "\f1bf" }
|
||||
.codicon-rss:before { content: "\f1c0" }
|
||||
.codicon-ruby:before { content: "\f1c1" }
|
||||
.codicon-ruler:before { content: "\f1c2" }
|
||||
.codicon-save-all:before { content: "\f1c3" }
|
||||
.codicon-save-as:before { content: "\f1c4" }
|
||||
.codicon-save:before { content: "\f1c5" }
|
||||
.codicon-screen-full:before { content: "\f1c6" }
|
||||
.codicon-screen-normal:before { content: "\f1c7" }
|
||||
.codicon-search-stop:before { content: "\f1c8" }
|
||||
.codicon-selection:before { content: "\f1c9" }
|
||||
.codicon-server:before { content: "\f1ca" }
|
||||
.codicon-settings:before { content: "\f1cb" }
|
||||
.codicon-shield:before { content: "\f1cc" }
|
||||
.codicon-smiley:before { content: "\f1cd" }
|
||||
.codicon-snippet:before { content: "\f1ce" }
|
||||
.codicon-sort-precedence:before { content: "\f1cf" }
|
||||
.codicon-split-horizontal:before { content: "\f1d0" }
|
||||
.codicon-split-vertical:before { content: "\f1d1" }
|
||||
.codicon-squirrel:before { content: "\f1d2" }
|
||||
.codicon-star-empty:before { content: "\f1d3" }
|
||||
.codicon-star-full:before { content: "\f1d4" }
|
||||
.codicon-star-half:before { content: "\f1d5" }
|
||||
.codicon-start:before { content: "\f1d6" }
|
||||
.codicon-step-into:before { content: "\f1d7" }
|
||||
.codicon-step-out:before { content: "\f1d8" }
|
||||
.codicon-step-over:before { content: "\f1d9" }
|
||||
.codicon-string:before { content: "\f1da" }
|
||||
.codicon-structure:before { content: "\f1db" }
|
||||
.codicon-tasklist:before { content: "\f1dc" }
|
||||
.codicon-telescope:before { content: "\f1dd" }
|
||||
.codicon-text-size:before { content: "\f1de" }
|
||||
.codicon-three-bars:before { content: "\f1df" }
|
||||
.codicon-thumbsdown:before { content: "\f1e0" }
|
||||
.codicon-thumbsup:before { content: "\f1e1" }
|
||||
.codicon-tools:before { content: "\f1e2" }
|
||||
.codicon-trash:before { content: "\f1e3" }
|
||||
.codicon-triangle-down:before { content: "\f1e4" }
|
||||
.codicon-triangle-left:before { content: "\f1e5" }
|
||||
.codicon-triangle-right:before { content: "\f1e6" }
|
||||
.codicon-triangle-up:before { content: "\f1e7" }
|
||||
.codicon-twitter:before { content: "\f1e8" }
|
||||
.codicon-unfold:before { content: "\f1e9" }
|
||||
.codicon-unlock:before { content: "\f1ea" }
|
||||
.codicon-unmute:before { content: "\f1eb" }
|
||||
.codicon-unverified:before { content: "\f1ec" }
|
||||
.codicon-variable:before { content: "\f1ed" }
|
||||
.codicon-verified:before { content: "\f1ee" }
|
||||
.codicon-versions:before { content: "\f1ef" }
|
||||
.codicon-vm-active:before { content: "\f1f0" }
|
||||
.codicon-vm-outline:before { content: "\f1f1" }
|
||||
.codicon-vm-running:before { content: "\f1f2" }
|
||||
.codicon-watch:before { content: "\f1f3" }
|
||||
.codicon-whitespace:before { content: "\f1f4" }
|
||||
.codicon-whole-word:before { content: "\f1f5" }
|
||||
.codicon-window:before { content: "\f1f6" }
|
||||
.codicon-word-wrap:before { content: "\f1f7" }
|
||||
.codicon-zoom-in:before { content: "\f1f8" }
|
||||
.codicon-zoom-out:before { content: "\f1f9" }
|
BIN
src/vs/base/browser/ui/codiconLabel/codicon/codicon.ttf
Normal file
24
src/vs/base/browser/ui/codiconLabel/codiconLabel.mock.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { escape } from 'vs/base/common/strings';
|
||||
|
||||
export function renderCodicons(text: string): string {
|
||||
return escape(text);
|
||||
}
|
||||
|
||||
export class CodiconLabel {
|
||||
|
||||
private _container: HTMLElement;
|
||||
|
||||
constructor(container: HTMLElement) {
|
||||
this._container = container;
|
||||
}
|
||||
|
||||
set text(text: string) {
|
||||
this._container.innerHTML = renderCodicons(text || '');
|
||||
}
|
||||
|
||||
}
|
33
src/vs/base/browser/ui/codiconLabel/codiconLabel.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/css!./codicon/codicon';
|
||||
import 'vs/css!./codicon/codicon-animations';
|
||||
import { escape } from 'vs/base/common/strings';
|
||||
|
||||
function expand(text: string): string {
|
||||
return text.replace(/\$\(((.+?)(~(.*?))?)\)/g, (_match, _g1, name, _g3, animation) => {
|
||||
return `<span class="codicon codicon-${name} ${animation ? `codicon-animation-${animation}` : ''}"></span>`;
|
||||
});
|
||||
}
|
||||
|
||||
export function renderCodicons(label: string): string {
|
||||
return expand(escape(label));
|
||||
}
|
||||
|
||||
export class CodiconLabel {
|
||||
|
||||
constructor(
|
||||
private readonly _container: HTMLElement
|
||||
) { }
|
||||
|
||||
set text(text: string) {
|
||||
this._container.innerHTML = renderCodicons(text || '');
|
||||
}
|
||||
|
||||
set title(title: string) {
|
||||
this._container.title = title;
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as objects from 'vs/base/common/objects';
|
||||
import { renderOcticons } from 'vs/base/browser/ui/octiconLabel/octiconLabel';
|
||||
import { renderCodicons } from 'vs/base/browser/ui/codiconLabel/codiconLabel';
|
||||
import { escape } from 'vs/base/common/strings';
|
||||
|
||||
export interface IHighlight {
|
||||
|
@ -65,13 +65,13 @@ export class HighlightedLabel {
|
|||
if (pos < highlight.start) {
|
||||
htmlContent += '<span>';
|
||||
const substring = this.text.substring(pos, highlight.start);
|
||||
htmlContent += this.supportOcticons ? renderOcticons(substring) : escape(substring);
|
||||
htmlContent += this.supportOcticons ? renderCodicons(substring) : escape(substring);
|
||||
htmlContent += '</span>';
|
||||
pos = highlight.end;
|
||||
}
|
||||
htmlContent += '<span class="highlight">';
|
||||
const substring = this.text.substring(highlight.start, highlight.end);
|
||||
htmlContent += this.supportOcticons ? renderOcticons(substring) : escape(substring);
|
||||
htmlContent += this.supportOcticons ? renderCodicons(substring) : escape(substring);
|
||||
htmlContent += '</span>';
|
||||
pos = highlight.end;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ export class HighlightedLabel {
|
|||
if (pos < this.text.length) {
|
||||
htmlContent += '<span>';
|
||||
const substring = this.text.substring(pos);
|
||||
htmlContent += this.supportOcticons ? renderOcticons(substring) : escape(substring);
|
||||
htmlContent += this.supportOcticons ? renderCodicons(substring) : escape(substring);
|
||||
htmlContent += '</span>';
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.monaco-inputbox .monaco-action-bar .action-item .icon {
|
||||
.monaco-inputbox .monaco-action-bar .action-item .codicon {
|
||||
background-repeat: no-repeat;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
|
|
@ -68,7 +68,8 @@
|
|||
}
|
||||
|
||||
/* TODO: actions should be part of the panel, but they aren't yet */
|
||||
.monaco-panel-view .panel > .panel-header > .actions .action-label.icon {
|
||||
.monaco-panel-view .panel > .panel-header > .actions .action-label.icon,
|
||||
.monaco-panel-view .panel > .panel-header > .actions .action-label.codicon {
|
||||
width: 28px;
|
||||
height: 22px;
|
||||
background-size: 16px;
|
||||
|
|
|
@ -32,7 +32,6 @@ export interface IServerChannel<TContext = string> {
|
|||
listen<T>(ctx: TContext, event: string, arg?: any): Event<T>;
|
||||
}
|
||||
|
||||
|
||||
export const enum RequestType {
|
||||
Promise = 100,
|
||||
PromiseCancel = 101,
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9 9H4V10H9V9Z" fill="#C5C5C5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 3L6 2H13L14 3V10L13 11H11V13L10 14H3L2 13V6L3 5H5V3ZM6 5H10L11 6V10H13V3H6V5ZM10 6H3V13H10V6Z" fill="#C5C5C5"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 309 B |
|
@ -1,4 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9 9H4V10H9V9Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 3L6 2H13L14 3V10L13 11H11V13L10 14H3L2 13V6L3 5H5V3ZM6 5H10L11 6V10H13V3H6V5ZM10 6H3V13H10V6Z" fill="white"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 305 B |
|
@ -1,4 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9 9H4V10H9V9Z" fill="#424242"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 3L6 2H13L14 3V10L13 11H11V13L10 14H3L2 13V6L3 5H5V3ZM6 5H10L11 6V10H13V3H6V5ZM10 6H3V13H10V6Z" fill="#424242"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 309 B |
|
@ -110,15 +110,3 @@
|
|||
.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {
|
||||
background-image: url('loading-hc.svg');
|
||||
}
|
||||
|
||||
.monaco-tree-action.collapse-all {
|
||||
background: url('collapse-all-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .monaco-tree-action.collapse-all {
|
||||
background: url('collapse-all-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.hc-black .monaco-tree-action.collapse-all {
|
||||
background: url('collapse-all-hc.svg') center center no-repeat;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import { EnvironmentService } from 'vs/platform/environment/node/environmentServ
|
|||
import { IssueReporterModel, IssueReporterData as IssueReporterModelData } from 'vs/code/electron-browser/issue/issueReporterModel';
|
||||
import { IssueReporterData, IssueReporterStyles, IssueType, ISettingsSearchIssueReporterData, IssueReporterFeatures, IssueReporterExtensionData } from 'vs/platform/issue/node/issue';
|
||||
import BaseHtml from 'vs/code/electron-browser/issue/issueReporterPage';
|
||||
import { LogLevelSetterChannelClient, FollowerLogService } from 'vs/platform/log/common/logIpc';
|
||||
import { LoggerChannelClient, FollowerLogService } from 'vs/platform/log/common/logIpc';
|
||||
import { ILogService, getLogLevel } from 'vs/platform/log/common/log';
|
||||
import { OcticonLabel } from 'vs/base/browser/ui/octiconLabel/octiconLabel';
|
||||
import { normalizeGitHubUrl } from 'vs/code/electron-browser/issue/issueReporterUtil';
|
||||
|
@ -300,8 +300,8 @@ export class IssueReporter extends Disposable {
|
|||
this.environmentService = new EnvironmentService(configuration, configuration.execPath);
|
||||
|
||||
const logService = new SpdLogService(`issuereporter${configuration.windowId}`, this.environmentService.logsPath, getLogLevel(this.environmentService));
|
||||
const logLevelClient = new LogLevelSetterChannelClient(mainProcessService.getChannel('loglevel'));
|
||||
this.logService = new FollowerLogService(logLevelClient, logService);
|
||||
const loggerClient = new LoggerChannelClient(mainProcessService.getChannel('logger'));
|
||||
this.logService = new FollowerLogService(loggerClient, logService);
|
||||
|
||||
const sharedProcess = (<IWindowsService>serviceCollection.get(IWindowsService)).whenSharedProcessReady()
|
||||
.then(() => connectNet(this.environmentService.sharedIPCHandle, `window:${configuration.windowId}`));
|
||||
|
|
|
@ -30,7 +30,7 @@ import { IWindowsService, ActiveWindowManager } from 'vs/platform/windows/common
|
|||
import { WindowsService } from 'vs/platform/windows/electron-browser/windowsService';
|
||||
import { ipcRenderer } from 'electron';
|
||||
import { ILogService, LogLevel } from 'vs/platform/log/common/log';
|
||||
import { LogLevelSetterChannelClient, FollowerLogService } from 'vs/platform/log/common/logIpc';
|
||||
import { LoggerChannelClient, FollowerLogService } from 'vs/platform/log/common/logIpc';
|
||||
import { LocalizationsService } from 'vs/platform/localizations/node/localizations';
|
||||
import { ILocalizationsService } from 'vs/platform/localizations/common/localizations';
|
||||
import { LocalizationsChannel } from 'vs/platform/localizations/node/localizationsIpc';
|
||||
|
@ -101,8 +101,8 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat
|
|||
const environmentService = new EnvironmentService(initData.args, process.execPath);
|
||||
|
||||
const mainRouter = new StaticRouter(ctx => ctx === 'main');
|
||||
const logLevelClient = new LogLevelSetterChannelClient(server.getChannel('loglevel', mainRouter));
|
||||
const logService = new FollowerLogService(logLevelClient, new SpdLogService('sharedprocess', environmentService.logsPath, initData.logLevel));
|
||||
const loggerClient = new LoggerChannelClient(server.getChannel('logger', mainRouter));
|
||||
const logService = new FollowerLogService(loggerClient, new SpdLogService('sharedprocess', environmentService.logsPath, initData.logLevel));
|
||||
disposables.add(logService);
|
||||
logService.info('main', JSON.stringify(configuration));
|
||||
|
||||
|
@ -145,7 +145,7 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat
|
|||
const services = new ServiceCollection();
|
||||
const environmentService = accessor.get(IEnvironmentService);
|
||||
const { appRoot, extensionsPath, extensionDevelopmentLocationURI: extensionDevelopmentLocationURI, isBuilt, installSourcePath } = environmentService;
|
||||
const telemetryLogService = new FollowerLogService(logLevelClient, new SpdLogService('telemetry', environmentService.logsPath, initData.logLevel));
|
||||
const telemetryLogService = new FollowerLogService(loggerClient, new SpdLogService('telemetry', environmentService.logsPath, initData.logLevel));
|
||||
telemetryLogService.info('The below are logs for every telemetry event sent from VS Code once the log level is set to trace.');
|
||||
telemetryLogService.info('===========================================================');
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import { TelemetryAppenderClient } from 'vs/platform/telemetry/node/telemetryIpc
|
|||
import { TelemetryService, ITelemetryServiceConfig } from 'vs/platform/telemetry/common/telemetryService';
|
||||
import { resolveCommonProperties } from 'vs/platform/telemetry/node/commonProperties';
|
||||
import { getDelayedChannel, StaticRouter } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { SimpleServiceProxyChannel } from 'vs/platform/ipc/node/simpleIpcProxy';
|
||||
import product from 'vs/platform/product/common/product';
|
||||
import { ProxyAuthHandler } from 'vs/code/electron-main/auth';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
|
@ -45,9 +46,8 @@ import { Win32UpdateService } from 'vs/platform/update/electron-main/updateServi
|
|||
import { LinuxUpdateService } from 'vs/platform/update/electron-main/updateService.linux';
|
||||
import { DarwinUpdateService } from 'vs/platform/update/electron-main/updateService.darwin';
|
||||
import { IIssueService } from 'vs/platform/issue/node/issue';
|
||||
import { IssueChannel } from 'vs/platform/issue/electron-main/issueIpc';
|
||||
import { IssueMainService } from 'vs/platform/issue/electron-main/issueMainService';
|
||||
import { LogLevelSetterChannel } from 'vs/platform/log/common/logIpc';
|
||||
import { LoggerChannel } from 'vs/platform/log/common/logIpc';
|
||||
import { setUnexpectedErrorHandler, onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { ElectronURLListener } from 'vs/platform/url/electron-main/electronUrlListener';
|
||||
import { serve as serveDriver } from 'vs/platform/driver/electron-main/driver';
|
||||
|
@ -77,7 +77,7 @@ import { IFileService } from 'vs/platform/files/common/files';
|
|||
import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider';
|
||||
import { ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc';
|
||||
import { IElectronService } from 'vs/platform/electron/node/electron';
|
||||
import { ElectronMainService, ElectronChannel } from 'vs/platform/electron/electron-main/electronMainService';
|
||||
import { ElectronMainService } from 'vs/platform/electron/electron-main/electronMainService';
|
||||
|
||||
export class CodeApplication extends Disposable {
|
||||
|
||||
|
@ -92,7 +92,7 @@ export class CodeApplication extends Disposable {
|
|||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@ILogService private readonly logService: ILogService,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@ILifecycleMainService private readonly lifecycleService: ILifecycleMainService,
|
||||
@ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService,
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@IStateService private readonly stateService: IStateService
|
||||
) {
|
||||
|
@ -109,7 +109,7 @@ export class CodeApplication extends Disposable {
|
|||
process.on('unhandledRejection', (reason: unknown) => onUnexpectedError(reason));
|
||||
|
||||
// Dispose on shutdown
|
||||
this.lifecycleService.onWillShutdown(() => this.dispose());
|
||||
this.lifecycleMainService.onWillShutdown(() => this.dispose());
|
||||
|
||||
// Contextmenu via IPC support
|
||||
registerContextMenuListener();
|
||||
|
@ -255,7 +255,7 @@ export class CodeApplication extends Disposable {
|
|||
this.logService.trace('IPC#vscode:exit', code);
|
||||
|
||||
this.dispose();
|
||||
this.lifecycleService.kill(code);
|
||||
this.lifecycleMainService.kill(code);
|
||||
});
|
||||
|
||||
ipc.on('vscode:fetchShellEnv', async (event: Electron.IpcMainEvent) => {
|
||||
|
@ -282,7 +282,7 @@ export class CodeApplication extends Disposable {
|
|||
|
||||
// Some listeners after window opened
|
||||
(async () => {
|
||||
await this.lifecycleService.when(LifecycleMainPhase.AfterWindowOpen);
|
||||
await this.lifecycleMainService.when(LifecycleMainPhase.AfterWindowOpen);
|
||||
|
||||
// After waking up from sleep (after window opened)
|
||||
powerMonitor.on('resume', () => {
|
||||
|
@ -361,7 +361,7 @@ export class CodeApplication extends Disposable {
|
|||
// Spawn shared process after the first window has opened and 3s have passed
|
||||
const sharedProcess = this.instantiationService.createInstance(SharedProcess, machineId, this.userEnv);
|
||||
const sharedProcessClient = sharedProcess.whenReady().then(() => connect(this.environmentService.sharedIPCHandle, 'main'));
|
||||
this.lifecycleService.when(LifecycleMainPhase.AfterWindowOpen).then(() => {
|
||||
this.lifecycleMainService.when(LifecycleMainPhase.AfterWindowOpen).then(() => {
|
||||
this._register(new RunOnceScheduler(async () => {
|
||||
const userEnv = await getShellEnvironment(this.logService, this.environmentService);
|
||||
|
||||
|
@ -461,7 +461,7 @@ export class CodeApplication extends Disposable {
|
|||
|
||||
const storageMainService = new StorageMainService(this.logService, this.environmentService);
|
||||
services.set(IStorageMainService, storageMainService);
|
||||
this.lifecycleService.onWillShutdown(e => e.join(storageMainService.close()));
|
||||
this.lifecycleMainService.onWillShutdown(e => e.join(storageMainService.close()));
|
||||
|
||||
const backupMainService = new BackupMainService(this.environmentService, this.configurationService, this.logService);
|
||||
services.set(IBackupMainService, backupMainService);
|
||||
|
@ -529,8 +529,8 @@ export class CodeApplication extends Disposable {
|
|||
private openFirstWindow(accessor: ServicesAccessor, electronIpcServer: ElectronIPCServer, sharedProcessClient: Promise<Client<string>>): ICodeWindow[] {
|
||||
|
||||
// Register more Main IPC services
|
||||
const launchService = accessor.get(ILaunchMainService);
|
||||
const launchChannel = new LaunchChannel(launchService);
|
||||
const launchMainService = accessor.get(ILaunchMainService);
|
||||
const launchChannel = new LaunchChannel(launchMainService);
|
||||
this.mainIpcServer.registerChannel('launch', launchChannel);
|
||||
|
||||
// Register more Electron IPC services
|
||||
|
@ -539,15 +539,15 @@ export class CodeApplication extends Disposable {
|
|||
electronIpcServer.registerChannel('update', updateChannel);
|
||||
|
||||
const issueService = accessor.get(IIssueService);
|
||||
const issueChannel = new IssueChannel(issueService);
|
||||
const issueChannel = new SimpleServiceProxyChannel(issueService);
|
||||
electronIpcServer.registerChannel('issue', issueChannel);
|
||||
|
||||
const electronService = accessor.get(IElectronService);
|
||||
const electronChannel = new ElectronChannel(electronService);
|
||||
const electronChannel = new SimpleServiceProxyChannel(electronService);
|
||||
electronIpcServer.registerChannel('electron', electronChannel);
|
||||
|
||||
const workspacesService = accessor.get(IWorkspacesMainService);
|
||||
const workspacesChannel = new WorkspacesChannel(workspacesService);
|
||||
const workspacesMainService = accessor.get(IWorkspacesMainService);
|
||||
const workspacesChannel = new WorkspacesChannel(workspacesMainService);
|
||||
electronIpcServer.registerChannel('workspaces', workspacesChannel);
|
||||
|
||||
const windowsService = accessor.get(IWindowsService);
|
||||
|
@ -567,15 +567,15 @@ export class CodeApplication extends Disposable {
|
|||
const storageChannel = this._register(new GlobalStorageDatabaseChannel(this.logService, storageMainService));
|
||||
electronIpcServer.registerChannel('storage', storageChannel);
|
||||
|
||||
const logLevelChannel = new LogLevelSetterChannel(accessor.get(ILogService));
|
||||
electronIpcServer.registerChannel('loglevel', logLevelChannel);
|
||||
sharedProcessClient.then(client => client.registerChannel('loglevel', logLevelChannel));
|
||||
const loggerChannel = new LoggerChannel(accessor.get(ILogService));
|
||||
electronIpcServer.registerChannel('logger', loggerChannel);
|
||||
sharedProcessClient.then(client => client.registerChannel('logger', loggerChannel));
|
||||
|
||||
// ExtensionHost Debug broadcast service
|
||||
electronIpcServer.registerChannel(ExtensionHostDebugBroadcastChannel.ChannelName, new ExtensionHostDebugBroadcastChannel());
|
||||
|
||||
// Signal phase: ready (services set)
|
||||
this.lifecycleService.phase = LifecycleMainPhase.Ready;
|
||||
this.lifecycleMainService.phase = LifecycleMainPhase.Ready;
|
||||
|
||||
// Propagate to clients
|
||||
const windowsMainService = this.windowsMainService = accessor.get(IWindowsMainService);
|
||||
|
@ -685,7 +685,7 @@ export class CodeApplication extends Disposable {
|
|||
private afterWindowOpen(): void {
|
||||
|
||||
// Signal phase: after window open
|
||||
this.lifecycleService.phase = LifecycleMainPhase.AfterWindowOpen;
|
||||
this.lifecycleMainService.phase = LifecycleMainPhase.AfterWindowOpen;
|
||||
|
||||
// Remote Authorities
|
||||
this.handleRemoteAuthorities();
|
||||
|
|
|
@ -116,13 +116,13 @@ class CodeMain {
|
|||
await instantiationService.invokeFunction(async accessor => {
|
||||
const environmentService = accessor.get(IEnvironmentService);
|
||||
const logService = accessor.get(ILogService);
|
||||
const lifecycleService = accessor.get(ILifecycleMainService);
|
||||
const lifecycleMainService = accessor.get(ILifecycleMainService);
|
||||
const configurationService = accessor.get(IConfigurationService);
|
||||
|
||||
const mainIpcServer = await this.doStartup(logService, environmentService, lifecycleService, instantiationService, true);
|
||||
const mainIpcServer = await this.doStartup(logService, environmentService, lifecycleMainService, instantiationService, true);
|
||||
|
||||
bufferLogService.logger = new SpdLogService('main', environmentService.logsPath, bufferLogService.getLevel());
|
||||
once(lifecycleService.onWillShutdown)(() => (configurationService as ConfigurationService).dispose());
|
||||
once(lifecycleMainService.onWillShutdown)(() => (configurationService as ConfigurationService).dispose());
|
||||
|
||||
return instantiationService.createInstance(CodeApplication, mainIpcServer, instanceEnvironment).startup();
|
||||
});
|
||||
|
@ -189,7 +189,7 @@ class CodeMain {
|
|||
return instanceEnvironment;
|
||||
}
|
||||
|
||||
private async doStartup(logService: ILogService, environmentService: IEnvironmentService, lifecycleService: ILifecycleMainService, instantiationService: IInstantiationService, retry: boolean): Promise<Server> {
|
||||
private async doStartup(logService: ILogService, environmentService: IEnvironmentService, lifecycleMainService: ILifecycleMainService, instantiationService: IInstantiationService, retry: boolean): Promise<Server> {
|
||||
|
||||
// Try to setup a server for running. If that succeeds it means
|
||||
// we are the first instance to startup. Otherwise it is likely
|
||||
|
@ -197,7 +197,7 @@ class CodeMain {
|
|||
let server: Server;
|
||||
try {
|
||||
server = await serve(environmentService.mainIPCHandle);
|
||||
once(lifecycleService.onWillShutdown)(() => server.dispose());
|
||||
once(lifecycleMainService.onWillShutdown)(() => server.dispose());
|
||||
} catch (error) {
|
||||
|
||||
// Handle unexpected errors (the only expected error is EADDRINUSE that
|
||||
|
@ -245,7 +245,7 @@ class CodeMain {
|
|||
throw error;
|
||||
}
|
||||
|
||||
return this.doStartup(logService, environmentService, lifecycleService, instantiationService, false);
|
||||
return this.doStartup(logService, environmentService, lifecycleMainService, instantiationService, false);
|
||||
}
|
||||
|
||||
// Tests from CLI require to be the only instance currently
|
||||
|
@ -374,7 +374,7 @@ class CodeMain {
|
|||
|
||||
private quit(accessor: ServicesAccessor, reason?: ExpectedError | Error): void {
|
||||
const logService = accessor.get(ILogService);
|
||||
const lifecycleService = accessor.get(ILifecycleMainService);
|
||||
const lifecycleMainService = accessor.get(ILifecycleMainService);
|
||||
|
||||
let exitCode = 0;
|
||||
|
||||
|
@ -394,7 +394,7 @@ class CodeMain {
|
|||
}
|
||||
}
|
||||
|
||||
lifecycleService.kill(exitCode);
|
||||
lifecycleMainService.kill(exitCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ export class SharedProcess implements ISharedProcess {
|
|||
private readonly machineId: string,
|
||||
private userEnv: NodeJS.ProcessEnv,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@ILifecycleMainService private readonly lifecycleService: ILifecycleMainService,
|
||||
@ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService,
|
||||
@ILogService private readonly logService: ILogService,
|
||||
@IThemeMainService private readonly themeMainService: IThemeMainService
|
||||
) { }
|
||||
|
@ -68,7 +68,7 @@ export class SharedProcess implements ISharedProcess {
|
|||
|
||||
const disposables = new DisposableStore();
|
||||
|
||||
this.lifecycleService.onWillShutdown(() => {
|
||||
this.lifecycleMainService.onWillShutdown(() => {
|
||||
disposables.dispose();
|
||||
|
||||
// Shut the shared process down when we are quitting
|
||||
|
|
|
@ -188,7 +188,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
@ILogService private readonly logService: ILogService,
|
||||
@IStateService private readonly stateService: IStateService,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@ILifecycleMainService private readonly lifecycleService: ILifecycleMainService,
|
||||
@ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService,
|
||||
@IBackupMainService private readonly backupMainService: IBackupMainService,
|
||||
@ITelemetryService private readonly telemetryService: ITelemetryService,
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
|
@ -207,8 +207,8 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
this.dialogs = new Dialogs(stateService, this);
|
||||
this.workspacesManager = new WorkspacesManager(workspacesMainService, backupMainService, this);
|
||||
|
||||
this.lifecycleService.when(LifecycleMainPhase.Ready).then(() => this.registerListeners());
|
||||
this.lifecycleService.when(LifecycleMainPhase.AfterWindowOpen).then(() => this.installWindowsMutex());
|
||||
this.lifecycleMainService.when(LifecycleMainPhase.Ready).then(() => this.registerListeners());
|
||||
this.lifecycleMainService.when(LifecycleMainPhase.AfterWindowOpen).then(() => this.installWindowsMutex());
|
||||
}
|
||||
|
||||
private installWindowsMutex(): void {
|
||||
|
@ -217,7 +217,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
try {
|
||||
const WindowsMutex = (require.__$__nodeRequire('windows-mutex') as typeof import('windows-mutex')).Mutex;
|
||||
const mutex = new WindowsMutex(win32MutexName);
|
||||
once(this.lifecycleService.onWillShutdown)(() => mutex.release());
|
||||
once(this.lifecycleMainService.onWillShutdown)(() => mutex.release());
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
|
@ -251,8 +251,8 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
}
|
||||
|
||||
// Handle various lifecycle events around windows
|
||||
this.lifecycleService.onBeforeWindowClose(window => this.onBeforeWindowClose(window));
|
||||
this.lifecycleService.onBeforeShutdown(() => this.onBeforeShutdown());
|
||||
this.lifecycleMainService.onBeforeWindowClose(window => this.onBeforeWindowClose(window));
|
||||
this.lifecycleMainService.onBeforeShutdown(() => this.onBeforeShutdown());
|
||||
this.onWindowsCountChanged(e => {
|
||||
if (e.newCount - e.oldCount > 0) {
|
||||
// clear last closed window state when a new window opens. this helps on macOS where
|
||||
|
@ -340,7 +340,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
|
||||
// See note on #onBeforeShutdown() for details how these events are flowing
|
||||
private onBeforeWindowClose(win: ICodeWindow): void {
|
||||
if (this.lifecycleService.quitRequested) {
|
||||
if (this.lifecycleMainService.quitRequested) {
|
||||
return; // during quit, many windows close in parallel so let it be handled in the before-quit handler
|
||||
}
|
||||
|
||||
|
@ -985,7 +985,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
|
||||
private getRestoreWindowsSetting(): RestoreWindowsSetting {
|
||||
let restoreWindows: RestoreWindowsSetting;
|
||||
if (this.lifecycleService.wasRestarted) {
|
||||
if (this.lifecycleMainService.wasRestarted) {
|
||||
restoreWindows = 'all'; // always reopen all windows when an update was applied
|
||||
} else {
|
||||
const windowConfig = this.configurationService.getValue<IWindowSettings>('window');
|
||||
|
@ -1328,7 +1328,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
|
||||
// Window state is from a previous session: only allow fullscreen when we got updated or user wants to restore
|
||||
else {
|
||||
allowFullscreen = this.lifecycleService.wasRestarted || (windowConfig && windowConfig.restoreFullscreen);
|
||||
allowFullscreen = this.lifecycleMainService.wasRestarted || (windowConfig && windowConfig.restoreFullscreen);
|
||||
}
|
||||
|
||||
if (state.mode === WindowMode.Fullscreen && !allowFullscreen) {
|
||||
|
@ -1364,7 +1364,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
window.win.on('closed', () => this.onWindowClosed(window!));
|
||||
|
||||
// Lifecycle
|
||||
(this.lifecycleService as LifecycleMainService).registerWindow(window);
|
||||
(this.lifecycleMainService as LifecycleMainService).registerWindow(window);
|
||||
}
|
||||
|
||||
// Existing window
|
||||
|
@ -1387,7 +1387,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
// first and only load the new configuration if that was
|
||||
// not vetoed
|
||||
if (window.isReady) {
|
||||
this.lifecycleService.unload(window, UnloadReason.LOAD).then(veto => {
|
||||
this.lifecycleMainService.unload(window, UnloadReason.LOAD).then(veto => {
|
||||
if (!veto) {
|
||||
this.doOpenInBrowserWindow(window!, configuration, options);
|
||||
}
|
||||
|
@ -1554,7 +1554,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
async reload(win: ICodeWindow, cli?: ParsedArgs): Promise<void> {
|
||||
|
||||
// Only reload when the window has not vetoed this
|
||||
const veto = await this.lifecycleService.unload(win, UnloadReason.RELOAD);
|
||||
const veto = await this.lifecycleMainService.unload(win, UnloadReason.RELOAD);
|
||||
if (!veto) {
|
||||
win.reload(undefined, cli);
|
||||
}
|
||||
|
@ -1866,7 +1866,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||
// Otherwise: normal quit
|
||||
else {
|
||||
setTimeout(() => {
|
||||
this.lifecycleService.quit();
|
||||
this.lifecycleMainService.quit();
|
||||
}, 10 /* delay to unwind callback stack (IPC) */);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import { whenDeleted, writeFileSync } from 'vs/base/node/pfs';
|
|||
import { findFreePort, randomPort } from 'vs/base/node/ports';
|
||||
import { resolveTerminalEncoding } from 'vs/base/node/encoding';
|
||||
import * as iconv from 'iconv-lite';
|
||||
import { isWindows } from 'vs/base/common/platform';
|
||||
import { isWindows, isLinux } from 'vs/base/common/platform';
|
||||
import { ProfilingSession, Target } from 'v8-inspect-profiler';
|
||||
import { isString } from 'vs/base/common/types';
|
||||
|
||||
|
@ -360,6 +360,10 @@ export async function main(argv: string[]): Promise<any> {
|
|||
options['stdio'] = 'ignore';
|
||||
}
|
||||
|
||||
if (isLinux) {
|
||||
addArg(argv, '--no-sandbox'); // Electron 6 introduces a chrome-sandbox that requires root to run. This can fail. Disable sandbox via --no-sandbox
|
||||
}
|
||||
|
||||
const child = spawn(process.execPath, argv.slice(2), options);
|
||||
|
||||
if (args.wait && waitMarkerFilePath) {
|
||||
|
|
|
@ -13,7 +13,7 @@ import { equalsIgnoreCase } from 'vs/base/common/strings';
|
|||
import { URI } from 'vs/base/common/uri';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IOpener, IOpenerService, IValidator } from 'vs/platform/opener/common/opener';
|
||||
import { IOpener, IOpenerService, IValidator, IExternalUriResolver } from 'vs/platform/opener/common/opener';
|
||||
|
||||
export class OpenerService extends Disposable implements IOpenerService {
|
||||
|
||||
|
@ -21,6 +21,7 @@ export class OpenerService extends Disposable implements IOpenerService {
|
|||
|
||||
private readonly _openers = new LinkedList<IOpener>();
|
||||
private readonly _validators = new LinkedList<IValidator>();
|
||||
private readonly _resolvers = new LinkedList<IExternalUriResolver>();
|
||||
|
||||
constructor(
|
||||
@ICodeEditorService private readonly _editorService: ICodeEditorService,
|
||||
|
@ -39,6 +40,11 @@ export class OpenerService extends Disposable implements IOpenerService {
|
|||
return { dispose: remove };
|
||||
}
|
||||
|
||||
registerExternalUriResolver(resolver: IExternalUriResolver): IDisposable {
|
||||
const remove = this._resolvers.push(resolver);
|
||||
return { dispose: remove };
|
||||
}
|
||||
|
||||
async open(resource: URI, options?: { openToSide?: boolean, openExternal?: boolean }): Promise<boolean> {
|
||||
// no scheme ?!?
|
||||
if (!resource.scheme) {
|
||||
|
@ -118,7 +124,11 @@ export class OpenerService extends Disposable implements IOpenerService {
|
|||
}
|
||||
}
|
||||
|
||||
private _doOpenExternal(resource: URI): Promise<boolean> {
|
||||
private async _doOpenExternal(resource: URI): Promise<boolean> {
|
||||
for (const resolver of this._resolvers.toArray()) {
|
||||
resource = await resolver.resolveExternalUri(resource);
|
||||
}
|
||||
|
||||
dom.windowOpenNoOpener(encodeURI(resource.toString(true)));
|
||||
|
||||
return Promise.resolve(true);
|
||||
|
|
|
@ -93,6 +93,7 @@ export const enum MenuId {
|
|||
SearchContext,
|
||||
StatusBarWindowIndicatorMenu,
|
||||
TouchBarContext,
|
||||
TitleBarContext,
|
||||
ViewItemContext,
|
||||
ViewTitle,
|
||||
CommentThreadTitle,
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IRemoteConsoleLog } from 'vs/base/common/console';
|
||||
import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
|
||||
export const IExtensionHostDebugService = createDecorator<IExtensionHostDebugService>('extensionHostDebugService');
|
||||
|
||||
|
@ -37,17 +39,19 @@ export interface IExtensionHostDebugService {
|
|||
_serviceBrand: undefined;
|
||||
|
||||
reload(sessionId: string): void;
|
||||
onReload: Event<IReloadSessionEvent>;
|
||||
readonly onReload: Event<IReloadSessionEvent>;
|
||||
|
||||
close(sessionId: string): void;
|
||||
onClose: Event<ICloseSessionEvent>;
|
||||
readonly onClose: Event<ICloseSessionEvent>;
|
||||
|
||||
attachSession(sessionId: string, port: number, subId?: string): void;
|
||||
onAttachSession: Event<IAttachSessionEvent>;
|
||||
readonly onAttachSession: Event<IAttachSessionEvent>;
|
||||
|
||||
logToSession(sessionId: string, log: IRemoteConsoleLog): void;
|
||||
onLogToSession: Event<ILogToSessionEvent>;
|
||||
readonly onLogToSession: Event<ILogToSessionEvent>;
|
||||
|
||||
terminateSession(sessionId: string, subId?: string): void;
|
||||
onTerminateSession: Event<ITerminateSessionEvent>;
|
||||
}
|
||||
readonly onTerminateSession: Event<ITerminateSessionEvent>;
|
||||
|
||||
openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise<void>;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ import { IReloadSessionEvent, ICloseSessionEvent, IAttachSessionEvent, ILogToSes
|
|||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IRemoteConsoleLog } from 'vs/base/common/console';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
|
||||
export class ExtensionHostDebugBroadcastChannel<TContext> implements IServerChannel<TContext> {
|
||||
|
||||
|
@ -99,4 +101,10 @@ export class ExtensionHostDebugChannelClient extends Disposable implements IExte
|
|||
get onTerminateSession(): Event<ITerminateSessionEvent> {
|
||||
return this.channel.listen('terminate');
|
||||
}
|
||||
}
|
||||
|
||||
openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise<void> {
|
||||
// TODO@Isidor
|
||||
//return this.channel.call('openExtensionDevelopmentHostWindow', [args, env]);
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ export class Driver implements IDriver, IWindowDriverRegistry {
|
|||
constructor(
|
||||
private windowServer: IPCServer,
|
||||
private options: IDriverOptions,
|
||||
@IWindowsMainService private readonly windowsService: IWindowsMainService
|
||||
@IWindowsMainService private readonly windowsMainService: IWindowsMainService
|
||||
) { }
|
||||
|
||||
async registerWindowDriver(windowId: number): Promise<IDriverOptions> {
|
||||
|
@ -49,7 +49,7 @@ export class Driver implements IDriver, IWindowDriverRegistry {
|
|||
}
|
||||
|
||||
async getWindowIds(): Promise<number[]> {
|
||||
return this.windowsService.getWindows()
|
||||
return this.windowsMainService.getWindows()
|
||||
.map(w => w.id)
|
||||
.filter(id => this.registeredWindowIds.has(id) && !this.reloadingWindowIds.has(id));
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ export class Driver implements IDriver, IWindowDriverRegistry {
|
|||
async capturePage(windowId: number): Promise<string> {
|
||||
await this.whenUnfrozen(windowId);
|
||||
|
||||
const window = this.windowsService.getWindowById(windowId);
|
||||
const window = this.windowsMainService.getWindowById(windowId);
|
||||
if (!window) {
|
||||
throw new Error('Invalid window');
|
||||
}
|
||||
|
@ -69,16 +69,16 @@ export class Driver implements IDriver, IWindowDriverRegistry {
|
|||
async reloadWindow(windowId: number): Promise<void> {
|
||||
await this.whenUnfrozen(windowId);
|
||||
|
||||
const window = this.windowsService.getWindowById(windowId);
|
||||
const window = this.windowsMainService.getWindowById(windowId);
|
||||
if (!window) {
|
||||
throw new Error('Invalid window');
|
||||
}
|
||||
this.reloadingWindowIds.add(windowId);
|
||||
this.windowsService.reload(window);
|
||||
this.windowsMainService.reload(window);
|
||||
}
|
||||
|
||||
async exitApplication(): Promise<void> {
|
||||
return this.windowsService.quit();
|
||||
return this.windowsMainService.quit();
|
||||
}
|
||||
|
||||
async dispatchKeybinding(windowId: number, keybinding: string): Promise<void> {
|
||||
|
@ -96,7 +96,7 @@ export class Driver implements IDriver, IWindowDriverRegistry {
|
|||
throw new Error('ScanCodeBindings not supported');
|
||||
}
|
||||
|
||||
const window = this.windowsService.getWindowById(windowId);
|
||||
const window = this.windowsMainService.getWindowById(windowId);
|
||||
if (!window) {
|
||||
throw new Error('Invalid window');
|
||||
}
|
||||
|
|
|
@ -3,26 +3,15 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IElectronService } from 'vs/platform/electron/node/electron';
|
||||
import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
|
||||
import { createSimpleChannelProxy } from 'vs/platform/ipc/node/simpleIpcProxy';
|
||||
|
||||
export class ElectronService {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(@IMainProcessService mainProcessService: IMainProcessService) {
|
||||
const channel = mainProcessService.getChannel('electron');
|
||||
|
||||
// Proxy: forward any property access to the channel
|
||||
return new Proxy({}, {
|
||||
get(_target, propKey, _receiver) {
|
||||
if (typeof propKey === 'string') {
|
||||
return function (...args: any[]) {
|
||||
return channel.call(propKey, ...args);
|
||||
};
|
||||
}
|
||||
|
||||
throw new Error(`Not Implemented in ElectronService: ${String(propKey)}`);
|
||||
}
|
||||
}) as ElectronService;
|
||||
return createSimpleChannelProxy<IElectronService>(mainProcessService.getChannel('electron'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
|
||||
import { IElectronService } from 'vs/platform/electron/node/electron';
|
||||
import { IWindowsMainService, ICodeWindow } from 'vs/platform/windows/electron-main/windows';
|
||||
import { MessageBoxOptions, MessageBoxReturnValue } from 'electron';
|
||||
import { IServerChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { MessageBoxOptions, MessageBoxReturnValue, shell } from 'electron';
|
||||
|
||||
export class ElectronMainService implements IElectronService {
|
||||
|
||||
|
@ -18,10 +16,20 @@ export class ElectronMainService implements IElectronService {
|
|||
) {
|
||||
}
|
||||
|
||||
//#region Window
|
||||
|
||||
private get window(): ICodeWindow | undefined {
|
||||
return this.windowsMainService.getFocusedWindow() || this.windowsMainService.getLastActiveWindow();
|
||||
}
|
||||
|
||||
async windowCount(): Promise<number> {
|
||||
return this.windowsMainService.getWindowCount();
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Other
|
||||
|
||||
async showMessageBox(options: MessageBoxOptions): Promise<MessageBoxReturnValue> {
|
||||
const result = await this.windowsMainService.showMessageBox(options, this.window);
|
||||
|
||||
|
@ -30,30 +38,10 @@ export class ElectronMainService implements IElectronService {
|
|||
checkboxChecked: !!result.checkboxChecked
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export class ElectronChannel implements IServerChannel {
|
||||
|
||||
private service: { [key: string]: unknown };
|
||||
|
||||
constructor(service: IElectronService) {
|
||||
this.service = service as unknown as { [key: string]: unknown };
|
||||
}
|
||||
|
||||
listen<T>(_: unknown, event: string): Event<T> {
|
||||
throw new Error(`Event not found: ${event}`);
|
||||
}
|
||||
|
||||
call(_: unknown, command: string, arg?: any): Promise<any> {
|
||||
const target = this.service[command];
|
||||
if (typeof target === 'function') {
|
||||
if (Array.isArray(arg)) {
|
||||
return target.apply(this.service, arg);
|
||||
}
|
||||
|
||||
return target.call(this.service, arg);
|
||||
}
|
||||
|
||||
throw new Error(`Call Not Found in ElectronService: ${command}`);
|
||||
}
|
||||
|
||||
async showItemInFolder(path: string): Promise<void> {
|
||||
shell.showItemInFolder(path);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
}
|
||||
|
|
|
@ -12,6 +12,12 @@ export interface IElectronService {
|
|||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
// Window
|
||||
windowCount(): Promise<number>;
|
||||
|
||||
// Dialogs
|
||||
showMessageBox(options: MessageBoxOptions): Promise<MessageBoxReturnValue>;
|
||||
|
||||
// OS
|
||||
showItemInFolder(path: string): Promise<void>;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
|
|||
export const IHistoryMainService = createDecorator<IHistoryMainService>('historyMainService');
|
||||
|
||||
export interface IHistoryMainService {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onRecentlyOpenedChange: CommonEvent<void>;
|
||||
|
@ -68,11 +69,11 @@ export class HistoryMainService implements IHistoryMainService {
|
|||
@ILogService private readonly logService: ILogService,
|
||||
@IWorkspacesMainService private readonly workspacesMainService: IWorkspacesMainService,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@ILifecycleMainService lifecycleService: ILifecycleMainService
|
||||
@ILifecycleMainService lifecycleMainService: ILifecycleMainService
|
||||
) {
|
||||
this.macOSRecentDocumentsUpdater = new ThrottledDelayer<void>(800);
|
||||
|
||||
lifecycleService.when(LifecycleMainPhase.AfterWindowOpen).then(() => this.handleWindowsJumpList());
|
||||
lifecycleMainService.when(LifecycleMainPhase.AfterWindowOpen).then(() => this.handleWindowsJumpList());
|
||||
}
|
||||
|
||||
private handleWindowsJumpList(): void {
|
||||
|
|
48
src/vs/platform/ipc/node/simpleIpcProxy.ts
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
|
||||
//
|
||||
// Use both `SimpleServiceProxyChannel` and `createSimpleChannelProxy`
|
||||
// for a very basic process <=> process communication over methods.
|
||||
//
|
||||
|
||||
export class SimpleServiceProxyChannel implements IServerChannel {
|
||||
|
||||
private service: { [key: string]: unknown };
|
||||
|
||||
constructor(service: unknown) {
|
||||
this.service = service as { [key: string]: unknown };
|
||||
}
|
||||
|
||||
listen<T>(_: unknown, event: string): Event<T> {
|
||||
throw new Error(`Events are currently unsupported by SimpleServiceProxyChannel: ${event}`);
|
||||
}
|
||||
|
||||
call(_: unknown, command: string, args: any[]): Promise<any> {
|
||||
const target = this.service[command];
|
||||
if (typeof target === 'function') {
|
||||
return target.apply(this.service, args);
|
||||
}
|
||||
|
||||
throw new Error(`Method not found: ${command}`);
|
||||
}
|
||||
}
|
||||
|
||||
export function createSimpleChannelProxy<T>(channel: IChannel): T {
|
||||
return new Proxy({}, {
|
||||
get(_target, propKey, _receiver) {
|
||||
if (typeof propKey === 'string') {
|
||||
return function (...args: any[]) {
|
||||
return channel.call(propKey, args);
|
||||
};
|
||||
}
|
||||
|
||||
throw new Error(`Unable to provide main channel proxy implementation for: ${String(propKey)}`);
|
||||
}
|
||||
}) as T;
|
||||
}
|
|
@ -3,29 +3,15 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { IIssueService, IssueReporterData, ProcessExplorerData } from 'vs/platform/issue/node/issue';
|
||||
import { IIssueService } from 'vs/platform/issue/node/issue';
|
||||
import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
|
||||
import { createSimpleChannelProxy } from 'vs/platform/ipc/node/simpleIpcProxy';
|
||||
|
||||
export class IssueService implements IIssueService {
|
||||
export class IssueService {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private channel: IChannel;
|
||||
|
||||
constructor(@IMainProcessService mainProcessService: IMainProcessService) {
|
||||
this.channel = mainProcessService.getChannel('issue');
|
||||
}
|
||||
|
||||
openReporter(data: IssueReporterData): Promise<void> {
|
||||
return this.channel.call('openIssueReporter', data);
|
||||
}
|
||||
|
||||
openProcessExplorer(data: ProcessExplorerData): Promise<void> {
|
||||
return this.channel.call('openProcessExplorer', data);
|
||||
}
|
||||
|
||||
getSystemStatus(): Promise<string> {
|
||||
return this.channel.call('getSystemStatus');
|
||||
return createSimpleChannelProxy<IIssueService>(mainProcessService.getChannel('issue'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IServerChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IIssueService } from 'vs/platform/issue/node/issue';
|
||||
|
||||
export class IssueChannel implements IServerChannel {
|
||||
|
||||
constructor(private service: IIssueService) { }
|
||||
|
||||
listen<T>(_: unknown, event: string): Event<T> {
|
||||
throw new Error(`Event not found: ${event}`);
|
||||
}
|
||||
|
||||
call(_: unknown, command: string, arg?: any): Promise<any> {
|
||||
switch (command) {
|
||||
case 'openIssueReporter':
|
||||
return this.service.openReporter(arg);
|
||||
case 'openProcessExplorer':
|
||||
return this.service.openProcessExplorer(arg);
|
||||
case 'getSystemStatus':
|
||||
return this.service.getSystemStatus();
|
||||
}
|
||||
|
||||
throw new Error(`Call not found: ${command}`);
|
||||
}
|
||||
}
|
|
@ -31,7 +31,7 @@ export class IssueMainService implements IIssueService {
|
|||
private machineId: string,
|
||||
private userEnv: IProcessEnvironment,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@ILaunchMainService private readonly launchService: ILaunchMainService,
|
||||
@ILaunchMainService private readonly launchMainService: ILaunchMainService,
|
||||
@ILogService private readonly logService: ILogService,
|
||||
@IDiagnosticsService private readonly diagnosticsService: IDiagnosticsService,
|
||||
@IWindowsService private readonly windowsService: IWindowsService
|
||||
|
@ -41,7 +41,7 @@ export class IssueMainService implements IIssueService {
|
|||
|
||||
private registerListeners(): void {
|
||||
ipcMain.on('vscode:issueSystemInfoRequest', async (event: Electron.IpcMainEvent) => {
|
||||
Promise.all([this.launchService.getMainProcessInfo(), this.launchService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })])
|
||||
Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })])
|
||||
.then(result => {
|
||||
const [info, remoteData] = result;
|
||||
this.diagnosticsService.getSystemInfo(info, remoteData).then(msg => {
|
||||
|
@ -54,9 +54,9 @@ export class IssueMainService implements IIssueService {
|
|||
const processes = [];
|
||||
|
||||
try {
|
||||
const mainPid = await this.launchService.getMainProcessId();
|
||||
const mainPid = await this.launchMainService.getMainProcessId();
|
||||
processes.push({ name: localize('local', "Local"), rootProcess: await listProcesses(mainPid) });
|
||||
(await this.launchService.getRemoteDiagnostics({ includeProcesses: true }))
|
||||
(await this.launchMainService.getRemoteDiagnostics({ includeProcesses: true }))
|
||||
.forEach(data => {
|
||||
if (isRemoteDiagnosticError(data)) {
|
||||
processes.push({
|
||||
|
@ -157,7 +157,7 @@ export class IssueMainService implements IIssueService {
|
|||
});
|
||||
|
||||
ipcMain.on('windowsInfoRequest', (event: Electron.IpcMainEvent) => {
|
||||
this.launchService.getMainProcessInfo().then(info => {
|
||||
this.launchMainService.getMainProcessInfo().then(info => {
|
||||
event.sender.send('vscode:windowsInfoResponse', info.windows);
|
||||
});
|
||||
});
|
||||
|
@ -268,7 +268,7 @@ export class IssueMainService implements IIssueService {
|
|||
}
|
||||
|
||||
public async getSystemStatus(): Promise<string> {
|
||||
return Promise.all([this.launchService.getMainProcessInfo(), this.launchService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })])
|
||||
return Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })])
|
||||
.then(result => {
|
||||
const [info, remoteData] = result;
|
||||
return this.diagnosticsService.getDiagnostics(info, remoteData);
|
||||
|
@ -345,7 +345,7 @@ export class IssueMainService implements IIssueService {
|
|||
|
||||
private getPerformanceInfo(): Promise<PerformanceInfo> {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
Promise.all([this.launchService.getMainProcessInfo(), this.launchService.getRemoteDiagnostics({ includeProcesses: true, includeWorkspaceMetadata: true })])
|
||||
Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: true, includeWorkspaceMetadata: true })])
|
||||
.then(result => {
|
||||
const [info, remoteData] = result;
|
||||
this.diagnosticsService.getPerformanceInfo(info, remoteData)
|
||||
|
|
|
@ -8,6 +8,7 @@ import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
|
|||
import { isWindows } from 'vs/base/common/platform';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { LoggerChannelClient } from 'vs/platform/log/common/logIpc';
|
||||
|
||||
export const ILogService = createServiceDecorator<ILogService>('logService');
|
||||
|
||||
|
@ -183,6 +184,54 @@ export class ConsoleLogService extends AbstractLogService implements ILogService
|
|||
dispose(): void { }
|
||||
}
|
||||
|
||||
export class ConsoleLogInMainService extends AbstractLogService implements ILogService {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private readonly client: LoggerChannelClient, logLevel: LogLevel = DEFAULT_LOG_LEVEL) {
|
||||
super();
|
||||
this.setLevel(logLevel);
|
||||
}
|
||||
|
||||
trace(message: string, ...args: any[]): void {
|
||||
if (this.getLevel() <= LogLevel.Trace) {
|
||||
this.client.consoleLog('trace', [message, ...args]);
|
||||
}
|
||||
}
|
||||
|
||||
debug(message: string, ...args: any[]): void {
|
||||
if (this.getLevel() <= LogLevel.Debug) {
|
||||
this.client.consoleLog('debug', [message, ...args]);
|
||||
}
|
||||
}
|
||||
|
||||
info(message: string, ...args: any[]): void {
|
||||
if (this.getLevel() <= LogLevel.Info) {
|
||||
this.client.consoleLog('info', [message, ...args]);
|
||||
}
|
||||
}
|
||||
|
||||
warn(message: string | Error, ...args: any[]): void {
|
||||
if (this.getLevel() <= LogLevel.Warning) {
|
||||
this.client.consoleLog('warn', [message, ...args]);
|
||||
}
|
||||
}
|
||||
|
||||
error(message: string, ...args: any[]): void {
|
||||
if (this.getLevel() <= LogLevel.Error) {
|
||||
this.client.consoleLog('error', [message, ...args]);
|
||||
}
|
||||
}
|
||||
|
||||
critical(message: string, ...args: any[]): void {
|
||||
if (this.getLevel() <= LogLevel.Critical) {
|
||||
this.client.consoleLog('critical', [message, ...args]);
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void { }
|
||||
}
|
||||
|
||||
export class MultiplexLogService extends AbstractLogService implements ILogService {
|
||||
_serviceBrand: undefined;
|
||||
|
||||
|
@ -326,4 +375,4 @@ export function getLogLevel(environmentService: IEnvironmentService): LogLevel {
|
|||
}
|
||||
}
|
||||
return DEFAULT_LOG_LEVEL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
|
|||
import { LogLevel, ILogService, DelegatedLogService } from 'vs/platform/log/common/log';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
|
||||
export class LogLevelSetterChannel implements IServerChannel {
|
||||
export class LoggerChannel implements IServerChannel {
|
||||
|
||||
onDidChangeLogLevel: Event<LogLevel>;
|
||||
|
||||
|
@ -26,13 +26,32 @@ export class LogLevelSetterChannel implements IServerChannel {
|
|||
call(_: unknown, command: string, arg?: any): Promise<any> {
|
||||
switch (command) {
|
||||
case 'setLevel': this.service.setLevel(arg); return Promise.resolve();
|
||||
case 'consoleLog': this.consoleLog(arg[0], arg[1]); return Promise.resolve();
|
||||
}
|
||||
|
||||
throw new Error(`Call not found: ${command}`);
|
||||
}
|
||||
|
||||
private consoleLog(severity: string, args: string[]): void {
|
||||
let consoleFn = console.log;
|
||||
|
||||
switch (severity) {
|
||||
case 'error':
|
||||
consoleFn = console.error;
|
||||
break;
|
||||
case 'warn':
|
||||
consoleFn = console.warn;
|
||||
break;
|
||||
case 'info':
|
||||
consoleFn = console.info;
|
||||
break;
|
||||
}
|
||||
|
||||
consoleFn.call(console, ...args);
|
||||
}
|
||||
}
|
||||
|
||||
export class LogLevelSetterChannelClient {
|
||||
export class LoggerChannelClient {
|
||||
|
||||
constructor(private channel: IChannel) { }
|
||||
|
||||
|
@ -43,12 +62,16 @@ export class LogLevelSetterChannelClient {
|
|||
setLevel(level: LogLevel): void {
|
||||
this.channel.call('setLevel', level);
|
||||
}
|
||||
|
||||
consoleLog(severity: string, args: string[]): void {
|
||||
this.channel.call('consoleLog', [severity, args]);
|
||||
}
|
||||
}
|
||||
|
||||
export class FollowerLogService extends DelegatedLogService implements ILogService {
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private master: LogLevelSetterChannelClient, logService: ILogService) {
|
||||
constructor(private master: LoggerChannelClient, logService: ILogService) {
|
||||
super(logService);
|
||||
this._register(master.onDidChangeLogLevel(level => logService.setLevel(level)));
|
||||
}
|
||||
|
@ -56,4 +79,4 @@ export class FollowerLogService extends DelegatedLogService implements ILogServi
|
|||
setLevel(level: LogLevel): void {
|
||||
this.master.setLevel(level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ export class Menubar {
|
|||
@ITelemetryService private readonly telemetryService: ITelemetryService,
|
||||
@IHistoryMainService private readonly historyMainService: IHistoryMainService,
|
||||
@IStateService private readonly stateService: IStateService,
|
||||
@ILifecycleMainService private readonly lifecycleService: ILifecycleMainService,
|
||||
@ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService,
|
||||
@ILogService private readonly logService: ILogService
|
||||
) {
|
||||
this.menuUpdater = new RunOnceScheduler(() => this.doUpdateMenu(), 0);
|
||||
|
@ -160,7 +160,7 @@ export class Menubar {
|
|||
|
||||
private registerListeners(): void {
|
||||
// Keep flag when app quits
|
||||
this.lifecycleService.onWillShutdown(() => this.willShutdown = true);
|
||||
this.lifecycleMainService.onWillShutdown(() => this.willShutdown = true);
|
||||
|
||||
// // Listen to some events from window service to update menu
|
||||
this.windowsMainService.onWindowsCountChanged(e => this.onWindowsCountChanged(e));
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
export const IOpenerService = createDecorator<IOpenerService>('openerService');
|
||||
|
||||
|
@ -18,6 +18,10 @@ export interface IValidator {
|
|||
shouldOpen(resource: URI): Promise<boolean>;
|
||||
}
|
||||
|
||||
export interface IExternalUriResolver {
|
||||
resolveExternalUri(resource: URI): Promise<URI>;
|
||||
}
|
||||
|
||||
export interface IOpenerService {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
@ -29,10 +33,15 @@ export interface IOpenerService {
|
|||
|
||||
/**
|
||||
* Register a participant that can validate if the URI resource be opened.
|
||||
* validators are run before openers.
|
||||
* Validators are run before openers.
|
||||
*/
|
||||
registerValidator(validator: IValidator): IDisposable;
|
||||
|
||||
/**
|
||||
* Register a participant that can resolve an external URI resource to be opened.
|
||||
*/
|
||||
registerExternalUriResolver(resolver: IExternalUriResolver): IDisposable;
|
||||
|
||||
/**
|
||||
* Opens a resource, like a webaddress, a document uri, or executes command.
|
||||
*
|
||||
|
@ -45,7 +54,8 @@ export interface IOpenerService {
|
|||
|
||||
export const NullOpenerService: IOpenerService = Object.freeze({
|
||||
_serviceBrand: undefined,
|
||||
registerOpener() { return { dispose() { } }; },
|
||||
registerValidator() { return { dispose() { } }; },
|
||||
registerOpener() { return Disposable.None; },
|
||||
registerValidator() { return Disposable.None; },
|
||||
registerExternalUriResolver() { return Disposable.None; },
|
||||
open() { return Promise.resolve(false); },
|
||||
});
|
||||
|
|
|
@ -187,6 +187,8 @@ export const activeContrastBorder = registerColor('contrastActiveBorder', { ligh
|
|||
|
||||
export const selectionBackground = registerColor('selection.background', { light: null, dark: null, hc: null }, nls.localize('selectionBackground', "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));
|
||||
|
||||
export const iconForeground = registerColor('icon.foreground', { light: '#424242', dark: '#C5C5C5', hc: '#FFFFFF' }, nls.localize('iconForeground', "The default color for icons in the workbench."));
|
||||
|
||||
// ------ text colors
|
||||
|
||||
export const textSeparatorForeground = registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hc: Color.black }, nls.localize('textSeparatorForeground', "Color for text separators."));
|
||||
|
|
|
@ -44,7 +44,7 @@ export abstract class AbstractUpdateService implements IUpdateService {
|
|||
}
|
||||
|
||||
constructor(
|
||||
@ILifecycleMainService private readonly lifecycleService: ILifecycleMainService,
|
||||
@ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService,
|
||||
@IConfigurationService protected configurationService: IConfigurationService,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@IRequestService protected requestService: IRequestService,
|
||||
|
@ -152,7 +152,7 @@ export abstract class AbstractUpdateService implements IUpdateService {
|
|||
|
||||
this.logService.trace('update#quitAndInstall(): before lifecycle quit()');
|
||||
|
||||
this.lifecycleService.quit(true /* from update */).then(vetod => {
|
||||
this.lifecycleMainService.quit(true /* from update */).then(vetod => {
|
||||
this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${vetod}`);
|
||||
if (vetod) {
|
||||
return;
|
||||
|
|
|
@ -28,14 +28,14 @@ export class DarwinUpdateService extends AbstractUpdateService {
|
|||
@memoize private get onRawUpdateDownloaded(): Event<IUpdate> { return Event.fromNodeEventEmitter(electron.autoUpdater, 'update-downloaded', (_, releaseNotes, version, date) => ({ releaseNotes, version, productVersion: version, date })); }
|
||||
|
||||
constructor(
|
||||
@ILifecycleMainService lifecycleService: ILifecycleMainService,
|
||||
@ILifecycleMainService lifecycleMainService: ILifecycleMainService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@ITelemetryService private readonly telemetryService: ITelemetryService,
|
||||
@IEnvironmentService environmentService: IEnvironmentService,
|
||||
@IRequestService requestService: IRequestService,
|
||||
@ILogService logService: ILogService
|
||||
) {
|
||||
super(lifecycleService, configurationService, environmentService, requestService, logService);
|
||||
super(lifecycleMainService, configurationService, environmentService, requestService, logService);
|
||||
this.onRawError(this.onError, this, this.disposables);
|
||||
this.onRawUpdateAvailable(this.onUpdateAvailable, this, this.disposables);
|
||||
this.onRawUpdateDownloaded(this.onUpdateDownloaded, this, this.disposables);
|
||||
|
|
|
@ -20,14 +20,14 @@ export class LinuxUpdateService extends AbstractUpdateService {
|
|||
_serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
@ILifecycleMainService lifecycleService: ILifecycleMainService,
|
||||
@ILifecycleMainService lifecycleMainService: ILifecycleMainService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@ITelemetryService private readonly telemetryService: ITelemetryService,
|
||||
@IEnvironmentService environmentService: IEnvironmentService,
|
||||
@IRequestService requestService: IRequestService,
|
||||
@ILogService logService: ILogService
|
||||
) {
|
||||
super(lifecycleService, configurationService, environmentService, requestService, logService);
|
||||
super(lifecycleMainService, configurationService, environmentService, requestService, logService);
|
||||
}
|
||||
|
||||
protected buildUpdateFeedUrl(quality: string): string {
|
||||
|
|
|
@ -35,7 +35,7 @@ abstract class AbstractUpdateService2 implements IUpdateService {
|
|||
}
|
||||
|
||||
constructor(
|
||||
@ILifecycleMainService private readonly lifecycleService: ILifecycleMainService,
|
||||
@ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService,
|
||||
@IEnvironmentService environmentService: IEnvironmentService,
|
||||
@ILogService protected logService: ILogService,
|
||||
) {
|
||||
|
@ -106,7 +106,7 @@ abstract class AbstractUpdateService2 implements IUpdateService {
|
|||
|
||||
this.logService.trace('update#quitAndInstall(): before lifecycle quit()');
|
||||
|
||||
this.lifecycleService.quit(true /* from update */).then(vetod => {
|
||||
this.lifecycleMainService.quit(true /* from update */).then(vetod => {
|
||||
this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${vetod}`);
|
||||
if (vetod) {
|
||||
return;
|
||||
|
@ -139,12 +139,12 @@ export class SnapUpdateService extends AbstractUpdateService2 {
|
|||
constructor(
|
||||
private snap: string,
|
||||
private snapRevision: string,
|
||||
@ILifecycleMainService lifecycleService: ILifecycleMainService,
|
||||
@ILifecycleMainService lifecycleMainService: ILifecycleMainService,
|
||||
@IEnvironmentService environmentService: IEnvironmentService,
|
||||
@ILogService logService: ILogService,
|
||||
@ITelemetryService private readonly telemetryService: ITelemetryService
|
||||
) {
|
||||
super(lifecycleService, environmentService, logService);
|
||||
super(lifecycleMainService, environmentService, logService);
|
||||
|
||||
const watcher = watch(path.dirname(this.snap));
|
||||
const onChange = Event.fromNodeEventEmitter(watcher, 'change', (_, fileName: string) => fileName);
|
||||
|
@ -152,7 +152,7 @@ export class SnapUpdateService extends AbstractUpdateService2 {
|
|||
const onDebouncedCurrentChange = Event.debounce(onCurrentChange, (_, e) => e, 2000);
|
||||
const listener = onDebouncedCurrentChange(this.checkForUpdates, this);
|
||||
|
||||
lifecycleService.onWillShutdown(() => {
|
||||
lifecycleMainService.onWillShutdown(() => {
|
||||
listener.dispose();
|
||||
watcher.close();
|
||||
});
|
||||
|
|
|
@ -60,7 +60,7 @@ export class Win32UpdateService extends AbstractUpdateService {
|
|||
}
|
||||
|
||||
constructor(
|
||||
@ILifecycleMainService lifecycleService: ILifecycleMainService,
|
||||
@ILifecycleMainService lifecycleMainService: ILifecycleMainService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@ITelemetryService private readonly telemetryService: ITelemetryService,
|
||||
@IEnvironmentService environmentService: IEnvironmentService,
|
||||
|
@ -68,7 +68,7 @@ export class Win32UpdateService extends AbstractUpdateService {
|
|||
@ILogService logService: ILogService,
|
||||
@IFileService private readonly fileService: IFileService
|
||||
) {
|
||||
super(lifecycleService, configurationService, environmentService, requestService, logService);
|
||||
super(lifecycleMainService, configurationService, environmentService, requestService, logService);
|
||||
|
||||
if (getUpdateType() === UpdateType.Setup) {
|
||||
/* __GDPR__
|
||||
|
|
|
@ -28,7 +28,7 @@ export class ElectronURLListener {
|
|||
constructor(
|
||||
initial: string | string[],
|
||||
@IURLService private readonly urlService: IURLService,
|
||||
@IWindowsMainService windowsService: IWindowsMainService
|
||||
@IWindowsMainService windowsMainService: IWindowsMainService
|
||||
) {
|
||||
const globalBuffer = ((<any>global).getOpenUrls() || []) as string[];
|
||||
const rawBuffer = [
|
||||
|
@ -58,14 +58,14 @@ export class ElectronURLListener {
|
|||
const onOpenUrl = Event.filter(Event.map(onOpenElectronUrl, uriFromRawUrl), uri => !!uri);
|
||||
onOpenUrl(this.urlService.open, this.urlService, this.disposables);
|
||||
|
||||
const isWindowReady = windowsService.getWindows()
|
||||
const isWindowReady = windowsMainService.getWindows()
|
||||
.filter(w => w.isReady)
|
||||
.length > 0;
|
||||
|
||||
if (isWindowReady) {
|
||||
flush();
|
||||
} else {
|
||||
Event.once(windowsService.onWindowReady)(flush);
|
||||
Event.once(windowsMainService.onWindowReady)(flush);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -155,9 +155,6 @@ export interface IWindowsService {
|
|||
openNewWindow(options?: INewWindowOptions): Promise<void>;
|
||||
openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise<void>;
|
||||
getWindows(): Promise<{ id: number; workspace?: IWorkspaceIdentifier; folderUri?: ISingleFolderWorkspaceIdentifier; title: string; filename?: string; }[]>;
|
||||
getWindowCount(): Promise<number>;
|
||||
log(severity: string, args: string[]): Promise<void>;
|
||||
showItemInFolder(path: URI): Promise<void>;
|
||||
getActiveWindowId(): Promise<number | undefined>;
|
||||
|
||||
// This needs to be handled from browser process to prevent
|
||||
|
|
|
@ -104,13 +104,10 @@ export class WindowsChannel implements IServerChannel {
|
|||
case 'openNewWindow': return this.service.openNewWindow(arg);
|
||||
case 'openExtensionDevelopmentHostWindow': return this.service.openExtensionDevelopmentHostWindow(arg[0], arg[1]);
|
||||
case 'getWindows': return this.service.getWindows();
|
||||
case 'getWindowCount': return this.service.getWindowCount();
|
||||
case 'relaunch': return this.service.relaunch(arg[0]);
|
||||
case 'whenSharedProcessReady': return this.service.whenSharedProcessReady();
|
||||
case 'toggleSharedProcess': return this.service.toggleSharedProcess();
|
||||
case 'quit': return this.service.quit();
|
||||
case 'log': return this.service.log(arg[0], arg[1]);
|
||||
case 'showItemInFolder': return this.service.showItemInFolder(URI.revive(arg));
|
||||
case 'getActiveWindowId': return this.service.getActiveWindowId();
|
||||
case 'openExternal': return this.service.openExternal(arg);
|
||||
case 'startCrashReporter': return this.service.startCrashReporter(arg);
|
||||
|
|
|
@ -222,18 +222,6 @@ export class WindowsService implements IWindowsService {
|
|||
return result;
|
||||
}
|
||||
|
||||
getWindowCount(): Promise<number> {
|
||||
return this.channel.call('getWindowCount');
|
||||
}
|
||||
|
||||
log(severity: string, args: string[]): Promise<void> {
|
||||
return this.channel.call('log', [severity, args]);
|
||||
}
|
||||
|
||||
showItemInFolder(path: URI): Promise<void> {
|
||||
return this.channel.call('showItemInFolder', path);
|
||||
}
|
||||
|
||||
getActiveWindowId(): Promise<number | undefined> {
|
||||
return this.channel.call('getActiveWindowId');
|
||||
}
|
||||
|
|
|
@ -38,15 +38,15 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH
|
|||
Event.filter(Event.fromNodeEventEmitter(app, 'browser-window-focus', (_, w: Electron.BrowserWindow) => w.id), id => !!this.windowsMainService.getWindowById(id))
|
||||
);
|
||||
|
||||
readonly onRecentlyOpenedChange: Event<void> = this.historyService.onRecentlyOpenedChange;
|
||||
readonly onRecentlyOpenedChange: Event<void> = this.historyMainService.onRecentlyOpenedChange;
|
||||
|
||||
constructor(
|
||||
private sharedProcess: ISharedProcess,
|
||||
@IWindowsMainService private readonly windowsMainService: IWindowsMainService,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@IURLService urlService: IURLService,
|
||||
@ILifecycleMainService private readonly lifecycleService: ILifecycleMainService,
|
||||
@IHistoryMainService private readonly historyService: IHistoryMainService,
|
||||
@ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService,
|
||||
@IHistoryMainService private readonly historyMainService: IHistoryMainService,
|
||||
@ILogService private readonly logService: ILogService
|
||||
) {
|
||||
super();
|
||||
|
@ -157,25 +157,25 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH
|
|||
|
||||
async addRecentlyOpened(recents: IRecent[]): Promise<void> {
|
||||
this.logService.trace('windowsService#addRecentlyOpened');
|
||||
this.historyService.addRecentlyOpened(recents);
|
||||
this.historyMainService.addRecentlyOpened(recents);
|
||||
}
|
||||
|
||||
async removeFromRecentlyOpened(paths: URI[]): Promise<void> {
|
||||
this.logService.trace('windowsService#removeFromRecentlyOpened');
|
||||
|
||||
this.historyService.removeFromRecentlyOpened(paths);
|
||||
this.historyMainService.removeFromRecentlyOpened(paths);
|
||||
}
|
||||
|
||||
async clearRecentlyOpened(): Promise<void> {
|
||||
this.logService.trace('windowsService#clearRecentlyOpened');
|
||||
|
||||
this.historyService.clearRecentlyOpened();
|
||||
this.historyMainService.clearRecentlyOpened();
|
||||
}
|
||||
|
||||
async getRecentlyOpened(windowId: number): Promise<IRecentlyOpened> {
|
||||
this.logService.trace('windowsService#getRecentlyOpened', windowId);
|
||||
|
||||
return this.withWindow(windowId, codeWindow => this.historyService.getRecentlyOpened(codeWindow.config.workspace, codeWindow.config.folderUri, codeWindow.config.filesToOpenOrCreate), () => this.historyService.getRecentlyOpened())!;
|
||||
return this.withWindow(windowId, codeWindow => this.historyMainService.getRecentlyOpened(codeWindow.config.workspace, codeWindow.config.folderUri, codeWindow.config.filesToOpenOrCreate), () => this.historyMainService.getRecentlyOpened())!;
|
||||
}
|
||||
|
||||
async newWindowTab(): Promise<void> {
|
||||
|
@ -336,32 +336,6 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH
|
|||
return this.windowsMainService.getWindows().length;
|
||||
}
|
||||
|
||||
async log(severity: string, args: string[]): Promise<void> {
|
||||
let consoleFn = console.log;
|
||||
|
||||
switch (severity) {
|
||||
case 'error':
|
||||
consoleFn = console.error;
|
||||
break;
|
||||
case 'warn':
|
||||
consoleFn = console.warn;
|
||||
break;
|
||||
case 'info':
|
||||
consoleFn = console.info;
|
||||
break;
|
||||
}
|
||||
|
||||
consoleFn.call(console, ...args);
|
||||
}
|
||||
|
||||
async showItemInFolder(resource: URI): Promise<void> {
|
||||
this.logService.trace('windowsService#showItemInFolder');
|
||||
|
||||
if (resource.scheme === Schemas.file) {
|
||||
shell.showItemInFolder(resource.fsPath);
|
||||
}
|
||||
}
|
||||
|
||||
async getActiveWindowId(): Promise<number | undefined> {
|
||||
return this._activeWindowId;
|
||||
}
|
||||
|
@ -388,7 +362,7 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH
|
|||
async relaunch(options: { addArgs?: string[], removeArgs?: string[] }): Promise<void> {
|
||||
this.logService.trace('windowsService#relaunch');
|
||||
|
||||
this.lifecycleService.relaunch(options);
|
||||
this.lifecycleMainService.relaunch(options);
|
||||
}
|
||||
|
||||
async whenSharedProcessReady(): Promise<void> {
|
||||
|
|
|
@ -6,9 +6,10 @@
|
|||
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
|
||||
import { MainContext, MainThreadConsoleShape, IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IRemoteConsoleLog, log, parse } from 'vs/base/common/console';
|
||||
import { IRemoteConsoleLog, log } from 'vs/base/common/console';
|
||||
import { logRemoteEntry } from 'vs/workbench/services/extensions/common/remoteConsoleUtil';
|
||||
import { parseExtensionDevOptions } from 'vs/workbench/services/extensions/common/extensionDevOptions';
|
||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
||||
|
||||
@extHostNamedCustomer(MainContext.MainThreadConsole)
|
||||
|
@ -20,7 +21,7 @@ export class MainThreadConsole implements MainThreadConsoleShape {
|
|||
constructor(
|
||||
extHostContext: IExtHostContext,
|
||||
@IEnvironmentService private readonly _environmentService: IEnvironmentService,
|
||||
@IWindowsService private readonly _windowsService: IWindowsService,
|
||||
@ILogService private readonly _logService: ILogService,
|
||||
@IExtensionHostDebugService private readonly _extensionHostDebugService: IExtensionHostDebugService,
|
||||
) {
|
||||
const devOpts = parseExtensionDevOptions(this._environmentService);
|
||||
|
@ -40,7 +41,7 @@ export class MainThreadConsole implements MainThreadConsoleShape {
|
|||
|
||||
// Log on main side if running tests from cli
|
||||
if (this._isExtensionDevTestFromCli) {
|
||||
this._windowsService.log(entry.severity, parse(entry).args);
|
||||
logRemoteEntry(this._logService, entry);
|
||||
}
|
||||
|
||||
// Broadcast to other windows if we are in development mode
|
||||
|
|
|
@ -374,8 +374,9 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape {
|
|||
protected _handlers: Map<number, HandlerData>;
|
||||
protected _taskExecutions: Map<string, TaskExecutionImpl>;
|
||||
protected _providedCustomExecutions2: Map<string, vscode.CustomExecution2>;
|
||||
private _notProvidedCustomExecutions: Set<string>; // Used for custom executions tasks that are created and run through executeTask.
|
||||
protected _activeCustomExecutions2: Map<string, vscode.CustomExecution2>;
|
||||
|
||||
private _lastStartedTask: string | undefined;
|
||||
protected readonly _onDidExecuteTask: Emitter<vscode.TaskStartEvent> = new Emitter<vscode.TaskStartEvent>();
|
||||
protected readonly _onDidTerminateTask: Emitter<vscode.TaskEndEvent> = new Emitter<vscode.TaskEndEvent>();
|
||||
|
||||
|
@ -399,6 +400,7 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape {
|
|||
this._handlers = new Map<number, HandlerData>();
|
||||
this._taskExecutions = new Map<string, TaskExecutionImpl>();
|
||||
this._providedCustomExecutions2 = new Map<string, vscode.CustomExecution2>();
|
||||
this._notProvidedCustomExecutions = new Set<string>();
|
||||
this._activeCustomExecutions2 = new Map<string, vscode.CustomExecution2>();
|
||||
}
|
||||
|
||||
|
@ -462,6 +464,7 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape {
|
|||
this._activeCustomExecutions2.set(execution.id, execution2);
|
||||
this._terminalService.attachPtyToTerminal(terminalId, await execution2.callback());
|
||||
}
|
||||
this._lastStartedTask = execution.id;
|
||||
|
||||
this._onDidExecuteTask.fire({
|
||||
execution: await this.getTaskExecution(execution)
|
||||
|
@ -571,7 +574,7 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape {
|
|||
}
|
||||
|
||||
if (CustomExecution2DTO.is(resolvedTaskDTO.execution)) {
|
||||
await this.addCustomExecution2(resolvedTaskDTO, <vscode.Task2>resolvedTask);
|
||||
await this.addCustomExecution2(resolvedTaskDTO, <vscode.Task2>resolvedTask, true);
|
||||
}
|
||||
|
||||
return await this.resolveTaskInternal(resolvedTaskDTO);
|
||||
|
@ -585,8 +588,11 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape {
|
|||
return this._handleCounter++;
|
||||
}
|
||||
|
||||
protected async addCustomExecution2(taskDTO: tasks.TaskDTO, task: vscode.Task2): Promise<void> {
|
||||
protected async addCustomExecution2(taskDTO: tasks.TaskDTO, task: vscode.Task2, isProvided: boolean): Promise<void> {
|
||||
const taskId = await this._proxy.$createTaskId(taskDTO);
|
||||
if (!isProvided && !this._providedCustomExecutions2.has(taskId)) {
|
||||
this._notProvidedCustomExecutions.add(taskId);
|
||||
}
|
||||
this._providedCustomExecutions2.set(taskId, <vscode.CustomExecution2>(<vscode.Task2>task).execution2);
|
||||
}
|
||||
|
||||
|
@ -618,16 +624,22 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape {
|
|||
this._activeCustomExecutions2.delete(execution.id);
|
||||
}
|
||||
|
||||
const lastCustomExecution = this._providedCustomExecutions2.get(execution.id);
|
||||
// Technically we don't really need to do this, however, if an extension
|
||||
// is executing a task through "executeTask" over and over again
|
||||
// with different properties in the task definition, then this list
|
||||
// with different properties in the task definition, then the map of executions
|
||||
// could grow indefinitely, something we don't want.
|
||||
this._providedCustomExecutions2.clear();
|
||||
// We do still need to hang on to the last custom execution so that the
|
||||
// Rerun Task command doesn't choke when it tries to rerun a custom execution
|
||||
if (lastCustomExecution) {
|
||||
this._providedCustomExecutions2.set(execution.id, lastCustomExecution);
|
||||
if (this._notProvidedCustomExecutions.has(execution.id) && (this._lastStartedTask !== execution.id)) {
|
||||
this._providedCustomExecutions2.delete(execution.id);
|
||||
this._notProvidedCustomExecutions.delete(execution.id);
|
||||
}
|
||||
let iterator = this._notProvidedCustomExecutions.values();
|
||||
let iteratorResult = iterator.next();
|
||||
while (!iteratorResult.done) {
|
||||
if (!this._activeCustomExecutions2.has(iteratorResult.value) && (this._lastStartedTask !== iteratorResult.value)) {
|
||||
this._providedCustomExecutions2.delete(iteratorResult.value);
|
||||
this._notProvidedCustomExecutions.delete(iteratorResult.value);
|
||||
}
|
||||
iteratorResult = iterator.next();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,7 +675,7 @@ export class WorkerExtHostTask extends ExtHostTaskBase {
|
|||
// in the provided custom execution map that is cleaned up after the
|
||||
// task is executed.
|
||||
if (CustomExecution2DTO.is(dto.execution)) {
|
||||
await this.addCustomExecution2(dto, <vscode.Task2>task);
|
||||
await this.addCustomExecution2(dto, <vscode.Task2>task, false);
|
||||
} else {
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
|
@ -685,7 +697,7 @@ export class WorkerExtHostTask extends ExtHostTaskBase {
|
|||
// The ID is calculated on the main thread task side, so, let's call into it here.
|
||||
// We need the task id's pre-computed for custom task executions because when OnDidStartTask
|
||||
// is invoked, we have to be able to map it back to our data.
|
||||
taskIdPromises.push(this.addCustomExecution2(taskDTO, <vscode.Task2>task));
|
||||
taskIdPromises.push(this.addCustomExecution2(taskDTO, <vscode.Task2>task, true));
|
||||
} else {
|
||||
console.warn('Only custom execution tasks supported.');
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ export class ExtHostTask extends ExtHostTaskBase {
|
|||
// in the provided custom execution map that is cleaned up after the
|
||||
// task is executed.
|
||||
if (CustomExecution2DTO.is(dto.execution)) {
|
||||
await this.addCustomExecution2(dto, <vscode.Task2>task);
|
||||
await this.addCustomExecution2(dto, <vscode.Task2>task, false);
|
||||
}
|
||||
|
||||
return this._proxy.$executeTask(dto).then(value => this.getTaskExecution(value, task));
|
||||
|
@ -80,7 +80,7 @@ export class ExtHostTask extends ExtHostTaskBase {
|
|||
// The ID is calculated on the main thread task side, so, let's call into it here.
|
||||
// We need the task id's pre-computed for custom task executions because when OnDidStartTask
|
||||
// is invoked, we have to be able to map it back to our data.
|
||||
taskIdPromises.push(this.addCustomExecution2(taskDTO, <vscode.Task2>task));
|
||||
taskIdPromises.push(this.addCustomExecution2(taskDTO, <vscode.Task2>task, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.97603 10.0719L12.3333 5.7146L12.9521 6.33332L8.28539 11L7.66667 11L3 6.33332L3.61872 5.7146L7.97603 10.0719Z" fill="#C5C5C5"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 282 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.97603 10.0719L12.3333 5.7146L12.9521 6.33332L8.28539 11L7.66667 11L3 6.33332L3.61872 5.7146L7.97603 10.0719Z" fill="white"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 280 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.97603 10.0719L12.3333 5.7146L12.9521 6.33332L8.28539 11L7.66667 11L3 6.33332L3.61872 5.7146L7.97603 10.0719Z" fill="#424242"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 282 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.92809 7.97603L10.2854 12.3333L9.66668 12.9521L5.00001 8.28539V7.66667L9.66668 3L10.2854 3.61872L5.92809 7.97603Z" fill="#C5C5C5"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 286 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.92809 7.97603L10.2854 12.3333L9.66668 12.9521L5.00001 8.28539V7.66667L9.66668 3L10.2854 3.61872L5.92809 7.97603Z" fill="white"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 284 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.92809 7.97603L10.2854 12.3333L9.66668 12.9521L5.00001 8.28539V7.66667L9.66668 3L10.2854 3.61872L5.92809 7.97603Z" fill="#424242"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 286 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0719 7.99999L5.7146 12.3573L6.33332 12.976L11 8.30935V7.69063L6.33332 3.02396L5.7146 3.64268L10.0719 7.99999Z" fill="#C5C5C5"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 284 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0719 7.99999L5.7146 12.3573L6.33332 12.976L11 8.30935V7.69063L6.33332 3.02396L5.7146 3.64268L10.0719 7.99999Z" fill="white"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 282 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0719 7.99999L5.7146 12.3573L6.33332 12.976L11 8.30935V7.69063L6.33332 3.02396L5.7146 3.64268L10.0719 7.99999Z" fill="#424242"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 284 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 6.04042L3.02022 11.0202L2.31311 10.3131L7.64644 4.97976L8.35355 4.97976L13.6869 10.3131L12.9798 11.0202L8 6.04042Z" fill="#C5C5C5"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 288 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 6.04042L3.02022 11.0202L2.31311 10.3131L7.64644 4.97976L8.35355 4.97976L13.6869 10.3131L12.9798 11.0202L8 6.04042Z" fill="white"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 286 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 6.04042L3.02022 11.0202L2.31311 10.3131L7.64644 4.97976L8.35355 4.97976L13.6869 10.3131L12.9798 11.0202L8 6.04042Z" fill="#424242"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 288 B |
|
@ -1,4 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 4L12 12" stroke="#C5C5C5"/>
|
||||
<path d="M12 4L4 12" stroke="#C5C5C5"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 183 B |
|
@ -1,4 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 4L12 12" stroke="white"/>
|
||||
<path d="M12 4L4 12" stroke="white"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 179 B |
|
@ -1,4 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 4L12 12" stroke="#424242"/>
|
||||
<path d="M12 4L4 12" stroke="#424242"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 183 B |
|
@ -123,69 +123,3 @@
|
|||
min-width: 110px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/* Close */
|
||||
.monaco-workbench .hide-panel-action {
|
||||
background: url('close-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .monaco-workbench .hide-panel-action {
|
||||
background: url('close-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.hc-black .monaco-workbench .hide-panel-action {
|
||||
background: url('close-hc.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
|
||||
/* Up */
|
||||
.monaco-workbench .maximize-panel-action {
|
||||
background-image: url('chevron-up-light.svg');
|
||||
}
|
||||
|
||||
.vs-dark .monaco-workbench .maximize-panel-action {
|
||||
background-image: url('chevron-up-dark.svg');
|
||||
}
|
||||
|
||||
.hc-black .monaco-workbench .maximize-panel-action {
|
||||
background-image: url('chevron-up-hc.svg');
|
||||
}
|
||||
|
||||
/* Down */
|
||||
.monaco-workbench .minimize-panel-action {
|
||||
background-image: url('chevron-down-light.svg');
|
||||
}
|
||||
|
||||
.vs-dark .monaco-workbench .minimize-panel-action {
|
||||
background-image: url('chevron-down-dark.svg');
|
||||
}
|
||||
|
||||
.hc-black .monaco-workbench .minimize-panel-action {
|
||||
background-image: url('chevron-down-hc.svg');
|
||||
}
|
||||
|
||||
/* Left */
|
||||
.monaco-workbench .panel.right .maximize-panel-action {
|
||||
background-image: url('chevron-left-light.svg');
|
||||
}
|
||||
|
||||
.vs-dark .monaco-workbench .panel.right .maximize-panel-action {
|
||||
background-image: url('chevron-left-dark.svg');
|
||||
}
|
||||
|
||||
.hc-black .monaco-workbench .panel.right .maximize-panel-action {
|
||||
background-image: url('chevron-left-hc.svg');
|
||||
}
|
||||
|
||||
/* Right */
|
||||
.monaco-workbench .panel.right .minimize-panel-action {
|
||||
background-image: url('chevron-right-light.svg');
|
||||
}
|
||||
|
||||
.vs-dark .monaco-workbench .panel.right .minimize-panel-action {
|
||||
background-image: url('chevron-right-dark.svg');
|
||||
}
|
||||
|
||||
.hc-black .monaco-workbench .panel.right .minimize-panel-action {
|
||||
background-image: url('chevron-right-hc.svg');
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export class ClosePanelAction extends Action {
|
|||
name: string,
|
||||
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService
|
||||
) {
|
||||
super(id, name, 'hide-panel-action');
|
||||
super(id, name, 'codicon-close');
|
||||
}
|
||||
|
||||
run(): Promise<any> {
|
||||
|
@ -141,11 +141,11 @@ export class ToggleMaximizedPanelAction extends Action {
|
|||
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService,
|
||||
@IEditorGroupsService editorGroupsService: IEditorGroupsService
|
||||
) {
|
||||
super(id, label, layoutService.isPanelMaximized() ? 'minimize-panel-action' : 'maximize-panel-action');
|
||||
super(id, label, layoutService.isPanelMaximized() ? 'codicon-chevron-down' : 'codicon-chevron-up');
|
||||
|
||||
this.toDispose.add(editorGroupsService.onDidLayout(() => {
|
||||
const maximized = this.layoutService.isPanelMaximized();
|
||||
this.class = maximized ? 'minimize-panel-action' : 'maximize-panel-action';
|
||||
this.class = maximized ? 'codicon-chevron-down' : 'codicon-chevron-up';
|
||||
this.label = maximized ? ToggleMaximizedPanelAction.RESTORE_LABEL : ToggleMaximizedPanelAction.MAXIMIZE_LABEL;
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -4,18 +4,17 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/css!./media/titlebarpart';
|
||||
import { dirname, posix } from 'vs/base/common/path';
|
||||
import * as resources from 'vs/base/common/resources';
|
||||
import { Part } from 'vs/workbench/browser/part';
|
||||
import { ITitleService, ITitleProperties } from 'vs/workbench/services/title/common/titleService';
|
||||
import { getZoomFactor } from 'vs/base/browser/browser';
|
||||
import { IWindowService, IWindowsService, MenuBarVisibility, getTitleBarStyle } from 'vs/platform/windows/common/windows';
|
||||
import { IWindowService, MenuBarVisibility, getTitleBarStyle } from 'vs/platform/windows/common/windows';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
|
||||
import { IAction, Action } from 'vs/base/common/actions';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { DisposableStore, dispose } from 'vs/base/common/lifecycle';
|
||||
import * as nls from 'vs/nls';
|
||||
import { EditorInput, toResource, Verbosity, SideBySideEditor } from 'vs/workbench/common/editor';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
|
@ -29,7 +28,7 @@ import { trim } from 'vs/base/common/strings';
|
|||
import { EventType, EventHelper, Dimension, isAncestor, hide, show, removeClass, addClass, append, $, addDisposableListener, runAtThisOrScheduleAtNextAnimationFrame } from 'vs/base/browser/dom';
|
||||
import { CustomMenubarControl } from 'vs/workbench/browser/parts/titlebar/menubarControl';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { template, getBaseLabel } from 'vs/base/common/labels';
|
||||
import { template } from 'vs/base/common/labels';
|
||||
import { ILabelService } from 'vs/platform/label/common/label';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
|
@ -37,6 +36,9 @@ import { Parts, IWorkbenchLayoutService } from 'vs/workbench/services/layout/bro
|
|||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { createAndFillInContextMenuActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { IMenuService, IMenu, MenuId } from 'vs/platform/actions/common/actions';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
|
||||
export class TitlebarPart extends Part implements ITitleService {
|
||||
|
||||
|
@ -71,7 +73,6 @@ export class TitlebarPart extends Part implements ITitleService {
|
|||
private lastLayoutDimensions: Dimension;
|
||||
|
||||
private pendingTitle: string;
|
||||
private representedFileName: string;
|
||||
|
||||
private isInactive: boolean;
|
||||
|
||||
|
@ -80,11 +81,12 @@ export class TitlebarPart extends Part implements ITitleService {
|
|||
|
||||
private titleUpdater: RunOnceScheduler = this._register(new RunOnceScheduler(() => this.doUpdateTitle(), 0));
|
||||
|
||||
private contextMenu: IMenu;
|
||||
|
||||
constructor(
|
||||
@IContextMenuService private readonly contextMenuService: IContextMenuService,
|
||||
@IWindowService private readonly windowService: IWindowService,
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@IWindowsService private readonly windowsService: IWindowsService,
|
||||
@IEditorService private readonly editorService: IEditorService,
|
||||
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
|
||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
||||
|
@ -92,10 +94,14 @@ export class TitlebarPart extends Part implements ITitleService {
|
|||
@IThemeService themeService: IThemeService,
|
||||
@ILabelService private readonly labelService: ILabelService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
@IMenuService menuService: IMenuService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService
|
||||
) {
|
||||
super(Parts.TITLEBAR_PART, { hasTitle: false }, themeService, storageService, layoutService);
|
||||
|
||||
this.contextMenu = this._register(menuService.createMenu(MenuId.TitleBarContext, contextKeyService));
|
||||
|
||||
this.registerListeners();
|
||||
}
|
||||
|
||||
|
@ -181,9 +187,6 @@ export class TitlebarPart extends Part implements ITitleService {
|
|||
|
||||
// Apply to window
|
||||
this.windowService.setRepresentedFilename(path);
|
||||
|
||||
// Keep for context menu
|
||||
this.representedFileName = path;
|
||||
}
|
||||
|
||||
private doUpdateTitle(): void {
|
||||
|
@ -376,7 +379,6 @@ export class TitlebarPart extends Part implements ITitleService {
|
|||
if (!isMacintosh && !isWeb) {
|
||||
this.windowControls = append(this.element, $('div.window-controls-container'));
|
||||
|
||||
|
||||
// Minimize
|
||||
const minimizeIconContainer = append(this.windowControls, $('div.window-icon-bg'));
|
||||
const minimizeIcon = append(minimizeIconContainer, $('div.window-icon'));
|
||||
|
@ -503,44 +505,16 @@ export class TitlebarPart extends Part implements ITitleService {
|
|||
const event = new StandardMouseEvent(e);
|
||||
const anchor = { x: event.posx, y: event.posy };
|
||||
|
||||
// Show menu
|
||||
const actions = this.getContextMenuActions();
|
||||
if (actions.length) {
|
||||
this.contextMenuService.showContextMenu({
|
||||
getAnchor: () => anchor,
|
||||
getActions: () => actions,
|
||||
onHide: () => actions.forEach(a => a.dispose())
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private getContextMenuActions(): IAction[] {
|
||||
// Fill in contributed actions
|
||||
const actions: IAction[] = [];
|
||||
const actionsDisposable = createAndFillInContextMenuActions(this.contextMenu, undefined, actions, this.contextMenuService);
|
||||
|
||||
if (this.representedFileName) {
|
||||
const segments = this.representedFileName.split(posix.sep);
|
||||
for (let i = segments.length; i > 0; i--) {
|
||||
const isFile = (i === segments.length);
|
||||
|
||||
let pathOffset = i;
|
||||
if (!isFile) {
|
||||
pathOffset++; // for segments which are not the file name we want to open the folder
|
||||
}
|
||||
|
||||
const path = segments.slice(0, pathOffset).join(posix.sep);
|
||||
|
||||
let label: string;
|
||||
if (!isFile) {
|
||||
label = getBaseLabel(dirname(path));
|
||||
} else {
|
||||
label = getBaseLabel(path);
|
||||
}
|
||||
|
||||
actions.push(new ShowItemInFolderAction(path, label || posix.sep, this.windowsService));
|
||||
}
|
||||
}
|
||||
|
||||
return actions;
|
||||
// Show it
|
||||
this.contextMenuService.showContextMenu({
|
||||
getAnchor: () => anchor,
|
||||
getActions: () => actions,
|
||||
onHide: () => dispose(actionsDisposable)
|
||||
});
|
||||
}
|
||||
|
||||
private adjustTitleMarginToCenter(): void {
|
||||
|
@ -605,17 +579,6 @@ export class TitlebarPart extends Part implements ITitleService {
|
|||
}
|
||||
}
|
||||
|
||||
class ShowItemInFolderAction extends Action {
|
||||
|
||||
constructor(private path: string, label: string, private windowsService: IWindowsService) {
|
||||
super('showItemInFolder.action.id', label);
|
||||
}
|
||||
|
||||
run(): Promise<void> {
|
||||
return this.windowsService.showItemInFolder(URI.file(this.path));
|
||||
}
|
||||
}
|
||||
|
||||
registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
const titlebarActiveFg = theme.getColor(TITLE_BAR_ACTIVE_FOREGROUND);
|
||||
if (titlebarActiveFg) {
|
||||
|
|
|
@ -6,11 +6,17 @@
|
|||
import 'vs/css!./media/style';
|
||||
|
||||
import { registerThemingParticipant, ITheme, ICssStyleCollector, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService';
|
||||
import { foreground, selectionBackground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground, inputPlaceholderForeground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { iconForeground, foreground, selectionBackground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground, inputPlaceholderForeground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { WORKBENCH_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
|
||||
registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
|
||||
// Icon defaults
|
||||
const iconForegroundColor = theme.getColor(iconForeground);
|
||||
if (iconForegroundColor) {
|
||||
collector.addRule(`.monaco-workbench .codicon { color: ${iconForegroundColor}; }`);
|
||||
}
|
||||
|
||||
// Foreground
|
||||
const windowForeground = theme.getColor(foreground);
|
||||
if (windowForeground) {
|
||||
|
@ -136,4 +142,5 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
|||
}
|
||||
`);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -318,8 +318,6 @@ registerSingleton(IWindowService, SimpleWindowService);
|
|||
export class SimpleWindowsService implements IWindowsService {
|
||||
_serviceBrand: undefined;
|
||||
|
||||
windowCount = 1;
|
||||
|
||||
readonly onWindowOpen: Event<number> = Event.None;
|
||||
readonly onWindowFocus: Event<number> = Event.None;
|
||||
readonly onWindowBlur: Event<number> = Event.None;
|
||||
|
@ -454,49 +452,6 @@ export class SimpleWindowsService implements IWindowsService {
|
|||
}
|
||||
|
||||
openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise<void> {
|
||||
|
||||
// we pass the "ParsedArgs" as query parameters of the URL
|
||||
|
||||
let newAddress = `${document.location.origin}/?`;
|
||||
let gotFolder = false;
|
||||
|
||||
const addQueryParameter = (key: string, value: string) => {
|
||||
const lastChar = newAddress.charAt(newAddress.length - 1);
|
||||
if (lastChar !== '?' && lastChar !== '&') {
|
||||
newAddress += '&';
|
||||
}
|
||||
newAddress += `${key}=${encodeURIComponent(value)}`;
|
||||
};
|
||||
|
||||
const f = args['folder-uri'];
|
||||
if (f) {
|
||||
const u = URI.parse(f[0]);
|
||||
gotFolder = true;
|
||||
addQueryParameter('folder', u.path);
|
||||
}
|
||||
if (!gotFolder) {
|
||||
// request empty window
|
||||
addQueryParameter('ew', 'true');
|
||||
}
|
||||
|
||||
const ep = args['extensionDevelopmentPath'];
|
||||
if (ep) {
|
||||
let u = ep[0];
|
||||
addQueryParameter('edp', u);
|
||||
}
|
||||
|
||||
const di = args['debugId'];
|
||||
if (di) {
|
||||
addQueryParameter('di', di);
|
||||
}
|
||||
|
||||
const ibe = args['inspect-brk-extensions'];
|
||||
if (ibe) {
|
||||
addQueryParameter('ibe', ibe);
|
||||
}
|
||||
|
||||
window.open(newAddress);
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
|
@ -504,18 +459,6 @@ export class SimpleWindowsService implements IWindowsService {
|
|||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
getWindowCount(): Promise<number> {
|
||||
return Promise.resolve(this.windowCount);
|
||||
}
|
||||
|
||||
log(_severity: string, _args: string[]): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
showItemInFolder(_path: URI): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
newWindowTab(): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import { WebviewEditorOverlay } from 'vs/workbench/contrib/webview/browser/webvi
|
|||
import { WebviewInput } from 'vs/workbench/contrib/webview/browser/webviewEditorInput';
|
||||
import { IWebviewEditorService } from 'vs/workbench/contrib/webview/browser/webviewEditorService';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { promptSave } from 'vs/workbench/services/textfile/common/textFileService';
|
||||
import { promptSave } from 'vs/workbench/services/textfile/browser/textFileService';
|
||||
|
||||
export class CustomFileEditorInput extends WebviewInput {
|
||||
|
||||
|
|
|
@ -28,12 +28,14 @@ import { getBreakpointMessageAndClassName } from 'vs/workbench/contrib/debug/bro
|
|||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { memoize } from 'vs/base/common/decorators';
|
||||
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
|
||||
import { distinct } from 'vs/base/common/arrays';
|
||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
interface IBreakpointDecoration {
|
||||
decorationId: string;
|
||||
breakpointId: string;
|
||||
breakpoint: IBreakpoint;
|
||||
range: Range;
|
||||
inlineWidget?: InlineBreakpointWidget;
|
||||
}
|
||||
|
@ -84,6 +86,39 @@ function getBreakpointDecorationOptions(model: ITextModel, breakpoint: IBreakpoi
|
|||
};
|
||||
}
|
||||
|
||||
async function createCandidateDecorations(model: ITextModel, breakpointDecorations: IBreakpointDecoration[], debugService: IDebugService): Promise<{ range: Range; options: IModelDecorationOptions; breakpoint: IBreakpoint | undefined }[]> {
|
||||
const lineNumbers = distinct(breakpointDecorations.map(bpd => bpd.range.startLineNumber));
|
||||
const result: { range: Range; options: IModelDecorationOptions; breakpoint: IBreakpoint | undefined }[] = [];
|
||||
const session = debugService.getViewModel().focusedSession;
|
||||
if (session && session.capabilities.supportsBreakpointLocationsRequest) {
|
||||
await Promise.all(lineNumbers.map(async lineNumber => {
|
||||
const positions = await session.breakpointsLocations(model.uri, lineNumber);
|
||||
if (positions.length > 1) {
|
||||
// Do not render candidates if there is only one, since it is already covered by the line breakpoint
|
||||
positions.forEach(p => {
|
||||
const range = new Range(p.lineNumber, p.column, p.lineNumber, p.column + 1);
|
||||
const breakpointAtPosition = breakpointDecorations.filter(bpd => bpd.range.equalsRange(range)).pop();
|
||||
if (breakpointAtPosition && breakpointAtPosition.inlineWidget) {
|
||||
// Space already occupied, do not render candidate.
|
||||
return;
|
||||
}
|
||||
result.push({
|
||||
range,
|
||||
options: {
|
||||
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
|
||||
beforeContentClassName: `debug-breakpoint-placeholder`
|
||||
},
|
||||
breakpoint: breakpointAtPosition ? breakpointAtPosition.breakpoint : undefined
|
||||
});
|
||||
});
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
||||
|
||||
private breakpointHintDecoration: string[] = [];
|
||||
|
@ -91,8 +126,10 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
|||
private breakpointWidgetVisible: IContextKey<boolean>;
|
||||
private toDispose: IDisposable[] = [];
|
||||
private ignoreDecorationsChangedEvent = false;
|
||||
private ignoreFirstBreakpointsChangeEvent = false;
|
||||
private ignoreBreakpointsChangeEvent = false;
|
||||
private breakpointDecorations: IBreakpointDecoration[] = [];
|
||||
private candidateDecorations: { decorationId: string, inlineWidget: InlineBreakpointWidget }[] = [];
|
||||
private setDecorationsScheduler: RunOnceScheduler;
|
||||
|
||||
constructor(
|
||||
private readonly editor: ICodeEditor,
|
||||
|
@ -104,6 +141,7 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
|||
) {
|
||||
this.breakpointWidgetVisible = CONTEXT_BREAKPOINT_WIDGET_VISIBLE.bindTo(contextKeyService);
|
||||
this.registerListeners();
|
||||
this.setDecorationsScheduler = new RunOnceScheduler(() => this.setDecorations(), 30);
|
||||
}
|
||||
|
||||
getId(): string {
|
||||
|
@ -193,16 +231,14 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
|||
this.ensureBreakpointHintDecoration(-1);
|
||||
}));
|
||||
|
||||
this.toDispose.push(this.editor.onDidChangeModel(() => {
|
||||
this.toDispose.push(this.editor.onDidChangeModel(async () => {
|
||||
this.closeBreakpointWidget();
|
||||
this.setDecorations();
|
||||
await this.setDecorations();
|
||||
}));
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => {
|
||||
if (this.ignoreFirstBreakpointsChangeEvent) {
|
||||
this.ignoreFirstBreakpointsChangeEvent = false;
|
||||
return;
|
||||
this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(async () => {
|
||||
if (!this.ignoreBreakpointsChangeEvent && !this.setDecorationsScheduler.isScheduled()) {
|
||||
this.setDecorationsScheduler.schedule();
|
||||
}
|
||||
this.setDecorations();
|
||||
}));
|
||||
this.toDispose.push(this.editor.onDidChangeModelDecorations(() => this.onModelDecorationsChanged()));
|
||||
}
|
||||
|
@ -274,7 +310,7 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
|||
nls.localize('addLogPoint', "Add Logpoint..."),
|
||||
undefined,
|
||||
true,
|
||||
() => Promise.resolve(this.showBreakpointWidget(lineNumber, BreakpointWidgetContext.LOG_MESSAGE))
|
||||
() => Promise.resolve(this.showBreakpointWidget(lineNumber, column, BreakpointWidgetContext.LOG_MESSAGE))
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -311,7 +347,7 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
|||
this.breakpointHintDecoration = this.editor.deltaDecorations(this.breakpointHintDecoration, newDecoration);
|
||||
}
|
||||
|
||||
private setDecorations(): void {
|
||||
private async setDecorations(): Promise<void> {
|
||||
if (!this.editor.hasModel()) {
|
||||
return;
|
||||
}
|
||||
|
@ -319,11 +355,13 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
|||
const activeCodeEditor = this.editor;
|
||||
const model = activeCodeEditor.getModel();
|
||||
const breakpoints = this.debugService.getModel().getBreakpoints({ uri: model.uri });
|
||||
const desiredDecorations = createBreakpointDecorations(model, breakpoints, this.debugService);
|
||||
const desiredBreakpointDecorations = createBreakpointDecorations(model, breakpoints, this.debugService);
|
||||
|
||||
try {
|
||||
this.ignoreDecorationsChangedEvent = true;
|
||||
const decorationIds = activeCodeEditor.deltaDecorations(this.breakpointDecorations.map(bpd => bpd.decorationId), desiredDecorations);
|
||||
|
||||
// Set breakpoint decorations
|
||||
const decorationIds = activeCodeEditor.deltaDecorations(this.breakpointDecorations.map(bpd => bpd.decorationId), desiredBreakpointDecorations);
|
||||
this.breakpointDecorations.forEach(bpd => {
|
||||
if (bpd.inlineWidget) {
|
||||
bpd.inlineWidget.dispose();
|
||||
|
@ -333,19 +371,37 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
|||
let inlineWidget: InlineBreakpointWidget | undefined = undefined;
|
||||
const breakpoint = breakpoints[index];
|
||||
if (breakpoint.column) {
|
||||
inlineWidget = new InlineBreakpointWidget(activeCodeEditor, decorationId, desiredDecorations[index].options.glyphMarginClassName, breakpoint, this.debugService, this.contextMenuService, () => this.getContextMenuActions([breakpoint], activeCodeEditor.getModel().uri, breakpoint.lineNumber, breakpoint.column));
|
||||
inlineWidget = new InlineBreakpointWidget(activeCodeEditor, decorationId, desiredBreakpointDecorations[index].options.glyphMarginClassName, breakpoint, this.debugService, this.contextMenuService, () => this.getContextMenuActions([breakpoint], activeCodeEditor.getModel().uri, breakpoint.lineNumber, breakpoint.column));
|
||||
}
|
||||
|
||||
return {
|
||||
decorationId,
|
||||
breakpointId: breakpoint.getId(),
|
||||
range: desiredDecorations[index].range,
|
||||
breakpoint,
|
||||
range: desiredBreakpointDecorations[index].range,
|
||||
inlineWidget
|
||||
};
|
||||
});
|
||||
|
||||
} finally {
|
||||
this.ignoreDecorationsChangedEvent = false;
|
||||
}
|
||||
|
||||
// Set breakpoint candidate decorations
|
||||
const desiredCandidateDecorations = await createCandidateDecorations(this.editor.getModel(), this.breakpointDecorations, this.debugService);
|
||||
const candidateDecorationIds = this.editor.deltaDecorations(this.candidateDecorations.map(c => c.decorationId), desiredCandidateDecorations);
|
||||
this.candidateDecorations.forEach(candidate => {
|
||||
candidate.inlineWidget.dispose();
|
||||
});
|
||||
this.candidateDecorations = candidateDecorationIds.map((decorationId, index) => {
|
||||
const candidate = desiredCandidateDecorations[index];
|
||||
const cssClass = candidate.breakpoint ? undefined : 'debug-breakpoint-disabled';
|
||||
const inlineWidget = new InlineBreakpointWidget(activeCodeEditor, decorationId, cssClass, candidate.breakpoint, this.debugService, this.contextMenuService, () => this.getContextMenuActions([], activeCodeEditor.getModel().uri, candidate.range.startLineNumber, candidate.range.startColumn));
|
||||
|
||||
return {
|
||||
decorationId,
|
||||
inlineWidget
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
private async onModelDecorationsChanged(): Promise<void> {
|
||||
|
@ -370,28 +426,26 @@ class BreakpointEditorContribution implements IBreakpointEditorContribution {
|
|||
}
|
||||
|
||||
const data = new Map<string, IBreakpointUpdateData>();
|
||||
const breakpoints = this.debugService.getModel().getBreakpoints();
|
||||
for (let i = 0, len = this.breakpointDecorations.length; i < len; i++) {
|
||||
const breakpointDecoration = this.breakpointDecorations[i];
|
||||
const decorationRange = model.getDecorationRange(breakpointDecoration.decorationId);
|
||||
// check if the line got deleted.
|
||||
if (decorationRange) {
|
||||
const breakpoint = breakpoints.filter(bp => bp.getId() === breakpointDecoration.breakpointId).pop();
|
||||
// since we know it is collapsed, it cannot grow to multiple lines
|
||||
if (breakpoint) {
|
||||
data.set(breakpoint.getId(), {
|
||||
if (breakpointDecoration.breakpoint) {
|
||||
data.set(breakpointDecoration.breakpoint.getId(), {
|
||||
lineNumber: decorationRange.startLineNumber,
|
||||
column: breakpoint.column ? decorationRange.startColumn : undefined,
|
||||
column: breakpointDecoration.breakpoint.column ? decorationRange.startColumn : undefined,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this.ignoreFirstBreakpointsChangeEvent = true;
|
||||
this.ignoreBreakpointsChangeEvent = true;
|
||||
await this.debugService.updateBreakpoints(model.uri, data, true);
|
||||
} finally {
|
||||
this.ignoreFirstBreakpointsChangeEvent = false;
|
||||
this.ignoreBreakpointsChangeEvent = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -495,6 +549,8 @@ class InlineBreakpointWidget implements IContentWidget, IDisposable {
|
|||
if (!this.range) {
|
||||
return null;
|
||||
}
|
||||
// Workaround: since the content widget can not be placed before the first column we need to force the left position
|
||||
dom.toggleClass(this.domNode, 'line-start', this.range.startColumn === 1);
|
||||
|
||||
return {
|
||||
position: { lineNumber: this.range.startLineNumber, column: this.range.startColumn - 1 },
|
||||
|
|
|
@ -22,7 +22,8 @@ import { IWorkspaceFolder, IWorkspaceContextService } from 'vs/platform/workspac
|
|||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { IWindowService } from 'vs/platform/windows/common/windows';
|
||||
import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { normalizeDriveLetter } from 'vs/base/common/labels';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
|
@ -74,7 +75,7 @@ export class DebugSession implements IDebugSession {
|
|||
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
|
||||
@INotificationService private readonly notificationService: INotificationService,
|
||||
@IProductService private readonly productService: IProductService,
|
||||
@IWindowsService private readonly windowsService: IWindowsService,
|
||||
@IExtensionHostDebugService private readonly extensionHostDebugService: IExtensionHostDebugService,
|
||||
@IOpenerService private readonly openerService: IOpenerService
|
||||
) {
|
||||
this.id = generateUuid();
|
||||
|
@ -186,7 +187,7 @@ export class DebugSession implements IDebugSession {
|
|||
|
||||
return dbgr.createDebugAdapter(this).then(debugAdapter => {
|
||||
|
||||
this.raw = new RawDebugSession(debugAdapter, dbgr, this.telemetryService, customTelemetryService, this.windowsService, this.openerService);
|
||||
this.raw = new RawDebugSession(debugAdapter, dbgr, this.telemetryService, customTelemetryService, this.extensionHostDebugService, this.openerService);
|
||||
|
||||
return this.raw.start().then(() => {
|
||||
|
||||
|
@ -375,7 +376,7 @@ export class DebugSession implements IDebugSession {
|
|||
const response = await this.raw.breakpointLocations({ source, line: lineNumber });
|
||||
const positions = response.body.breakpoints.map(bp => ({ lineNumber: bp.line, column: bp.column || 1 }));
|
||||
|
||||
return distinct(positions, p => p.toString());
|
||||
return distinct(positions, p => `${p.lineNumber}:${p.column}`);
|
||||
}
|
||||
return Promise.reject(new Error('no debug adapter'));
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import { ExtensionHostDebugChannelClient, ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc';
|
||||
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
||||
import { IDebugHelperService } from 'vs/workbench/contrib/debug/common/debug';
|
||||
|
@ -13,8 +13,10 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
|
|||
import { TelemetryService } from 'vs/platform/telemetry/common/telemetryService';
|
||||
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient {
|
||||
class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient implements IExtensionHostDebugService {
|
||||
|
||||
constructor(
|
||||
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
|
||||
|
@ -45,6 +47,52 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient {
|
|||
}
|
||||
}));
|
||||
}
|
||||
|
||||
openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise<void> {
|
||||
// we pass the "ParsedArgs" as query parameters of the URL
|
||||
|
||||
let newAddress = `${document.location.origin}/?`;
|
||||
let gotFolder = false;
|
||||
|
||||
const addQueryParameter = (key: string, value: string) => {
|
||||
const lastChar = newAddress.charAt(newAddress.length - 1);
|
||||
if (lastChar !== '?' && lastChar !== '&') {
|
||||
newAddress += '&';
|
||||
}
|
||||
newAddress += `${key}=${encodeURIComponent(value)}`;
|
||||
};
|
||||
|
||||
const f = args['folder-uri'];
|
||||
if (f) {
|
||||
const u = URI.parse(f[0]);
|
||||
gotFolder = true;
|
||||
addQueryParameter('folder', u.path);
|
||||
}
|
||||
if (!gotFolder) {
|
||||
// request empty window
|
||||
addQueryParameter('ew', 'true');
|
||||
}
|
||||
|
||||
const ep = args['extensionDevelopmentPath'];
|
||||
if (ep) {
|
||||
let u = ep[0];
|
||||
addQueryParameter('edp', u);
|
||||
}
|
||||
|
||||
const di = args['debugId'];
|
||||
if (di) {
|
||||
addQueryParameter('di', di);
|
||||
}
|
||||
|
||||
const ibe = args['inspect-brk-extensions'];
|
||||
if (ibe) {
|
||||
addQueryParameter('ibe', ibe);
|
||||
}
|
||||
|
||||
window.open(newAddress);
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
registerSingleton(IExtensionHostDebugService, BrowserExtensionHostDebugService);
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 12.6L10.7 13.3L12.3 11.7L13.9 13.3L14.7 12.6L13 11L14.7 9.40005L13.9 8.60005L12.3 10.3L10.7 8.60005L10 9.40005L11.6 11L10 12.6Z" fill="#C5C5C5"/>
|
||||
<path d="M1 4L15 4L15 3L1 3L1 4Z" fill="#C5C5C5"/>
|
||||
<path d="M1 7L15 7L15 6L1 6L1 7Z" fill="#C5C5C5"/>
|
||||
<path d="M9 9.5L9 9L1 9L1 10L9 10L9 9.5Z" fill="#C5C5C5"/>
|
||||
<path d="M9 13L9 12.5L9 12L1 12L1 13L9 13Z" fill="#C5C5C5"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 484 B |
|
@ -1,7 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 12.6L10.7 13.3L12.3 11.7L13.9 13.3L14.7 12.6L13 11L14.7 9.40005L13.9 8.60005L12.3 10.3L10.7 8.60005L10 9.40005L11.6 11L10 12.6Z" fill="white"/>
|
||||
<path d="M1 4L15 4L15 3L1 3L1 4Z" fill="white"/>
|
||||
<path d="M1 7L15 7L15 6L1 6L1 7Z" fill="white"/>
|
||||
<path d="M9 9.5L9 9L1 9L1 10L9 10L9 9.5Z" fill="white"/>
|
||||
<path d="M9 13L9 12.5L9 12L1 12L1 13L9 13Z" fill="white"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 474 B |
|
@ -1,7 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 12.6L10.7 13.3L12.3 11.7L13.9 13.3L14.7 12.6L13 11L14.7 9.40005L13.9 8.60005L12.3 10.3L10.7 8.60005L10 9.40005L11.6 11L10 12.6Z" fill="#424242"/>
|
||||
<path d="M1 4L15 4L15 3L1 3L1 4Z" fill="#424242"/>
|
||||
<path d="M1 7L15 7L15 6L1 6L1 7Z" fill="#424242"/>
|
||||
<path d="M9 9.5L9 9L1 9L1 10L9 10L9 9.5Z" fill="#424242"/>
|
||||
<path d="M9 13L9 12.5L9 12L1 12L1 13L9 13Z" fill="#424242"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 484 B |
|
@ -21,6 +21,14 @@
|
|||
background: url('breakpoint-disabled.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor .inline-breakpoint-widget.debug-breakpoint-disabled:hover {
|
||||
background: url('breakpoint-hint.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor .inline-breakpoint-widget.line-start {
|
||||
left: -0.45em !important;
|
||||
}
|
||||
|
||||
.debug-breakpoint-unverified,
|
||||
.monaco-editor .inline-breakpoint-widget.debug-breakpoint-unverified {
|
||||
background: url('breakpoint-unverified.svg') center center no-repeat;
|
||||
|
@ -57,6 +65,7 @@
|
|||
width: 1.3em;
|
||||
height: 1.3em;
|
||||
margin-left: 0.61em;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.debug-function-breakpoint {
|
||||
|
|
|
@ -88,19 +88,6 @@
|
|||
font-size: 9px;
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
.debug-action.clear-repl {
|
||||
background: url('clear-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .debug-action.clear-repl {
|
||||
background: url('clear-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.hc-black .debug-action.clear-repl {
|
||||
background: url('clear-hc.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
/* Output coloring and styling */
|
||||
.repl .repl-tree .output.expression > .ignore {
|
||||
font-style: italic;
|
||||
|
|
|
@ -13,7 +13,7 @@ import { formatPII, isUri } from 'vs/workbench/contrib/debug/common/debugUtils';
|
|||
import { IDebugAdapter, IConfig, AdapterEndEvent, IDebugger } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { createErrorWithActions } from 'vs/base/common/errorsWithActions';
|
||||
import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { env as processEnv } from 'vs/base/common/process';
|
||||
|
@ -79,7 +79,7 @@ export class RawDebugSession implements IDisposable {
|
|||
dbgr: IDebugger,
|
||||
private readonly telemetryService: ITelemetryService,
|
||||
public readonly customTelemetryService: ITelemetryService | undefined,
|
||||
private readonly windowsService: IWindowsService,
|
||||
private readonly extensionHostDebugService: IExtensionHostDebugService,
|
||||
private readonly openerService: IOpenerService
|
||||
|
||||
) {
|
||||
|
@ -632,7 +632,7 @@ export class RawDebugSession implements IDisposable {
|
|||
Object.keys(env).filter(k => env[k] === null).forEach(key => delete env[key]);
|
||||
}
|
||||
|
||||
return this.windowsService.openExtensionDevelopmentHostWindow(args, env);
|
||||
return this.extensionHostDebugService.openExtensionDevelopmentHostWindow(args, env);
|
||||
}
|
||||
|
||||
private send<R extends DebugProtocol.Response>(command: string, args: any, token?: CancellationToken, timeout?: number): Promise<R> {
|
||||
|
|