@theia/core 1.18.0 → 1.19.0

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.
Files changed (200) hide show
  1. package/README.md +3 -2
  2. package/lib/browser/about-dialog.d.ts.map +1 -1
  3. package/lib/browser/about-dialog.js +1 -1
  4. package/lib/browser/about-dialog.js.map +1 -1
  5. package/lib/browser/authentication-service.d.ts.map +1 -1
  6. package/lib/browser/authentication-service.js +1 -1
  7. package/lib/browser/authentication-service.js.map +1 -1
  8. package/lib/browser/common-frontend-contribution.d.ts +6 -0
  9. package/lib/browser/common-frontend-contribution.d.ts.map +1 -1
  10. package/lib/browser/common-frontend-contribution.js +122 -118
  11. package/lib/browser/common-frontend-contribution.js.map +1 -1
  12. package/lib/browser/core-preferences.d.ts +1 -0
  13. package/lib/browser/core-preferences.d.ts.map +1 -1
  14. package/lib/browser/core-preferences.js +25 -18
  15. package/lib/browser/core-preferences.js.map +1 -1
  16. package/lib/browser/dialogs.d.ts +6 -0
  17. package/lib/browser/dialogs.d.ts.map +1 -1
  18. package/lib/browser/dialogs.js +10 -3
  19. package/lib/browser/dialogs.js.map +1 -1
  20. package/lib/browser/frontend-application-module.d.ts.map +1 -1
  21. package/lib/browser/frontend-application-module.js +3 -0
  22. package/lib/browser/frontend-application-module.js.map +1 -1
  23. package/lib/browser/frontend-application.d.ts +6 -0
  24. package/lib/browser/frontend-application.d.ts.map +1 -1
  25. package/lib/browser/frontend-application.js +13 -0
  26. package/lib/browser/frontend-application.js.map +1 -1
  27. package/lib/browser/index.d.ts +1 -0
  28. package/lib/browser/index.d.ts.map +1 -1
  29. package/lib/browser/index.js +1 -0
  30. package/lib/browser/index.js.map +1 -1
  31. package/lib/browser/keyboard/browser-keyboard-frontend-contribution.d.ts.map +1 -1
  32. package/lib/browser/keyboard/browser-keyboard-frontend-contribution.js +16 -11
  33. package/lib/browser/keyboard/browser-keyboard-frontend-contribution.js.map +1 -1
  34. package/lib/browser/menu/browser-context-menu-renderer.d.ts +1 -1
  35. package/lib/browser/menu/browser-context-menu-renderer.d.ts.map +1 -1
  36. package/lib/browser/menu/browser-menu-plugin.d.ts +3 -0
  37. package/lib/browser/menu/browser-menu-plugin.d.ts.map +1 -1
  38. package/lib/browser/menu/browser-menu-plugin.js +24 -4
  39. package/lib/browser/menu/browser-menu-plugin.js.map +1 -1
  40. package/lib/browser/nls-loader.d.ts +17 -0
  41. package/lib/browser/nls-loader.d.ts.map +1 -0
  42. package/lib/browser/nls-loader.js +29 -0
  43. package/lib/browser/nls-loader.js.map +1 -0
  44. package/lib/browser/progress-status-bar-item.d.ts +1 -2
  45. package/lib/browser/progress-status-bar-item.d.ts.map +1 -1
  46. package/lib/browser/progress-status-bar-item.js.map +1 -1
  47. package/lib/browser/quick-input/quick-command-frontend-contribution.d.ts.map +1 -1
  48. package/lib/browser/quick-input/quick-command-frontend-contribution.js +2 -1
  49. package/lib/browser/quick-input/quick-command-frontend-contribution.js.map +1 -1
  50. package/lib/browser/quick-input/quick-command-service.d.ts.map +1 -1
  51. package/lib/browser/quick-input/quick-command-service.js +2 -2
  52. package/lib/browser/quick-input/quick-command-service.js.map +1 -1
  53. package/lib/browser/quick-input/quick-view-service.d.ts +1 -2
  54. package/lib/browser/quick-input/quick-view-service.d.ts.map +1 -1
  55. package/lib/browser/quick-input/quick-view-service.js.map +1 -1
  56. package/lib/browser/shell/application-shell.d.ts +3 -1
  57. package/lib/browser/shell/application-shell.d.ts.map +1 -1
  58. package/lib/browser/shell/application-shell.js +1 -2
  59. package/lib/browser/shell/application-shell.js.map +1 -1
  60. package/lib/browser/shell/shell-layout-restorer.d.ts.map +1 -1
  61. package/lib/browser/shell/shell-layout-restorer.js +5 -3
  62. package/lib/browser/shell/shell-layout-restorer.js.map +1 -1
  63. package/lib/browser/shell/tab-bar-decorator.d.ts +1 -1
  64. package/lib/browser/shell/tab-bar-decorator.d.ts.map +1 -1
  65. package/lib/browser/shell/tab-bar-decorator.js.map +1 -1
  66. package/lib/browser/shell/tab-bar-toolbar.d.ts.map +1 -1
  67. package/lib/browser/shell/tab-bar-toolbar.js +2 -1
  68. package/lib/browser/shell/tab-bar-toolbar.js.map +1 -1
  69. package/lib/browser/shell/tab-bars.d.ts +14 -1
  70. package/lib/browser/shell/tab-bars.d.ts.map +1 -1
  71. package/lib/browser/shell/tab-bars.js +99 -7
  72. package/lib/browser/shell/tab-bars.js.map +1 -1
  73. package/lib/browser/tooltip-service.d.ts +52 -0
  74. package/lib/browser/tooltip-service.d.ts.map +1 -0
  75. package/lib/browser/tooltip-service.js +89 -0
  76. package/lib/browser/tooltip-service.js.map +1 -0
  77. package/lib/browser/tree/tree-model.d.ts.map +1 -1
  78. package/lib/browser/view-container.d.ts +55 -14
  79. package/lib/browser/view-container.d.ts.map +1 -1
  80. package/lib/browser/view-container.js +284 -66
  81. package/lib/browser/view-container.js.map +1 -1
  82. package/lib/browser/window/default-window-service.js +2 -2
  83. package/lib/browser/window/default-window-service.js.map +1 -1
  84. package/lib/browser/window/window-service.d.ts +1 -7
  85. package/lib/browser/window/window-service.d.ts.map +1 -1
  86. package/lib/browser/window/window-service.js +1 -5
  87. package/lib/browser/window/window-service.js.map +1 -1
  88. package/lib/browser/window-contribution.d.ts.map +1 -1
  89. package/lib/browser/window-contribution.js +2 -2
  90. package/lib/browser/window-contribution.js.map +1 -1
  91. package/lib/common/command.d.ts.map +1 -1
  92. package/lib/common/command.js +1 -2
  93. package/lib/common/command.js.map +1 -1
  94. package/lib/common/i18n/localization.d.ts +5 -0
  95. package/lib/common/i18n/localization.d.ts.map +1 -1
  96. package/lib/common/i18n/localization.js +43 -1
  97. package/lib/common/i18n/localization.js.map +1 -1
  98. package/lib/common/index.d.ts +1 -0
  99. package/lib/common/index.d.ts.map +1 -1
  100. package/lib/common/index.js +1 -0
  101. package/lib/common/index.js.map +1 -1
  102. package/lib/{browser → common}/nls.d.ts +3 -2
  103. package/lib/common/nls.d.ts.map +1 -0
  104. package/lib/common/nls.js +29 -0
  105. package/lib/common/nls.js.map +1 -0
  106. package/lib/common/window.d.ts +29 -0
  107. package/lib/common/window.d.ts.map +1 -0
  108. package/lib/common/window.js +23 -0
  109. package/lib/common/window.js.map +1 -0
  110. package/lib/electron-browser/menu/electron-context-menu-renderer.d.ts +9 -5
  111. package/lib/electron-browser/menu/electron-context-menu-renderer.d.ts.map +1 -1
  112. package/lib/electron-browser/menu/electron-context-menu-renderer.js +40 -15
  113. package/lib/electron-browser/menu/electron-context-menu-renderer.js.map +1 -1
  114. package/lib/electron-browser/menu/electron-main-menu-factory.d.ts +5 -8
  115. package/lib/electron-browser/menu/electron-main-menu-factory.d.ts.map +1 -1
  116. package/lib/electron-browser/menu/electron-main-menu-factory.js +10 -17
  117. package/lib/electron-browser/menu/electron-main-menu-factory.js.map +1 -1
  118. package/lib/electron-browser/menu/electron-menu-contribution.d.ts +15 -7
  119. package/lib/electron-browser/menu/electron-menu-contribution.d.ts.map +1 -1
  120. package/lib/electron-browser/menu/electron-menu-contribution.js +112 -42
  121. package/lib/electron-browser/menu/electron-menu-contribution.js.map +1 -1
  122. package/lib/electron-browser/window/electron-window-preferences.d.ts +1 -0
  123. package/lib/electron-browser/window/electron-window-preferences.d.ts.map +1 -1
  124. package/lib/electron-browser/window/electron-window-preferences.js +12 -1
  125. package/lib/electron-browser/window/electron-window-preferences.js.map +1 -1
  126. package/lib/electron-browser/window/electron-window-service.d.ts +1 -1
  127. package/lib/electron-browser/window/electron-window-service.d.ts.map +1 -1
  128. package/lib/electron-common/electron-main-window-service.d.ts +1 -1
  129. package/lib/electron-common/electron-main-window-service.d.ts.map +1 -1
  130. package/lib/electron-common/electron-main-window-service.js.map +1 -1
  131. package/lib/electron-common/messaging/electron-messages.d.ts +20 -0
  132. package/lib/electron-common/messaging/electron-messages.d.ts.map +1 -0
  133. package/lib/electron-common/messaging/electron-messages.js +23 -0
  134. package/lib/electron-common/messaging/electron-messages.js.map +1 -0
  135. package/lib/electron-main/electron-main-application.d.ts +6 -0
  136. package/lib/electron-main/electron-main-application.d.ts.map +1 -1
  137. package/lib/electron-main/electron-main-application.js +80 -24
  138. package/lib/electron-main/electron-main-application.js.map +1 -1
  139. package/lib/electron-main/electron-main-window-service-impl.d.ts +1 -1
  140. package/lib/electron-main/electron-main-window-service-impl.d.ts.map +1 -1
  141. package/lib/electron-main/electron-main-window-service-impl.js.map +1 -1
  142. package/lib/electron-main/messaging/electron-messaging-contribution.d.ts +1 -1
  143. package/lib/electron-main/messaging/electron-messaging-contribution.d.ts.map +1 -1
  144. package/lib/electron-main/messaging/electron-messaging-contribution.js +1 -2
  145. package/lib/electron-main/messaging/electron-messaging-contribution.js.map +1 -1
  146. package/package.json +6 -4
  147. package/shared/@theia/application-package/lib/api.d.ts +1 -0
  148. package/shared/@theia/application-package/lib/api.js +1 -0
  149. package/src/browser/about-dialog.tsx +2 -2
  150. package/src/browser/authentication-service.ts +1 -2
  151. package/src/browser/common-frontend-contribution.ts +99 -95
  152. package/src/browser/core-preferences.ts +28 -18
  153. package/src/browser/dialogs.ts +10 -3
  154. package/src/browser/frontend-application-module.ts +4 -0
  155. package/src/browser/frontend-application.ts +13 -0
  156. package/src/browser/index.ts +1 -0
  157. package/src/browser/keyboard/browser-keyboard-frontend-contribution.ts +16 -11
  158. package/src/browser/menu/browser-context-menu-renderer.ts +1 -1
  159. package/src/browser/menu/browser-menu-plugin.ts +25 -5
  160. package/src/browser/nls-loader.ts +26 -0
  161. package/src/browser/progress-status-bar-item.ts +1 -2
  162. package/src/browser/quick-input/quick-command-frontend-contribution.ts +2 -2
  163. package/src/browser/quick-input/quick-command-service.ts +2 -2
  164. package/src/browser/quick-input/quick-view-service.ts +1 -2
  165. package/src/browser/shell/application-shell.ts +4 -3
  166. package/src/browser/shell/shell-layout-restorer.ts +4 -3
  167. package/src/browser/shell/tab-bar-decorator.ts +1 -1
  168. package/src/browser/shell/tab-bar-toolbar.tsx +3 -1
  169. package/src/browser/shell/tab-bars.ts +103 -8
  170. package/src/browser/style/index.css +5 -0
  171. package/src/browser/style/sidepanel.css +8 -2
  172. package/src/browser/style/tabs.css +30 -0
  173. package/src/browser/style/tooltip.css +28 -0
  174. package/src/browser/style/view-container.css +9 -9
  175. package/src/browser/tooltip-service.tsx +98 -0
  176. package/src/browser/tree/tree-model.ts +1 -1
  177. package/src/browser/view-container.ts +312 -80
  178. package/src/browser/window/default-window-service.ts +1 -1
  179. package/src/browser/window/window-service.ts +1 -9
  180. package/src/browser/window-contribution.ts +2 -2
  181. package/src/common/command.ts +1 -2
  182. package/src/common/i18n/localization.ts +44 -0
  183. package/src/common/index.ts +1 -0
  184. package/src/common/nls.ts +30 -0
  185. package/src/common/window.ts +30 -0
  186. package/src/electron-browser/menu/electron-context-menu-renderer.ts +38 -16
  187. package/src/electron-browser/menu/electron-main-menu-factory.ts +10 -15
  188. package/src/electron-browser/menu/electron-menu-contribution.ts +129 -39
  189. package/src/electron-browser/menu/electron-menu-style.css +84 -0
  190. package/src/electron-browser/window/electron-window-preferences.ts +13 -1
  191. package/src/electron-browser/window/electron-window-service.ts +1 -1
  192. package/src/electron-common/electron-main-window-service.ts +1 -2
  193. package/src/electron-common/messaging/electron-messages.ts +20 -0
  194. package/src/electron-main/electron-main-application.ts +85 -21
  195. package/src/electron-main/electron-main-window-service-impl.ts +1 -2
  196. package/src/electron-main/messaging/electron-messaging-contribution.ts +1 -2
  197. package/lib/browser/nls.d.ts.map +0 -1
  198. package/lib/browser/nls.js +0 -64
  199. package/lib/browser/nls.js.map +0 -1
  200. package/src/browser/nls.ts +0 -65
