@codingame/monaco-vscode-debug-service-override 2.2.0-next.1 → 2.2.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-debug-service-override",
3
- "version": "2.2.0-next.1",
3
+ "version": "2.2.0-next.2",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,7 +18,7 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@2.2.0-next.1",
21
+ "vscode": "npm:@codingame/monaco-vscode-api@2.2.0-next.2",
22
22
  "vscode-marked": "npm:marked@=3.0.2"
23
23
  }
24
24
  }
@@ -3,19 +3,23 @@ import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeServi
3
3
  import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding';
4
4
  import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
5
5
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
6
- import { RawContextKey, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
7
- import { localize2WithPath } from 'vscode/vscode/vs/nls';
8
- import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
6
+ import { RawContextKey, ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
7
+ import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
8
+ import { CONTEXT_DEBUGGERS_AVAILABLE, CONTEXT_DEBUG_EXTENSION_AVAILABLE, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
9
9
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
10
10
  import { ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
11
11
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
12
- import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
12
+ import { Extensions, ViewContentGroups, IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
13
+ import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
13
14
  import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener';
15
+ import { WorkbenchStateContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
16
+ import { OpenFileFolderAction, OpenFileAction, OpenFolderAction } from 'vscode/vscode/vs/workbench/browser/actions/workspaceActions';
17
+ import { isMacintosh, isWeb } from 'vscode/vscode/vs/base/common/platform';
14
18
  import { isDiffEditor, isCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
15
19
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
16
20
  import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
17
21
  import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
18
- import { DEBUG_START_COMMAND_ID } from './debugCommands.js';
22
+ import { DEBUG_START_COMMAND_ID, SELECT_AND_START_ID, DEBUG_CONFIGURE_COMMAND_ID } from './debugCommands.js';
19
23
 
20
24
  const debugStartLanguageKey = 'debugStartLanguage';
21
25
  const CONTEXT_DEBUG_START_LANGUAGE = ( new RawContextKey(debugStartLanguageKey, undefined));
@@ -89,6 +93,69 @@ WelcomeView = ( __decorate([
89
93
  ( __param(11, IStorageService)),
90
94
  ( __param(12, ITelemetryService))
91
95
  ], WelcomeView));
96
+ const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
97
+ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
98
+ content: ( localizeWithPath('vs/workbench/contrib/debug/browser/welcomeView', {
99
+ key: 'openAFileWhichCanBeDebugged',
100
+ comment: [
101
+ 'Please do not translate the word "command", it is part of our internal syntax which must not change',
102
+ '{Locked="](command:{0})"}'
103
+ ]
104
+ }, "[Open a file](command:{0}) which can be debugged or run.", (isMacintosh && !isWeb) ? OpenFileFolderAction.ID : OpenFileAction.ID)),
105
+ when: ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, ( CONTEXT_DEBUGGER_INTERESTED_IN_ACTIVE_EDITOR.toNegated()))),
106
+ group: ViewContentGroups.Open,
107
+ });
92
108
  let debugKeybindingLabel = '';
109
+ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
110
+ content: `[${( localizeWithPath(
111
+ 'vs/workbench/contrib/debug/browser/welcomeView',
112
+ 'runAndDebugAction',
113
+ "Run and Debug"
114
+ ))}${debugKeybindingLabel}](command:${DEBUG_START_COMMAND_ID})`,
115
+ when: CONTEXT_DEBUGGERS_AVAILABLE,
116
+ group: ViewContentGroups.Debug,
117
+ order: 1
118
+ });
119
+ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
120
+ content: `[${( localizeWithPath(
121
+ 'vs/workbench/contrib/debug/browser/welcomeView',
122
+ 'detectThenRunAndDebug',
123
+ "Show all automatic debug configurations"
124
+ ))}](command:${SELECT_AND_START_ID}).`,
125
+ when: CONTEXT_DEBUGGERS_AVAILABLE,
126
+ group: ViewContentGroups.Debug,
127
+ order: 10
128
+ });
129
+ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
130
+ content: ( localizeWithPath('vs/workbench/contrib/debug/browser/welcomeView', {
131
+ key: 'customizeRunAndDebug',
132
+ comment: [
133
+ 'Please do not translate the word "command", it is part of our internal syntax which must not change',
134
+ '{Locked="](command:{0})"}'
135
+ ]
136
+ }, "To customize Run and Debug [create a launch.json file](command:{0}).", DEBUG_CONFIGURE_COMMAND_ID)),
137
+ when: ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, ( WorkbenchStateContext.notEqualsTo('empty')))),
138
+ group: ViewContentGroups.Debug
139
+ });
140
+ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
141
+ content: ( localizeWithPath('vs/workbench/contrib/debug/browser/welcomeView', {
142
+ key: 'customizeRunAndDebugOpenFolder',
143
+ comment: [
144
+ 'Please do not translate the word "commmand", it is part of our internal syntax which must not change',
145
+ '{Locked="](command:{0})"}'
146
+ ]
147
+ }, "To customize Run and Debug, [open a folder](command:{0}) and create a launch.json file.", (isMacintosh && !isWeb) ? OpenFileFolderAction.ID : OpenFolderAction.ID)),
148
+ when: ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, ( WorkbenchStateContext.isEqualTo('empty')))),
149
+ group: ViewContentGroups.Debug
150
+ });
151
+ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
152
+ content: ( localizeWithPath(
153
+ 'vs/workbench/contrib/debug/browser/welcomeView',
154
+ 'allDebuggersDisabled',
155
+ "All debug extensions are disabled. Enable a debug extension or install a new one from the Marketplace."
156
+ )),
157
+ when: ( CONTEXT_DEBUG_EXTENSION_AVAILABLE.toNegated()),
158
+ group: ViewContentGroups.Debug
159
+ });
93
160
 
94
161
  export { WelcomeView };