@@ -0,0 +1 @@
1
+ export * from '@theia/application-package/lib/api';
@@ -0,0 +1 @@
1
+ module.exports = require('@theia/application-package/lib/api');
@@ -16,7 +16,7 @@
16
16
 
17
17
  import * as React from 'react';
18
18
  import { inject, injectable, postConstruct } from 'inversify';
19
- import { DialogProps } from './dialogs';
19
+ import { Dialog, DialogProps } from './dialogs';
20
20
  import { ReactDialog } from './dialogs/react-dialog';
21
21
  import { ApplicationServer, ApplicationInfo, ExtensionInfo } from '../common/application-protocol';
22
22
  import { Message } from './widgets/widget';
@@ -44,7 +44,7 @@ export class AboutDialog extends ReactDialog<void> {
44
44
  super({
45
45
  title: FrontendApplicationConfigProvider.get().applicationName,
46
46
  });
47
- this.appendAcceptButton('Ok');
47
+ this.appendAcceptButton(Dialog.OK);
48
48
  }
49
49
 
50
50
  @postConstruct()
@@ -23,10 +23,9 @@
23
23
  import { injectable, inject, postConstruct } from 'inversify';
24
24
  import { Emitter, Event } from '../common/event';
25
25
  import { StorageService } from '../browser/storage-service';
26
- import { Disposable } from '../common/disposable';
26
+ import { Disposable, DisposableCollection } from '../common/disposable';
27
27
  import { ACCOUNTS_MENU, ACCOUNTS_SUBMENU, MenuModelRegistry } from '../common/menu';
28
28
  import { Command, CommandRegistry } from '../common/command';
29
- import { DisposableCollection } from '../common/disposable';
30
29
 
31
30
  export interface AuthenticationSessionsChangeEvent {
32
31
  added: ReadonlyArray<string>;
@@ -54,7 +54,7 @@ import { AuthenticationService } from './authentication-service';
54
54
  import { FormatType } from './saveable';
55
55
  import { QuickInputService, QuickPick, QuickPickItem } from './quick-input';
56
56
  import { AsyncLocalizationProvider } from '../common/i18n/localization';
57
- import { nls } from './nls';
57
+ import { nls } from '../common/nls';
58
58
 
59
59
  export namespace CommonMenus {
60
60
 
@@ -90,192 +90,196 @@ export namespace CommonMenus {
90
90
 
91
91
  export namespace CommonCommands {
92
92
 
93
- const FILE_CATEGORY = 'File';
94
- const VIEW_CATEGORY = 'View';
93
+ export const FILE_CATEGORY_KEY = 'vscode/menubarControl/mFile';
94
+ export const VIEW_CATEGORY_KEY = 'vscode/menubarControl/mView';
95
+ export const PREFERENCES_CATEGORY_KEY = 'vscode/actions/preferences';
96
+ export const FILE_CATEGORY = 'File';
97
+ export const VIEW_CATEGORY = 'View';
98
+ export const PREFERENCES_CATEGORY = 'Preferences';
95
99
 
96
100
  export const OPEN: Command = {
97
101
  id: 'core.open',
98
102
  };
99
103
 
100
- export const CUT: Command = {
104
+ export const CUT = Command.toLocalizedCommand({
101
105
  id: 'core.cut',
102
106
  label: 'Cut'
103
- };
104
- export const COPY: Command = {
107
+ }, 'vscode/fileActions.contribution/cut');
108
+ export const COPY = Command.toLocalizedCommand({
105
109
  id: 'core.copy',
106
110
  label: 'Copy'
107
- };
108
- export const PASTE: Command = {
111
+ }, 'vscode/fileActions/copyFile');
112
+ export const PASTE = Command.toLocalizedCommand({
109
113
  id: 'core.paste',
110
114
  label: 'Paste'
111
- };
115
+ }, 'vscode/fileActions/pasteFile');
112
116
 
113
- export const COPY_PATH: Command = {
117
+ export const COPY_PATH = Command.toLocalizedCommand({
114
118
  id: 'core.copy.path',
115
119
  label: 'Copy Path'
116
- };
120
+ }, 'vscode/fileActions.contribution/copyPath');
117
121
 
118
- export const UNDO: Command = {
122
+ export const UNDO = Command.toLocalizedCommand({
119
123
  id: 'core.undo',
120
124
  label: 'Undo'
121
- };
122
- export const REDO: Command = {
125
+ }, 'vscode/textInputActions/undo');
126
+ export const REDO = Command.toLocalizedCommand({
123
127
  id: 'core.redo',
124
128
  label: 'Redo'
125
- };
126
- export const SELECT_ALL: Command = {
129
+ }, 'vscode/textInputActions/redo');
130
+ export const SELECT_ALL = Command.toLocalizedCommand({
127
131
  id: 'core.selectAll',
128
132
  label: 'Select All'
129
- };
133
+ }, 'vscode/textInputActions/selectAll');
130
134
 
131
- export const FIND: Command = {
135
+ export const FIND = Command.toLocalizedCommand({
132
136
  id: 'core.find',
133
137
  label: 'Find'
134
- };
135
- export const REPLACE: Command = {
138
+ }, 'vscode/simpleFindReplaceWidget/label.find');
139
+ export const REPLACE = Command.toLocalizedCommand({
136
140
  id: 'core.replace',
137
141
  label: 'Replace'
138
- };
142
+ }, 'vscode/simpleFindReplaceWidget/label.replace');
139
143
 
140
- export const NEXT_TAB: Command = {
144
+ export const NEXT_TAB = Command.toLocalizedCommand({
141
145
  id: 'core.nextTab',
142
146
  category: VIEW_CATEGORY,
143
147
  label: 'Switch to Next Tab'
144
- };
145
- export const PREVIOUS_TAB: Command = {
148
+ }, 'vscode/menubar/mShowNextTab', VIEW_CATEGORY_KEY);
149
+ export const PREVIOUS_TAB = Command.toLocalizedCommand({
146
150
  id: 'core.previousTab',
147
151
  category: VIEW_CATEGORY,
148
152
  label: 'Switch to Previous Tab'
149
- };
150
- export const NEXT_TAB_IN_GROUP: Command = {
153
+ }, 'vscode/menubar/mShowPreviousTab', VIEW_CATEGORY_KEY);
154
+ export const NEXT_TAB_IN_GROUP = Command.toLocalizedCommand({
151
155
  id: 'core.nextTabInGroup',
152
156
  category: VIEW_CATEGORY,
153
157
  label: 'Switch to Next Tab in Group'
154
- };
155
- export const PREVIOUS_TAB_IN_GROUP: Command = {
158
+ }, 'theia/core/common/showNextTabInGroup', VIEW_CATEGORY_KEY);
159
+ export const PREVIOUS_TAB_IN_GROUP = Command.toLocalizedCommand({
156
160
  id: 'core.previousTabInGroup',
157
161
  category: VIEW_CATEGORY,
158
162
  label: 'Switch to Previous Tab in Group'
159
- };
160
- export const NEXT_TAB_GROUP: Command = {
163
+ }, 'theia/core/common/showPreviousTabInGroup', VIEW_CATEGORY_KEY);
164
+ export const NEXT_TAB_GROUP = Command.toLocalizedCommand({
161
165
  id: 'core.nextTabGroup',
162
166
  category: VIEW_CATEGORY,
163
167
  label: 'Switch to Next Tab Group'
164
- };
165
- export const PREVIOUS_TAB_GROUP: Command = {
168
+ }, 'theia/core/common/showNextTabGroup', VIEW_CATEGORY_KEY);
169
+ export const PREVIOUS_TAB_GROUP = Command.toLocalizedCommand({
166
170
  id: 'core.previousTabBar',
167
171
  category: VIEW_CATEGORY,
168
172
  label: 'Switch to Previous Tab Group'
169
- };
170
- export const CLOSE_TAB: Command = {
173
+ }, 'theia/core/common/showPreviousTabGroup', VIEW_CATEGORY_KEY);
174
+ export const CLOSE_TAB = Command.toLocalizedCommand({
171
175
  id: 'core.close.tab',
172
176
  category: VIEW_CATEGORY,
173
177
  label: 'Close Tab'
174
- };
175
- export const CLOSE_OTHER_TABS: Command = {
178
+ }, 'theia/core/common/closeTab', VIEW_CATEGORY_KEY);
179
+ export const CLOSE_OTHER_TABS = Command.toLocalizedCommand({
176
180
  id: 'core.close.other.tabs',
177
181
  category: VIEW_CATEGORY,
178
182
  label: 'Close Other Tabs'
179
- };
180
- export const CLOSE_RIGHT_TABS: Command = {
183
+ }, 'theia/core/common/closeOthers', VIEW_CATEGORY_KEY);
184
+ export const CLOSE_RIGHT_TABS = Command.toLocalizedCommand({
181
185
  id: 'core.close.right.tabs',
182
186
  category: VIEW_CATEGORY,
183
187
  label: 'Close Tabs to the Right'
184
- };
185
- export const CLOSE_ALL_TABS: Command = {
188
+ }, 'theia/core/common/closeRight', VIEW_CATEGORY_KEY);
189
+ export const CLOSE_ALL_TABS = Command.toLocalizedCommand({
186
190
  id: 'core.close.all.tabs',
187
191
  category: VIEW_CATEGORY,
188
192
  label: 'Close All Tabs'
189
- };
190
- export const CLOSE_MAIN_TAB: Command = {
193
+ }, 'theia/core/common/closeAll', VIEW_CATEGORY_KEY);
194
+ export const CLOSE_MAIN_TAB = Command.toLocalizedCommand({
191
195
  id: 'core.close.main.tab',
192
196
  category: VIEW_CATEGORY,
193
197
  label: 'Close Tab in Main Area'
194
- };
195
- export const CLOSE_OTHER_MAIN_TABS: Command = {
198
+ }, 'theia/core/common/closeTabMain', VIEW_CATEGORY_KEY);
199
+ export const CLOSE_OTHER_MAIN_TABS = Command.toLocalizedCommand({
196
200
  id: 'core.close.other.main.tabs',
197
201
  category: VIEW_CATEGORY,
198
202
  label: 'Close Other Tabs in Main Area'
199
- };
200
- export const CLOSE_ALL_MAIN_TABS: Command = {
203
+ }, 'theia/core/common/closeOtherTabMain', VIEW_CATEGORY_KEY);
204
+ export const CLOSE_ALL_MAIN_TABS = Command.toLocalizedCommand({
201
205
  id: 'core.close.all.main.tabs',
202
206
  category: VIEW_CATEGORY,
203
207
  label: 'Close All Tabs in Main Area'
204
- };
205
- export const COLLAPSE_PANEL: Command = {
208
+ }, 'theia/core/common/closeAllTabMain', VIEW_CATEGORY_KEY);
209
+ export const COLLAPSE_PANEL = Command.toLocalizedCommand({
206
210
  id: 'core.collapse.tab',
207
211
  category: VIEW_CATEGORY,
208
212
  label: 'Collapse Side Panel'
209
- };
210
- export const COLLAPSE_ALL_PANELS: Command = {
213
+ }, 'theia/core/common/collapseTab', VIEW_CATEGORY_KEY);
214
+ export const COLLAPSE_ALL_PANELS = Command.toLocalizedCommand({
211
215
  id: 'core.collapse.all.tabs',
212
216
  category: VIEW_CATEGORY,
213
217
  label: 'Collapse All Side Panels'
214
- };
215
- export const TOGGLE_BOTTOM_PANEL: Command = {
218
+ }, 'theia/core/common/collapseAllTabs', VIEW_CATEGORY_KEY);
219
+ export const TOGGLE_BOTTOM_PANEL = Command.toLocalizedCommand({
216
220
  id: 'core.toggle.bottom.panel',
217
221
  category: VIEW_CATEGORY,
218
222
  label: 'Toggle Bottom Panel'
219
- };
220
- export const TOGGLE_STATUS_BAR: Command = {
223
+ }, 'theia/core/common/collapseBottomPanel', VIEW_CATEGORY_KEY);
224
+ export const TOGGLE_STATUS_BAR = Command.toLocalizedCommand({
221
225
  id: 'workbench.action.toggleStatusbarVisibility',
222
226
  category: VIEW_CATEGORY,
223
227
  label: 'Toggle Status Bar Visibility'
224
- };
225
- export const TOGGLE_MAXIMIZED: Command = {
228
+ }, 'vscode/layoutActions/toggleStatusbar');
229
+ export const TOGGLE_MAXIMIZED = Command.toLocalizedCommand({
226
230
  id: 'core.toggleMaximized',
227
231
  category: VIEW_CATEGORY,
228
232
  label: 'Toggle Maximized'
229
- };
230
- export const OPEN_VIEW: Command = {
233
+ }, 'theia/core/common/toggleMaximized', VIEW_CATEGORY_KEY);
234
+ export const OPEN_VIEW = Command.toLocalizedCommand({
231
235
  id: 'core.openView',
232
236
  category: VIEW_CATEGORY,
233
237
  label: 'Open View...'
234
- };
238
+ }, 'vscode/quickAccess.contribution/miOpenView', VIEW_CATEGORY_KEY);
235
239
 
236
- export const SAVE: Command = {
240
+ export const SAVE = Command.toLocalizedCommand({
237
241
  id: 'core.save',
238
242
  category: FILE_CATEGORY,
239
243
  label: 'Save',
240
- };
241
- export const SAVE_WITHOUT_FORMATTING: Command = {
244
+ }, 'vscode/fileCommands/save', FILE_CATEGORY_KEY);
245
+ export const SAVE_WITHOUT_FORMATTING = Command.toLocalizedCommand({
242
246
  id: 'core.saveWithoutFormatting',
243
247
  category: FILE_CATEGORY,
244
248
  label: 'Save without Formatting',
245
- };
246
- export const SAVE_ALL: Command = {
249
+ }, 'vscode/fileCommands/saveWithoutFormatting', FILE_CATEGORY_KEY);
250
+ export const SAVE_ALL = Command.toLocalizedCommand({
247
251
  id: 'core.saveAll',
248
252
  category: FILE_CATEGORY,
249
253
  label: 'Save All',
250
- };
254
+ }, 'vscode/fileCommands/saveAll', FILE_CATEGORY_KEY);
251
255
 
252
- export const AUTO_SAVE: Command = {
256
+ export const AUTO_SAVE = Command.toLocalizedCommand({
253
257
  id: 'textEditor.commands.autosave',
254
258
  category: FILE_CATEGORY,
255
259
  label: 'Auto Save',
256
- };
260
+ }, 'vscode/fileActions.contribution/miAutoSave', FILE_CATEGORY_KEY);
257
261
 
258
- export const ABOUT_COMMAND: Command = {
262
+ export const ABOUT_COMMAND = Command.toLocalizedCommand({
259
263
  id: 'core.about',
260
264
  label: 'About'
261
- };
265
+ }, 'vscode/windowActions/about');
262
266
 
263
- export const OPEN_PREFERENCES: Command = {
267
+ export const OPEN_PREFERENCES = Command.toLocalizedCommand({
264
268
  id: 'preferences:open',
265
- category: 'Settings',
269
+ category: PREFERENCES_CATEGORY,
266
270
  label: 'Open Preferences',
267
- };
271
+ }, 'vscode/preferences.contribution/preferences', PREFERENCES_CATEGORY_KEY);
268
272
 
269
- export const SELECT_COLOR_THEME: Command = {
273
+ export const SELECT_COLOR_THEME = Command.toLocalizedCommand({
270
274
  id: 'workbench.action.selectTheme',
271
275
  label: 'Color Theme',
272
- category: 'Preferences'
273
- };
274
- export const SELECT_ICON_THEME: Command = {
276
+ category: PREFERENCES_CATEGORY
277
+ }, 'vscode/themes.contribution/selectTheme.label', PREFERENCES_CATEGORY_KEY);
278
+ export const SELECT_ICON_THEME = Command.toLocalizedCommand({
275
279
  id: 'workbench.action.selectIconTheme',
276
280
  label: 'File Icon Theme',
277
- category: 'Preferences'
278
- };
281
+ category: PREFERENCES_CATEGORY
282
+ }, 'vscode/themes.contribution/selectIconTheme.label', PREFERENCES_CATEGORY_KEY);
279
283
 
280
284
  export const CONFIGURE_DISPLAY_LANGUAGE = Command.toLocalizedCommand({
281
285
  id: 'workbench.action.configureLanguage',
@@ -370,14 +374,14 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
370
374
  app.shell.leftPanelHandler.addBottomMenu({
371
375
  id: 'settings-menu',
372
376
  iconClass: 'codicon codicon-settings-gear',
373
- title: 'Settings',
377
+ title: nls.localize(CommonCommands.PREFERENCES_CATEGORY_KEY, CommonCommands.PREFERENCES_CATEGORY),
374
378
  menuPath: SETTINGS_MENU,
375
379
  order: 0,
376
380
  });
377
381
  const accountsMenu = {
378
382
  id: 'accounts-menu',
379
383
  iconClass: 'codicon codicon-person',
380
- title: 'Accounts',
384
+ title: nls.localize('vscode/activitybarPart/accounts', 'Accounts'),
381
385
  menuPath: ACCOUNTS_MENU,
382
386
  order: 1,
383
387
  };
@@ -442,7 +446,7 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
442
446
  this.shell.leftPanelHandler.addTopMenu({
443
447
  id: mainMenuId,
444
448
  iconClass: 'codicon codicon-menu',
445
- title: 'Application Menu',
449
+ title: nls.localize('vscode/menubar/mAppMenu', 'Application Menu'),
446
450
  menuPath: ['menubar'],
447
451
  order: 0,
448
452
  });
@@ -475,10 +479,10 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
475
479
  }
476
480
 
477
481
  registerMenus(registry: MenuModelRegistry): void {
478
- registry.registerSubmenu(CommonMenus.FILE, 'File');
479
- registry.registerSubmenu(CommonMenus.EDIT, 'Edit');
480
- registry.registerSubmenu(CommonMenus.VIEW, 'View');
481
- registry.registerSubmenu(CommonMenus.HELP, 'Help');
482
+ registry.registerSubmenu(CommonMenus.FILE, nls.localize('vscode/menubarControl/mFile', 'File'));
483
+ registry.registerSubmenu(CommonMenus.EDIT, nls.localize('vscode/menubarControl/mEdit', 'Edit'));
484
+ registry.registerSubmenu(CommonMenus.VIEW, nls.localize('vscode/menubarControl/mView', 'View'));
485
+ registry.registerSubmenu(CommonMenus.HELP, nls.localize('vscode/menubarControl/mHelp', 'Help'));
482
486
 
483
487
  registry.registerMenuAction(CommonMenus.FILE_SAVE, {
484
488
  commandId: CommonCommands.SAVE.id
@@ -491,7 +495,7 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
491
495
  commandId: CommonCommands.AUTO_SAVE.id
492
496
  });
493
497
 
494
- registry.registerSubmenu(CommonMenus.FILE_SETTINGS_SUBMENU, 'Settings');
498
+ registry.registerSubmenu(CommonMenus.FILE_SETTINGS_SUBMENU, nls.localize(CommonCommands.PREFERENCES_CATEGORY_KEY, CommonCommands.PREFERENCES_CATEGORY));
495
499
 
496
500
  registry.registerMenuAction(CommonMenus.EDIT_UNDO, {
497
501
  commandId: CommonCommands.UNDO.id,
@@ -544,37 +548,37 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
544
548
 
545
549
  registry.registerMenuAction(SHELL_TABBAR_CONTEXT_MENU, {
546
550
  commandId: CommonCommands.CLOSE_TAB.id,
547
- label: 'Close',
551
+ label: nls.localize('vscode/editor.contribution/close', 'Close'),
548
552
  order: '0'
549
553
  });
550
554
  registry.registerMenuAction(SHELL_TABBAR_CONTEXT_MENU, {
551
555
  commandId: CommonCommands.CLOSE_OTHER_TABS.id,
552
- label: 'Close Others',
556
+ label: nls.localize('vscode/editor.contribution/closeOthers', 'Close Others'),
553
557
  order: '1'
554
558
  });
555
559
  registry.registerMenuAction(SHELL_TABBAR_CONTEXT_MENU, {
556
560
  commandId: CommonCommands.CLOSE_RIGHT_TABS.id,
557
- label: 'Close to the Right',
561
+ label: nls.localize('vscode/editor.contribution/closeRight', 'Close to the Right'),
558
562
  order: '2'
559
563
  });
560
564
  registry.registerMenuAction(SHELL_TABBAR_CONTEXT_MENU, {
561
565
  commandId: CommonCommands.CLOSE_ALL_TABS.id,
562
- label: 'Close All',
566
+ label: nls.localize('vscode/editor.contribution/closeAll', 'Close All'),
563
567
  order: '3'
564
568
  });
565
569
  registry.registerMenuAction(SHELL_TABBAR_CONTEXT_MENU, {
566
570
  commandId: CommonCommands.COLLAPSE_PANEL.id,
567
- label: 'Collapse',
571
+ label: CommonCommands.COLLAPSE_PANEL.label,
568
572
  order: '4'
569
573
  });
570
574
  registry.registerMenuAction(SHELL_TABBAR_CONTEXT_MENU, {
571
575
  commandId: CommonCommands.TOGGLE_MAXIMIZED.id,
572
- label: 'Toggle Maximized',
576
+ label: CommonCommands.TOGGLE_MAXIMIZED.label,
573
577
  order: '5'
574
578
  });
575
579
  registry.registerMenuAction(CommonMenus.HELP, {
576
580
  commandId: CommonCommands.ABOUT_COMMAND.id,
577
- label: 'About',
581
+ label: CommonCommands.ABOUT_COMMAND.label,
578
582
  order: '9'
579
583
  });
580
584
 
@@ -1072,7 +1076,7 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
1072
1076
 
1073
1077
  this.quickInputService?.showQuickPick(items,
1074
1078
  {
1075
- placeholder: 'Select File Icon Theme',
1079
+ placeholder: nls.localize('vscode/extensionsActions/select file icon theme', 'Select File Icon Theme'),
1076
1080
  activeItem: items.find(item => item.id === resetTo),
1077
1081
  onDidChangeSelection: (quickPick: QuickPick<QuickPickItem>, selectedItems: Array<QuickPickItem>) => {
1078
1082
  resetTo = undefined;
@@ -1111,7 +1115,7 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
1111
1115
  const items = [...itemsByTheme.light, ...itemsByTheme.dark, ...itemsByTheme.hc];
1112
1116
  this.quickInputService?.showQuickPick(items,
1113
1117
  {
1114
- placeholder: 'Select Color Theme (Up/Down Keys to Preview)',
1118
+ placeholder: nls.localize('vscode/extensionActions/select color theme', 'Select Color Theme (Up/Down Keys to Preview)'),
1115
1119
  activeItem: items.find((item: QuickPickItem) => item.id === resetTo),
1116
1120
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1117
1121
  onDidChangeSelection: (quickPick: any, selectedItems: Array<QuickPickItem>) => {
@@ -19,6 +19,7 @@ import { createPreferenceProxy, PreferenceProxy, PreferenceService, PreferenceCo
19
19
  import { SUPPORTED_ENCODINGS } from './supported-encodings';
20
20
  import { FrontendApplicationConfigProvider } from './frontend-application-config-provider';
21
21
  import { isOSX } from '../common/os';
22
+ import { nls } from '../common/nls';
22
23
 
23
24
  export const corePreferenceSchema: PreferenceSchema = {
24
25
  'type': 'object',
@@ -31,19 +32,20 @@ export const corePreferenceSchema: PreferenceSchema = {
31
32
  'always',
32
33
  ],
33
34
  default: 'ifRequired',
34
- description: 'When to confirm before closing the application window.',
35
+ description: nls.localize('vscode/workbench.contribution/confirmBeforeCloseWeb', 'When to confirm before closing the application window.'),
35
36
  },
36
37
  'breadcrumbs.enabled': {
37
38
  'type': 'boolean',
38
39
  'default': true,
39
- 'description': 'Enable/disable navigation breadcrumbs.',
40
+ 'description': nls.localize('vscode/breadcrumbs/enabled', 'Enable/disable navigation breadcrumbs.'),
40
41
  'scope': 'application'
41
42
  },
42
43
  'files.encoding': {
43
44
  'type': 'string',
44
45
  'enum': Object.keys(SUPPORTED_ENCODINGS),
45
46
  'default': 'utf8',
46
- 'description': 'The default character set encoding to use when reading and writing files. This setting can also be configured per language.',
47
+ 'description': nls.localize('vscode/files.contribution/encoding',
48
+ 'The default character set encoding to use when reading and writing files. This setting can also be configured per language.'),
47
49
  'scope': 'language-overridable',
48
50
  'enumDescriptions': Object.keys(SUPPORTED_ENCODINGS).map(key => SUPPORTED_ENCODINGS[key].labelLong),
49
51
  'included': Object.keys(SUPPORTED_ENCODINGS).length > 1
@@ -55,21 +57,22 @@ export const corePreferenceSchema: PreferenceSchema = {
55
57
  'keyCode',
56
58
  ],
57
59
  default: 'code',
58
- description: 'Whether to interpret keypresses by the `code` of the physical key, or by the `keyCode` provided by the OS.'
60
+ description: nls.localize('vscode/keybindingService/dispatch',
61
+ 'Whether to interpret keypresses by the `code` of the physical key, or by the `keyCode` provided by the OS.')
59
62
  },
60
63
  'window.menuBarVisibility': {
61
64
  type: 'string',
62
65
  enum: ['classic', 'visible', 'hidden', 'compact'],
63
66
  markdownEnumDescriptions: [
64
- 'Menu is displayed at the top of the window and only hidden in full screen mode.',
65
- 'Menu is always visible at the top of the window even in full screen mode.',
66
- 'Menu is always hidden.',
67
- 'Menu is displayed as a compact button in the sidebar.'
67
+ nls.localize('vscode/workbench.contribution/window.menuBarVisibility.default', 'Menu is displayed at the top of the window and only hidden in full screen mode.'),
68
+ nls.localize('vscode/workbench.contribution/window.menuBarVisibility.visible', 'Menu is always visible at the top of the window even in full screen mode.'),
69
+ nls.localize('vscode/workbench.contribution/window.menuBarVisibility.hidden', 'Menu is always hidden.'),
70
+ nls.localize('vscode/workbench.contribution/window.menuBarVisibility.compact', 'Menu is displayed as a compact button in the sidebar.')
68
71
  ],
69
72
  default: 'classic',
70
73
  scope: 'application',
71
- markdownDescription: `Control the visibility of the menu bar.
72
- A setting of 'compact' will move the menu into the sidebar.`,
74
+ markdownDescription: nls.localize('vscode/workbench.contribution/menuBarVisibility', `Control the visibility of the menu bar.
75
+ A setting of 'compact' will move the menu into the sidebar.`),
73
76
  included: !isOSX
74
77
  },
75
78
  'workbench.list.openMode': {
@@ -79,39 +82,40 @@ export const corePreferenceSchema: PreferenceSchema = {
79
82
  'doubleClick'
80
83
  ],
81
84
  default: 'singleClick',
82
- description: 'Controls how to open items in trees using the mouse.'
85
+ description: nls.localize('vscode/listService/openModeModifier', 'Controls how to open items in trees using the mouse.')
83
86
  },
84
87
  'workbench.editor.highlightModifiedTabs': {
85
88
  'type': 'boolean',
86
- 'description': 'Controls whether a top border is drawn on modified (dirty) editor tabs or not.',
89
+ 'description': nls.localize('vscode/workbench.contribution/highlightModifiedTabs', 'Controls whether a top border is drawn on modified (dirty) editor tabs or not.'),
87
90
  'default': false
88
91
  },
89
92
  'workbench.editor.closeOnFileDelete': {
90
93
  'type': 'boolean',
91
94
  // eslint-disable-next-line max-len
92
- 'description': 'Controls whether editors showing a file that was opened during the session should close automatically when getting deleted or renamed by some other process. Disabling this will keep the editor open on such an event. Note that deleting from within the application will always close the editor and that dirty files will never close to preserve your data.',
95
+ 'description': nls.localize('vscode/workbench.contribution/closeOnFileDelete', 'Controls whether editors showing a file that was opened during the session should close automatically when getting deleted or renamed by some other process. Disabling this will keep the editor open on such an event. Note that deleting from within the application will always close the editor and that dirty files will never close to preserve your data.'),
93
96
  'default': false
94
97
  },
95
98
  'workbench.commandPalette.history': {
96
99
  type: 'number',
97
100
  default: 50,
98
101
  minimum: 0,
99
- description: 'Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history.'
102
+ // eslint-disable-next-line max-len
103
+ description: nls.localize('vscode/workbench.contribution/commandHistory', 'Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history.')
100
104
  },
101
105
  'workbench.colorTheme': {
102
106
  type: 'string',
103
107
  default: FrontendApplicationConfigProvider.get().defaultTheme,
104
- description: 'Specifies the color theme used in the workbench.'
108
+ description: nls.localize('vscode/themeConfiguration/colorTheme', 'Specifies the color theme used in the workbench.')
105
109
  },
106
110
  'workbench.iconTheme': {
107
111
  type: ['string', 'null'],
108
112
  default: FrontendApplicationConfigProvider.get().defaultIconTheme,
109
- description: "Specifies the icon theme used in the workbench or 'null' to not show any file icons."
113
+ description: nls.localize('vscode/themeConfiguration/iconTheme', "Specifies the icon theme used in the workbench or 'null' to not show any file icons.")
110
114
  },
111
115
  'workbench.silentNotifications': {
112
116
  type: 'boolean',
113
117
  default: false,
114
- description: 'Controls whether to suppress notification popups.'
118
+ description: nls.localize('vscode/workbench.contribution/zenMode.silentNotifications', 'Controls whether to suppress notification popups.')
115
119
  },
116
120
  'workbench.statusBar.visible': {
117
121
  type: 'boolean',
@@ -122,7 +126,12 @@ export const corePreferenceSchema: PreferenceSchema = {
122
126
  type: 'string',
123
127
  enum: ['onHover', 'none', 'always'],
124
128
  default: 'onHover',
125
- description: 'Controls whether the tree should render indent guides.'
129
+ description: nls.localize('vscode/listService/render tree indent guides', 'Controls whether the tree should render indent guides.')
130
+ },
131
+ 'workbench.hover.delay': {
132
+ type: 'number',
133
+ default: isOSX ? 1500 : 500,
134
+ description: 'Controls the delay in milliseconds after which the hover is shown for workbench items (ex. some extension provided tree view items).'
126
135
  },
127
136
  }
128
137
  };
@@ -142,6 +151,7 @@ export interface CoreConfiguration {
142
151
  'workbench.silentNotifications': boolean;
143
152
  'workbench.statusBar.visible': boolean;
144
153
  'workbench.tree.renderIndentGuides': 'onHover' | 'none' | 'always';
154
+ 'workbench.hover.delay': number;
145
155
  }
146
156
 
147
157
  export const CorePreferenceContribution = Symbol('CorePreferenceContribution');
@@ -15,7 +15,7 @@
15
15
  ********************************************************************************/
16
16
 
17
17
  import { injectable, inject } from 'inversify';
18
- import { Disposable, MaybePromise, CancellationTokenSource } from '../common';
18
+ import { Disposable, MaybePromise, CancellationTokenSource, nls } from '../common';
19
19
  import { Key } from './keyboard/keys';
20
20
  import { Widget, BaseWidget, Message, addKeyListener, codiconArray } from './widgets';
21
21
  import { FrontendApplicationContribution } from './frontend-application';
@@ -66,6 +66,13 @@ export namespace DialogError {
66
66
  }
67
67
  }
68
68
 
69
+ export namespace Dialog {
70
+ export const YES = nls.localize('vscode/extensionsUtils/yes', 'Yes');
71
+ export const NO = nls.localize('vscode/extensionsUtils/no', 'No');
72
+ export const OK = nls.localize('vscode/dialog/ok', 'OK');
73
+ export const CANCEL = nls.localize('vscode/explorerViewer/cancel', 'Cancel');
74
+ }
75
+
69
76
  @injectable()
70
77
  export class DialogOverlayService implements FrontendApplicationContribution {
71
78
 
@@ -191,14 +198,14 @@ export abstract class AbstractDialog<T> extends BaseWidget {
191
198
  this.update();
192
199
  }
193
200
 
194
- protected appendCloseButton(text: string = 'Cancel'): HTMLButtonElement {
201
+ protected appendCloseButton(text: string = Dialog.CANCEL): HTMLButtonElement {
195
202
  this.closeButton = this.createButton(text);
196
203
  this.controlPanel.appendChild(this.closeButton);
197
204
  this.closeButton.classList.add('secondary');
198
205
  return this.closeButton;
199
206
  }
200
207
 
201
- protected appendAcceptButton(text: string = 'OK'): HTMLButtonElement {
208
+ protected appendAcceptButton(text: string = Dialog.OK): HTMLButtonElement {
202
209
  this.acceptButton = this.createButton(text);
203
210
  this.controlPanel.appendChild(this.acceptButton);
204
211
  this.acceptButton.classList.add('main');
@@ -118,6 +118,7 @@ import {
118
118
  DefaultBreadcrumbRenderer,
119
119
  } from './breadcrumbs';
120
120
  import { RendererHost } from './widgets';
121
+ import { TooltipService, TooltipServiceImpl } from './tooltip-service';
121
122
 
122
123
  export { bindResourceProvider, bindMessageService, bindPreferenceService };
123
124
 
@@ -186,6 +187,9 @@ export const frontendApplicationModule = new ContainerModule((bind, unbind, isBo
186
187
  bind(CommandOpenHandler).toSelf().inSingletonScope();
187
188
  bind(OpenHandler).toService(CommandOpenHandler);
188
189
 
190
+ bind(TooltipServiceImpl).toSelf().inSingletonScope();
191
+ bind(TooltipService).toService(TooltipServiceImpl);
192
+
189
193
  bindContributionProvider(bind, ApplicationShellLayoutMigration);
190
194
  bind<ApplicationShellLayoutMigration>(ApplicationShellLayoutMigration).toConstantValue({
191
195
  layoutVersion: 2.0,