UNPKG

124 kBJavaScriptView Raw
1"use strict";
2// *****************************************************************************
3// Copyright (C) 2017 TypeFox and others.
4//
5// This program and the accompanying materials are made available under the
6// terms of the Eclipse Public License v. 2.0 which is available at
7// http://www.eclipse.org/legal/epl-2.0.
8//
9// This Source Code may also be made available under the following Secondary
10// Licenses when the conditions for such availability set forth in the Eclipse
11// Public License v. 2.0 are satisfied: GNU General Public License, version 2
12// with the GNU Classpath Exception which is available at
13// https://www.gnu.org/software/classpath/license.html.
14//
15// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16// *****************************************************************************
17var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21 return c > 3 && r && Object.defineProperty(target, key, r), r;
22};
23var __metadata = (this && this.__metadata) || function (k, v) {
24 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25};
26var __param = (this && this.__param) || function (paramIndex, decorator) {
27 return function (target, key) { decorator(target, key, paramIndex); }
28};
29Object.defineProperty(exports, "__esModule", { value: true });
30exports.CommonFrontendContribution = exports.RECENT_COMMANDS_STORAGE_KEY = exports.supportPaste = exports.supportCopy = exports.supportCut = exports.CommonCommands = exports.CommonMenus = void 0;
31/* eslint-disable max-len, @typescript-eslint/indent */
32const debounce = require("lodash.debounce");
33const inversify_1 = require("inversify");
34const menu_1 = require("../common/menu");
35const command_1 = require("../common/command");
36const uri_command_handler_1 = require("../common/uri-command-handler");
37const selection_service_1 = require("../common/selection-service");
38const message_service_1 = require("../common/message-service");
39const opener_service_1 = require("../browser/opener-service");
40const application_shell_1 = require("./shell/application-shell");
41const tab_bars_1 = require("./shell/tab-bars");
42const about_dialog_1 = require("./about-dialog");
43const browser = require("./browser");
44const uri_1 = require("../common/uri");
45const context_key_service_1 = require("./context-key-service");
46const os_1 = require("../common/os");
47const resource_context_key_1 = require("./resource-context-key");
48const selection_1 = require("../common/selection");
49const storage_service_1 = require("./storage-service");
50const navigatable_1 = require("./navigatable");
51const quick_view_service_1 = require("./quick-input/quick-view-service");
52const environment_1 = require("@theia/application-package/lib/environment");
53const icon_theme_service_1 = require("./icon-theme-service");
54const color_1 = require("../common/color");
55const core_preferences_1 = require("./core-preferences");
56const theming_1 = require("./theming");
57const preferences_1 = require("./preferences");
58const clipboard_service_1 = require("./clipboard-service");
59const encoding_registry_1 = require("./encoding-registry");
60const encodings_1 = require("../common/encodings");
61const env_variables_1 = require("../common/env-variables");
62const authentication_service_1 = require("./authentication-service");
63const saveable_1 = require("./saveable");
64const quick_input_1 = require("./quick-input");
65const localization_1 = require("../common/i18n/localization");
66const nls_1 = require("../common/nls");
67const current_widget_command_adapter_1 = require("./shell/current-widget-command-adapter");
68const dialogs_1 = require("./dialogs");
69const window_service_1 = require("./window/window-service");
70const frontend_application_config_provider_1 = require("./frontend-application-config-provider");
71const decoration_style_1 = require("./decoration-style");
72const widgets_1 = require("./widgets");
73const save_resource_service_1 = require("./save-resource-service");
74const user_working_directory_provider_1 = require("./user-working-directory-provider");
75const common_1 = require("../common");
76const language_quick_pick_service_1 = require("./i18n/language-quick-pick-service");
77var CommonMenus;
78(function (CommonMenus) {
79 CommonMenus.FILE = [...menu_1.MAIN_MENU_BAR, '1_file'];
80 CommonMenus.FILE_NEW_TEXT = [...CommonMenus.FILE, '1_new_text'];
81 CommonMenus.FILE_NEW = [...CommonMenus.FILE, '1_new'];
82 CommonMenus.FILE_OPEN = [...CommonMenus.FILE, '2_open'];
83 CommonMenus.FILE_SAVE = [...CommonMenus.FILE, '3_save'];
84 CommonMenus.FILE_AUTOSAVE = [...CommonMenus.FILE, '4_autosave'];
85 CommonMenus.FILE_SETTINGS = [...CommonMenus.FILE, '5_settings'];
86 CommonMenus.FILE_SETTINGS_SUBMENU = [...CommonMenus.FILE_SETTINGS, '1_settings_submenu'];
87 CommonMenus.FILE_SETTINGS_SUBMENU_OPEN = [...CommonMenus.FILE_SETTINGS_SUBMENU, '1_settings_submenu_open'];
88 CommonMenus.FILE_SETTINGS_SUBMENU_THEME = [...CommonMenus.FILE_SETTINGS_SUBMENU, '2_settings_submenu_theme'];
89 CommonMenus.FILE_CLOSE = [...CommonMenus.FILE, '6_close'];
90 CommonMenus.FILE_NEW_CONTRIBUTIONS = 'file/newFile';
91 CommonMenus.EDIT = [...menu_1.MAIN_MENU_BAR, '2_edit'];
92 CommonMenus.EDIT_UNDO = [...CommonMenus.EDIT, '1_undo'];
93 CommonMenus.EDIT_CLIPBOARD = [...CommonMenus.EDIT, '2_clipboard'];
94 CommonMenus.EDIT_FIND = [...CommonMenus.EDIT, '3_find'];
95 CommonMenus.VIEW = [...menu_1.MAIN_MENU_BAR, '4_view'];
96 CommonMenus.VIEW_PRIMARY = [...CommonMenus.VIEW, '0_primary'];
97 CommonMenus.VIEW_APPEARANCE = [...CommonMenus.VIEW, '1_appearance'];
98 CommonMenus.VIEW_APPEARANCE_SUBMENU = [...CommonMenus.VIEW_APPEARANCE, '1_appearance_submenu'];
99 CommonMenus.VIEW_APPEARANCE_SUBMENU_SCREEN = [...CommonMenus.VIEW_APPEARANCE_SUBMENU, '2_appearance_submenu_screen'];
100 CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR = [...CommonMenus.VIEW_APPEARANCE_SUBMENU, '3_appearance_submenu_bar'];
101 CommonMenus.VIEW_EDITOR_SUBMENU = [...CommonMenus.VIEW_APPEARANCE, '2_editor_submenu'];
102 CommonMenus.VIEW_EDITOR_SUBMENU_SPLIT = [...CommonMenus.VIEW_EDITOR_SUBMENU, '1_editor_submenu_split'];
103 CommonMenus.VIEW_EDITOR_SUBMENU_ORTHO = [...CommonMenus.VIEW_EDITOR_SUBMENU, '2_editor_submenu_ortho'];
104 CommonMenus.VIEW_VIEWS = [...CommonMenus.VIEW, '2_views'];
105 CommonMenus.VIEW_LAYOUT = [...CommonMenus.VIEW, '3_layout'];
106 CommonMenus.VIEW_TOGGLE = [...CommonMenus.VIEW, '4_toggle'];
107 CommonMenus.MANAGE_GENERAL = [...menu_1.MANAGE_MENU, '1_manage_general'];
108 CommonMenus.MANAGE_SETTINGS = [...menu_1.MANAGE_MENU, '2_manage_settings'];
109 CommonMenus.MANAGE_SETTINGS_THEMES = [...CommonMenus.MANAGE_SETTINGS, '1_manage_settings_themes'];
110 // last menu item
111 CommonMenus.HELP = [...menu_1.MAIN_MENU_BAR, '9_help'];
112})(CommonMenus = exports.CommonMenus || (exports.CommonMenus = {}));
113var CommonCommands;
114(function (CommonCommands) {
115 CommonCommands.FILE_CATEGORY = 'File';
116 CommonCommands.VIEW_CATEGORY = 'View';
117 CommonCommands.CREATE_CATEGORY = 'Create';
118 CommonCommands.PREFERENCES_CATEGORY = 'Preferences';
119 CommonCommands.MANAGE_CATEGORY = 'Manage';
120 CommonCommands.FILE_CATEGORY_KEY = nls_1.nls.getDefaultKey(CommonCommands.FILE_CATEGORY);
121 CommonCommands.VIEW_CATEGORY_KEY = nls_1.nls.getDefaultKey(CommonCommands.VIEW_CATEGORY);
122 CommonCommands.PREFERENCES_CATEGORY_KEY = nls_1.nls.getDefaultKey(CommonCommands.PREFERENCES_CATEGORY);
123 CommonCommands.OPEN = {
124 id: 'core.open',
125 };
126 CommonCommands.CUT = command_1.Command.toDefaultLocalizedCommand({
127 id: 'core.cut',
128 label: 'Cut'
129 });
130 CommonCommands.COPY = command_1.Command.toDefaultLocalizedCommand({
131 id: 'core.copy',
132 label: 'Copy'
133 });
134 CommonCommands.PASTE = command_1.Command.toDefaultLocalizedCommand({
135 id: 'core.paste',
136 label: 'Paste'
137 });
138 CommonCommands.COPY_PATH = command_1.Command.toDefaultLocalizedCommand({
139 id: 'core.copy.path',
140 label: 'Copy Path'
141 });
142 CommonCommands.UNDO = command_1.Command.toDefaultLocalizedCommand({
143 id: 'core.undo',
144 label: 'Undo'
145 });
146 CommonCommands.REDO = command_1.Command.toDefaultLocalizedCommand({
147 id: 'core.redo',
148 label: 'Redo'
149 });
150 CommonCommands.SELECT_ALL = command_1.Command.toDefaultLocalizedCommand({
151 id: 'core.selectAll',
152 label: 'Select All'
153 });
154 CommonCommands.FIND = command_1.Command.toDefaultLocalizedCommand({
155 id: 'core.find',
156 label: 'Find'
157 });
158 CommonCommands.REPLACE = command_1.Command.toDefaultLocalizedCommand({
159 id: 'core.replace',
160 label: 'Replace'
161 });
162 CommonCommands.NEXT_TAB = command_1.Command.toDefaultLocalizedCommand({
163 id: 'core.nextTab',
164 category: CommonCommands.VIEW_CATEGORY,
165 label: 'Show Next Tab'
166 });
167 CommonCommands.PREVIOUS_TAB = command_1.Command.toDefaultLocalizedCommand({
168 id: 'core.previousTab',
169 category: CommonCommands.VIEW_CATEGORY,
170 label: 'Show Previous Tab'
171 });
172 CommonCommands.NEXT_TAB_IN_GROUP = command_1.Command.toLocalizedCommand({
173 id: 'core.nextTabInGroup',
174 category: CommonCommands.VIEW_CATEGORY,
175 label: 'Switch to Next Tab in Group'
176 }, 'theia/core/common/showNextTabInGroup', CommonCommands.VIEW_CATEGORY_KEY);
177 CommonCommands.PREVIOUS_TAB_IN_GROUP = command_1.Command.toLocalizedCommand({
178 id: 'core.previousTabInGroup',
179 category: CommonCommands.VIEW_CATEGORY,
180 label: 'Switch to Previous Tab in Group'
181 }, 'theia/core/common/showPreviousTabInGroup', CommonCommands.VIEW_CATEGORY_KEY);
182 CommonCommands.NEXT_TAB_GROUP = command_1.Command.toLocalizedCommand({
183 id: 'core.nextTabGroup',
184 category: CommonCommands.VIEW_CATEGORY,
185 label: 'Switch to Next Tab Group'
186 }, 'theia/core/common/showNextTabGroup', CommonCommands.VIEW_CATEGORY_KEY);
187 CommonCommands.PREVIOUS_TAB_GROUP = command_1.Command.toLocalizedCommand({
188 id: 'core.previousTabBar',
189 category: CommonCommands.VIEW_CATEGORY,
190 label: 'Switch to Previous Tab Group'
191 }, 'theia/core/common/showPreviousTabGroup', CommonCommands.VIEW_CATEGORY_KEY);
192 CommonCommands.CLOSE_TAB = command_1.Command.toLocalizedCommand({
193 id: 'core.close.tab',
194 category: CommonCommands.VIEW_CATEGORY,
195 label: 'Close Tab'
196 }, 'theia/core/common/closeTab', CommonCommands.VIEW_CATEGORY_KEY);
197 CommonCommands.CLOSE_OTHER_TABS = command_1.Command.toLocalizedCommand({
198 id: 'core.close.other.tabs',
199 category: CommonCommands.VIEW_CATEGORY,
200 label: 'Close Other Tabs'
201 }, 'theia/core/common/closeOthers', CommonCommands.VIEW_CATEGORY_KEY);
202 CommonCommands.CLOSE_SAVED_TABS = command_1.Command.toDefaultLocalizedCommand({
203 id: 'workbench.action.closeUnmodifiedEditors',
204 category: CommonCommands.VIEW_CATEGORY,
205 label: 'Close Saved Editors in Group',
206 });
207 CommonCommands.CLOSE_RIGHT_TABS = command_1.Command.toLocalizedCommand({
208 id: 'core.close.right.tabs',
209 category: CommonCommands.VIEW_CATEGORY,
210 label: 'Close Tabs to the Right'
211 }, 'theia/core/common/closeRight', CommonCommands.VIEW_CATEGORY_KEY);
212 CommonCommands.CLOSE_ALL_TABS = command_1.Command.toLocalizedCommand({
213 id: 'core.close.all.tabs',
214 category: CommonCommands.VIEW_CATEGORY,
215 label: 'Close All Tabs'
216 }, 'theia/core/common/closeAll', CommonCommands.VIEW_CATEGORY_KEY);
217 CommonCommands.CLOSE_MAIN_TAB = command_1.Command.toLocalizedCommand({
218 id: 'core.close.main.tab',
219 category: CommonCommands.VIEW_CATEGORY,
220 label: 'Close Tab in Main Area'
221 }, 'theia/core/common/closeTabMain', CommonCommands.VIEW_CATEGORY_KEY);
222 CommonCommands.CLOSE_OTHER_MAIN_TABS = command_1.Command.toLocalizedCommand({
223 id: 'core.close.other.main.tabs',
224 category: CommonCommands.VIEW_CATEGORY,
225 label: 'Close Other Tabs in Main Area'
226 }, 'theia/core/common/closeOtherTabMain', CommonCommands.VIEW_CATEGORY_KEY);
227 CommonCommands.CLOSE_ALL_MAIN_TABS = command_1.Command.toLocalizedCommand({
228 id: 'core.close.all.main.tabs',
229 category: CommonCommands.VIEW_CATEGORY,
230 label: 'Close All Tabs in Main Area'
231 }, 'theia/core/common/closeAllTabMain', CommonCommands.VIEW_CATEGORY_KEY);
232 CommonCommands.COLLAPSE_PANEL = command_1.Command.toLocalizedCommand({
233 id: 'core.collapse.tab',
234 category: CommonCommands.VIEW_CATEGORY,
235 label: 'Collapse Side Panel'
236 }, 'theia/core/common/collapseTab', CommonCommands.VIEW_CATEGORY_KEY);
237 CommonCommands.COLLAPSE_ALL_PANELS = command_1.Command.toLocalizedCommand({
238 id: 'core.collapse.all.tabs',
239 category: CommonCommands.VIEW_CATEGORY,
240 label: 'Collapse All Side Panels'
241 }, 'theia/core/common/collapseAllTabs', CommonCommands.VIEW_CATEGORY_KEY);
242 CommonCommands.TOGGLE_BOTTOM_PANEL = command_1.Command.toLocalizedCommand({
243 id: 'core.toggle.bottom.panel',
244 category: CommonCommands.VIEW_CATEGORY,
245 label: 'Toggle Bottom Panel'
246 }, 'theia/core/common/collapseBottomPanel', CommonCommands.VIEW_CATEGORY_KEY);
247 CommonCommands.TOGGLE_STATUS_BAR = command_1.Command.toDefaultLocalizedCommand({
248 id: 'workbench.action.toggleStatusbarVisibility',
249 category: CommonCommands.VIEW_CATEGORY,
250 label: 'Toggle Status Bar Visibility'
251 });
252 CommonCommands.PIN_TAB = command_1.Command.toDefaultLocalizedCommand({
253 id: 'workbench.action.pinEditor',
254 category: CommonCommands.VIEW_CATEGORY,
255 label: 'Pin Editor'
256 });
257 CommonCommands.UNPIN_TAB = command_1.Command.toDefaultLocalizedCommand({
258 id: 'workbench.action.unpinEditor',
259 category: CommonCommands.VIEW_CATEGORY,
260 label: 'Unpin Editor'
261 });
262 CommonCommands.TOGGLE_MAXIMIZED = command_1.Command.toLocalizedCommand({
263 id: 'core.toggleMaximized',
264 category: CommonCommands.VIEW_CATEGORY,
265 label: 'Toggle Maximized'
266 }, 'theia/core/common/toggleMaximized', CommonCommands.VIEW_CATEGORY_KEY);
267 CommonCommands.OPEN_VIEW = command_1.Command.toDefaultLocalizedCommand({
268 id: 'core.openView',
269 category: CommonCommands.VIEW_CATEGORY,
270 label: 'Open View...'
271 });
272 CommonCommands.SHOW_MENU_BAR = command_1.Command.toDefaultLocalizedCommand({
273 id: 'window.menuBarVisibility',
274 category: CommonCommands.VIEW_CATEGORY,
275 label: 'Toggle Menu Bar'
276 });
277 CommonCommands.NEW_UNTITLED_TEXT_FILE = command_1.Command.toDefaultLocalizedCommand({
278 id: 'workbench.action.files.newUntitledTextFile',
279 category: CommonCommands.FILE_CATEGORY,
280 label: 'New Untitled Text File'
281 });
282 CommonCommands.NEW_UNTITLED_FILE = command_1.Command.toDefaultLocalizedCommand({
283 id: 'workbench.action.files.newUntitledFile',
284 category: CommonCommands.CREATE_CATEGORY,
285 label: 'New File...'
286 });
287 CommonCommands.SAVE = command_1.Command.toDefaultLocalizedCommand({
288 id: 'core.save',
289 category: CommonCommands.FILE_CATEGORY,
290 label: 'Save',
291 });
292 CommonCommands.SAVE_AS = command_1.Command.toDefaultLocalizedCommand({
293 id: 'file.saveAs',
294 category: CommonCommands.FILE_CATEGORY,
295 label: 'Save As...',
296 });
297 CommonCommands.SAVE_WITHOUT_FORMATTING = command_1.Command.toDefaultLocalizedCommand({
298 id: 'core.saveWithoutFormatting',
299 category: CommonCommands.FILE_CATEGORY,
300 label: 'Save without Formatting',
301 });
302 CommonCommands.SAVE_ALL = command_1.Command.toDefaultLocalizedCommand({
303 id: 'core.saveAll',
304 category: CommonCommands.FILE_CATEGORY,
305 label: 'Save All',
306 });
307 CommonCommands.AUTO_SAVE = command_1.Command.toDefaultLocalizedCommand({
308 id: 'textEditor.commands.autosave',
309 category: CommonCommands.FILE_CATEGORY,
310 label: 'Auto Save',
311 });
312 CommonCommands.ABOUT_COMMAND = command_1.Command.toDefaultLocalizedCommand({
313 id: 'core.about',
314 label: 'About'
315 });
316 CommonCommands.OPEN_PREFERENCES = command_1.Command.toDefaultLocalizedCommand({
317 id: 'preferences:open',
318 category: CommonCommands.PREFERENCES_CATEGORY,
319 label: 'Open Settings (UI)',
320 });
321 CommonCommands.SELECT_COLOR_THEME = command_1.Command.toDefaultLocalizedCommand({
322 id: 'workbench.action.selectTheme',
323 label: 'Color Theme',
324 category: CommonCommands.PREFERENCES_CATEGORY
325 });
326 CommonCommands.SELECT_ICON_THEME = command_1.Command.toDefaultLocalizedCommand({
327 id: 'workbench.action.selectIconTheme',
328 label: 'File Icon Theme',
329 category: CommonCommands.PREFERENCES_CATEGORY
330 });
331 CommonCommands.CONFIGURE_DISPLAY_LANGUAGE = command_1.Command.toDefaultLocalizedCommand({
332 id: 'workbench.action.configureLanguage',
333 label: 'Configure Display Language'
334 });
335 CommonCommands.TOGGLE_BREADCRUMBS = command_1.Command.toDefaultLocalizedCommand({
336 id: 'breadcrumbs.toggle',
337 label: 'Toggle Breadcrumbs',
338 category: CommonCommands.VIEW_CATEGORY
339 });
340})(CommonCommands = exports.CommonCommands || (exports.CommonCommands = {}));
341exports.supportCut = browser.isNative || document.queryCommandSupported('cut');
342exports.supportCopy = browser.isNative || document.queryCommandSupported('copy');
343// Chrome incorrectly returns true for document.queryCommandSupported('paste')
344// when the paste feature is available but the calling script has insufficient
345// privileges to actually perform the action
346exports.supportPaste = browser.isNative || (!browser.isChrome && document.queryCommandSupported('paste'));
347exports.RECENT_COMMANDS_STORAGE_KEY = 'commands';
348let CommonFrontendContribution = class CommonFrontendContribution {
349 constructor(shell, selectionService, messageService, openerService, aboutDialog, localizationProvider, saveResourceService) {
350 this.shell = shell;
351 this.selectionService = selectionService;
352 this.messageService = messageService;
353 this.openerService = openerService;
354 this.aboutDialog = aboutDialog;
355 this.localizationProvider = localizationProvider;
356 this.saveResourceService = saveResourceService;
357 this.commonDecorationsStyleSheet = decoration_style_1.DecorationStyle.createStyleSheet('coreCommonDecorationsStyle');
358 this.shouldPreventClose = false;
359 }
360 async configure(app) {
361 // FIXME: This request blocks valuable startup time (~200ms).
362 const configDirUri = await this.environments.getConfigDirUri();
363 // Global settings
364 this.encodingRegistry.registerOverride({
365 encoding: encodings_1.UTF8,
366 parent: new uri_1.default(configDirUri)
367 });
368 this.contextKeyService.createKey('isLinux', os_1.OS.type() === os_1.OS.Type.Linux);
369 this.contextKeyService.createKey('isMac', os_1.OS.type() === os_1.OS.Type.OSX);
370 this.contextKeyService.createKey('isWindows', os_1.OS.type() === os_1.OS.Type.Windows);
371 this.contextKeyService.createKey('isWeb', !this.isElectron());
372 this.pinnedKey = this.contextKeyService.createKey('activeEditorIsPinned', false);
373 this.updatePinnedKey();
374 this.shell.onDidChangeActiveWidget(() => this.updatePinnedKey());
375 this.initResourceContextKeys();
376 this.registerCtrlWHandling();
377 this.updateStyles();
378 this.preferences.ready.then(() => this.setSashProperties());
379 this.preferences.onPreferenceChanged(e => this.handlePreferenceChange(e, app));
380 app.shell.leftPanelHandler.addBottomMenu({
381 id: 'settings-menu',
382 iconClass: 'codicon codicon-settings-gear',
383 title: nls_1.nls.localizeByDefault(CommonCommands.MANAGE_CATEGORY),
384 menuPath: menu_1.MANAGE_MENU,
385 order: 1,
386 });
387 const accountsMenu = {
388 id: 'accounts-menu',
389 iconClass: 'codicon codicon-person',
390 title: nls_1.nls.localizeByDefault('Accounts'),
391 menuPath: menu_1.ACCOUNTS_MENU,
392 order: 0,
393 };
394 this.authenticationService.onDidRegisterAuthenticationProvider(() => {
395 app.shell.leftPanelHandler.addBottomMenu(accountsMenu);
396 });
397 this.authenticationService.onDidUnregisterAuthenticationProvider(() => {
398 if (this.authenticationService.getProviderIds().length === 0) {
399 app.shell.leftPanelHandler.removeBottomMenu(accountsMenu.id);
400 }
401 });
402 }
403 updateStyles() {
404 document.body.classList.remove('theia-editor-highlightModifiedTabs');
405 if (this.preferences['workbench.editor.highlightModifiedTabs']) {
406 document.body.classList.add('theia-editor-highlightModifiedTabs');
407 }
408 }
409 updatePinnedKey() {
410 const activeTab = this.shell.findTabBar();
411 const pinningTarget = activeTab && this.shell.findTitle(activeTab);
412 const value = pinningTarget && (0, widgets_1.isPinned)(pinningTarget);
413 this.pinnedKey.set(value);
414 }
415 handlePreferenceChange(e, app) {
416 switch (e.preferenceName) {
417 case 'workbench.editor.highlightModifiedTabs': {
418 this.updateStyles();
419 break;
420 }
421 case 'window.menuBarVisibility': {
422 const { newValue } = e;
423 const mainMenuId = 'main-menu';
424 if (newValue === 'compact') {
425 this.shell.leftPanelHandler.addTopMenu({
426 id: mainMenuId,
427 iconClass: 'codicon codicon-menu',
428 title: nls_1.nls.localizeByDefault('Application Menu'),
429 menuPath: menu_1.MAIN_MENU_BAR,
430 order: 0,
431 });
432 }
433 else {
434 app.shell.leftPanelHandler.removeTopMenu(mainMenuId);
435 }
436 break;
437 }
438 case 'workbench.sash.hoverDelay':
439 case 'workbench.sash.size': {
440 this.setSashProperties();
441 break;
442 }
443 }
444 }
445 setSashProperties() {
446 const sashRule = `:root {
447 --theia-sash-hoverDelay: ${this.preferences['workbench.sash.hoverDelay']}ms;
448 --theia-sash-width: ${this.preferences['workbench.sash.size']}px;
449 }`;
450 decoration_style_1.DecorationStyle.deleteStyleRule(':root', this.commonDecorationsStyleSheet);
451 this.commonDecorationsStyleSheet.insertRule(sashRule);
452 }
453 onStart() {
454 this.storageService.getData(exports.RECENT_COMMANDS_STORAGE_KEY, { recent: [] })
455 .then(tasks => this.commandRegistry.recent = tasks.recent);
456 }
457 onStop() {
458 const recent = this.commandRegistry.recent;
459 this.storageService.setData(exports.RECENT_COMMANDS_STORAGE_KEY, { recent });
460 window.localStorage.setItem(icon_theme_service_1.IconThemeService.STORAGE_KEY, this.iconThemes.current);
461 window.localStorage.setItem(theming_1.ThemeService.STORAGE_KEY, this.themeService.getCurrentTheme().id);
462 }
463 initResourceContextKeys() {
464 const updateContextKeys = () => {
465 const selection = this.selectionService.selection;
466 const resourceUri = navigatable_1.Navigatable.is(selection) && selection.getResourceUri() || selection_1.UriSelection.getUri(selection);
467 this.resourceContextKey.set(resourceUri);
468 };
469 updateContextKeys();
470 this.selectionService.onSelectionChanged(updateContextKeys);
471 }
472 registerMenus(registry) {
473 registry.registerSubmenu(CommonMenus.FILE, nls_1.nls.localizeByDefault('File'));
474 registry.registerSubmenu(CommonMenus.EDIT, nls_1.nls.localizeByDefault('Edit'));
475 registry.registerSubmenu(CommonMenus.VIEW, nls_1.nls.localizeByDefault('View'));
476 registry.registerSubmenu(CommonMenus.HELP, nls_1.nls.localizeByDefault('Help'));
477 // For plugins contributing create new file commands/menu-actions
478 registry.registerIndependentSubmenu(CommonMenus.FILE_NEW_CONTRIBUTIONS, nls_1.nls.localizeByDefault('New File...'));
479 registry.registerMenuAction(CommonMenus.FILE_SAVE, {
480 commandId: CommonCommands.SAVE.id
481 });
482 registry.registerMenuAction(CommonMenus.FILE_SAVE, {
483 commandId: CommonCommands.SAVE_ALL.id
484 });
485 registry.registerMenuAction(CommonMenus.FILE_AUTOSAVE, {
486 commandId: CommonCommands.AUTO_SAVE.id
487 });
488 registry.registerSubmenu(CommonMenus.FILE_SETTINGS_SUBMENU, nls_1.nls.localizeByDefault(CommonCommands.PREFERENCES_CATEGORY));
489 registry.registerMenuAction(CommonMenus.EDIT_UNDO, {
490 commandId: CommonCommands.UNDO.id,
491 order: '0'
492 });
493 registry.registerMenuAction(CommonMenus.EDIT_UNDO, {
494 commandId: CommonCommands.REDO.id,
495 order: '1'
496 });
497 registry.registerMenuAction(CommonMenus.EDIT_FIND, {
498 commandId: CommonCommands.FIND.id,
499 order: '0'
500 });
501 registry.registerMenuAction(CommonMenus.EDIT_FIND, {
502 commandId: CommonCommands.REPLACE.id,
503 order: '1'
504 });
505 registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
506 commandId: CommonCommands.CUT.id,
507 order: '0'
508 });
509 registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
510 commandId: CommonCommands.COPY.id,
511 order: '1'
512 });
513 registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
514 commandId: CommonCommands.PASTE.id,
515 order: '2'
516 });
517 registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
518 commandId: CommonCommands.COPY_PATH.id,
519 order: '3'
520 });
521 registry.registerMenuAction(CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
522 commandId: CommonCommands.TOGGLE_BOTTOM_PANEL.id,
523 order: '1'
524 });
525 registry.registerMenuAction(CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
526 commandId: CommonCommands.TOGGLE_STATUS_BAR.id,
527 order: '2',
528 label: nls_1.nls.localizeByDefault('Toggle Status Bar Visibility')
529 });
530 registry.registerMenuAction(CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
531 commandId: CommonCommands.COLLAPSE_ALL_PANELS.id,
532 order: '3'
533 });
534 registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_CLOSE, {
535 commandId: CommonCommands.CLOSE_TAB.id,
536 label: nls_1.nls.localizeByDefault('Close'),
537 order: '0'
538 });
539 registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_CLOSE, {
540 commandId: CommonCommands.CLOSE_OTHER_TABS.id,
541 label: nls_1.nls.localizeByDefault('Close Others'),
542 order: '1'
543 });
544 registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_CLOSE, {
545 commandId: CommonCommands.CLOSE_RIGHT_TABS.id,
546 label: nls_1.nls.localizeByDefault('Close to the Right'),
547 order: '2'
548 });
549 registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_CLOSE, {
550 commandId: CommonCommands.CLOSE_SAVED_TABS.id,
551 label: nls_1.nls.localizeByDefault('Close Saved'),
552 order: '3',
553 });
554 registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_CLOSE, {
555 commandId: CommonCommands.CLOSE_ALL_TABS.id,
556 label: nls_1.nls.localizeByDefault('Close All'),
557 order: '4'
558 });
559 registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_SPLIT, {
560 commandId: CommonCommands.COLLAPSE_PANEL.id,
561 label: CommonCommands.COLLAPSE_PANEL.label,
562 order: '5'
563 });
564 registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_SPLIT, {
565 commandId: CommonCommands.TOGGLE_MAXIMIZED.id,
566 label: CommonCommands.TOGGLE_MAXIMIZED.label,
567 order: '6'
568 });
569 registry.registerMenuAction(CommonMenus.VIEW_APPEARANCE_SUBMENU_SCREEN, {
570 commandId: CommonCommands.TOGGLE_MAXIMIZED.id,
571 label: CommonCommands.TOGGLE_MAXIMIZED.label,
572 order: '6'
573 });
574 registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_COPY, {
575 commandId: CommonCommands.COPY_PATH.id,
576 label: CommonCommands.COPY_PATH.label,
577 order: '1',
578 });
579 registry.registerMenuAction(CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
580 commandId: CommonCommands.SHOW_MENU_BAR.id,
581 label: nls_1.nls.localizeByDefault('Toggle Menu Bar'),
582 order: '0'
583 });
584 registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_PIN, {
585 commandId: CommonCommands.PIN_TAB.id,
586 label: nls_1.nls.localizeByDefault('Pin'),
587 order: '7'
588 });
589 registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_PIN, {
590 commandId: CommonCommands.UNPIN_TAB.id,
591 label: nls_1.nls.localizeByDefault('Unpin'),
592 order: '8'
593 });
594 registry.registerMenuAction(CommonMenus.HELP, {
595 commandId: CommonCommands.ABOUT_COMMAND.id,
596 label: CommonCommands.ABOUT_COMMAND.label,
597 order: '9'
598 });
599 registry.registerMenuAction(CommonMenus.VIEW_PRIMARY, {
600 commandId: CommonCommands.OPEN_VIEW.id
601 });
602 registry.registerMenuAction(CommonMenus.FILE_SETTINGS_SUBMENU_THEME, {
603 commandId: CommonCommands.SELECT_COLOR_THEME.id
604 });
605 registry.registerMenuAction(CommonMenus.FILE_SETTINGS_SUBMENU_THEME, {
606 commandId: CommonCommands.SELECT_ICON_THEME.id
607 });
608 registry.registerSubmenu(CommonMenus.MANAGE_SETTINGS_THEMES, nls_1.nls.localizeByDefault('Themes'), { order: 'a50' });
609 registry.registerMenuAction(CommonMenus.MANAGE_SETTINGS_THEMES, {
610 commandId: CommonCommands.SELECT_COLOR_THEME.id,
611 order: '0'
612 });
613 registry.registerMenuAction(CommonMenus.MANAGE_SETTINGS_THEMES, {
614 commandId: CommonCommands.SELECT_ICON_THEME.id,
615 order: '1'
616 });
617 registry.registerSubmenu(CommonMenus.VIEW_APPEARANCE_SUBMENU, nls_1.nls.localizeByDefault('Appearance'));
618 registry.registerMenuAction(CommonMenus.FILE_NEW_TEXT, {
619 commandId: CommonCommands.NEW_UNTITLED_TEXT_FILE.id,
620 label: nls_1.nls.localizeByDefault('New Text File'),
621 order: 'a'
622 });
623 registry.registerMenuAction(CommonMenus.FILE_NEW_TEXT, {
624 commandId: CommonCommands.NEW_UNTITLED_FILE.id,
625 label: nls_1.nls.localizeByDefault('New File...'),
626 order: 'a1'
627 });
628 }
629 registerCommands(commandRegistry) {
630 commandRegistry.registerCommand(CommonCommands.OPEN, uri_command_handler_1.UriAwareCommandHandler.MultiSelect(this.selectionService, {
631 execute: uris => uris.map(uri => (0, opener_service_1.open)(this.openerService, uri)),
632 }));
633 commandRegistry.registerCommand(CommonCommands.CUT, {
634 execute: () => {
635 if (exports.supportCut) {
636 document.execCommand('cut');
637 }
638 else {
639 this.messageService.warn(nls_1.nls.localize('theia/core/cutWarn', "Please use the browser's cut command or shortcut."));
640 }
641 }
642 });
643 commandRegistry.registerCommand(CommonCommands.COPY, {
644 execute: () => {
645 if (exports.supportCopy) {
646 document.execCommand('copy');
647 }
648 else {
649 this.messageService.warn(nls_1.nls.localize('theia/core/copyWarn', "Please use the browser's copy command or shortcut."));
650 }
651 }
652 });
653 commandRegistry.registerCommand(CommonCommands.PASTE, {
654 execute: () => {
655 if (exports.supportPaste) {
656 document.execCommand('paste');
657 }
658 else {
659 this.messageService.warn(nls_1.nls.localize('theia/core/pasteWarn', "Please use the browser's paste command or shortcut."));
660 }
661 }
662 });
663 commandRegistry.registerCommand(CommonCommands.COPY_PATH, uri_command_handler_1.UriAwareCommandHandler.MultiSelect(this.selectionService, {
664 isVisible: uris => Array.isArray(uris) && uris.some(uri => uri instanceof uri_1.default),
665 isEnabled: uris => Array.isArray(uris) && uris.some(uri => uri instanceof uri_1.default),
666 execute: async (uris) => {
667 if (uris.length) {
668 const lineDelimiter = os_1.EOL;
669 const text = uris.map(resource => resource.path.fsPath()).join(lineDelimiter);
670 await this.clipboardService.writeText(text);
671 }
672 else {
673 await this.messageService.info(nls_1.nls.localize('theia/core/copyInfo', 'Open a file first to copy its path'));
674 }
675 }
676 }));
677 commandRegistry.registerCommand(CommonCommands.UNDO, {
678 execute: () => document.execCommand('undo')
679 });
680 commandRegistry.registerCommand(CommonCommands.REDO, {
681 execute: () => document.execCommand('redo')
682 });
683 commandRegistry.registerCommand(CommonCommands.SELECT_ALL, {
684 execute: () => document.execCommand('selectAll')
685 });
686 commandRegistry.registerCommand(CommonCommands.FIND, {
687 execute: () => { }
688 });
689 commandRegistry.registerCommand(CommonCommands.REPLACE, {
690 execute: () => { }
691 });
692 commandRegistry.registerCommand(CommonCommands.NEXT_TAB, {
693 isEnabled: () => this.shell.currentTabBar !== undefined,
694 execute: () => this.shell.activateNextTab()
695 });
696 commandRegistry.registerCommand(CommonCommands.PREVIOUS_TAB, {
697 isEnabled: () => this.shell.currentTabBar !== undefined,
698 execute: () => this.shell.activatePreviousTab()
699 });
700 commandRegistry.registerCommand(CommonCommands.NEXT_TAB_IN_GROUP, {
701 isEnabled: () => this.shell.nextTabIndexInTabBar() !== -1,
702 execute: () => this.shell.activateNextTabInTabBar()
703 });
704 commandRegistry.registerCommand(CommonCommands.PREVIOUS_TAB_IN_GROUP, {
705 isEnabled: () => this.shell.previousTabIndexInTabBar() !== -1,
706 execute: () => this.shell.activatePreviousTabInTabBar()
707 });
708 commandRegistry.registerCommand(CommonCommands.NEXT_TAB_GROUP, {
709 isEnabled: () => this.shell.nextTabBar() !== undefined,
710 execute: () => this.shell.activateNextTabBar()
711 });
712 commandRegistry.registerCommand(CommonCommands.PREVIOUS_TAB_GROUP, {
713 isEnabled: () => this.shell.previousTabBar() !== undefined,
714 execute: () => this.shell.activatePreviousTabBar()
715 });
716 commandRegistry.registerCommand(CommonCommands.CLOSE_TAB, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
717 isEnabled: title => Boolean(title === null || title === void 0 ? void 0 : title.closable),
718 execute: (title, tabBar) => tabBar && this.shell.closeTabs(tabBar, candidate => candidate === title),
719 }));
720 commandRegistry.registerCommand(CommonCommands.CLOSE_OTHER_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
721 isEnabled: (title, tabbar) => Boolean(tabbar === null || tabbar === void 0 ? void 0 : tabbar.titles.some(candidate => candidate !== title && candidate.closable)),
722 execute: (title, tabbar) => tabbar && this.shell.closeTabs(tabbar, candidate => candidate !== title && candidate.closable),
723 }));
724 commandRegistry.registerCommand(CommonCommands.CLOSE_SAVED_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
725 isEnabled: (_title, tabbar) => Boolean(tabbar === null || tabbar === void 0 ? void 0 : tabbar.titles.some(candidate => candidate.closable && !saveable_1.Saveable.isDirty(candidate.owner))),
726 execute: (_title, tabbar) => tabbar && this.shell.closeTabs(tabbar, candidate => candidate.closable && !saveable_1.Saveable.isDirty(candidate.owner)),
727 }));
728 commandRegistry.registerCommand(CommonCommands.CLOSE_RIGHT_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
729 isEnabled: (title, tabbar) => {
730 let targetSeen = false;
731 return Boolean(tabbar === null || tabbar === void 0 ? void 0 : tabbar.titles.some(candidate => {
732 if (targetSeen && candidate.closable) {
733 return true;
734 }
735 ;
736 if (candidate === title) {
737 targetSeen = true;
738 }
739 ;
740 }));
741 },
742 isVisible: (_title, tabbar) => {
743 var _a;
744 const area = (_a = (tabbar && this.shell.getAreaFor(tabbar))) !== null && _a !== void 0 ? _a : this.shell.currentTabArea;
745 return area !== undefined && area !== 'left' && area !== 'right';
746 },
747 execute: (title, tabbar) => {
748 if (tabbar) {
749 let targetSeen = false;
750 this.shell.closeTabs(tabbar, candidate => {
751 if (targetSeen && candidate.closable) {
752 return true;
753 }
754 ;
755 if (candidate === title) {
756 targetSeen = true;
757 }
758 ;
759 return false;
760 });
761 }
762 }
763 }));
764 commandRegistry.registerCommand(CommonCommands.CLOSE_ALL_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
765 isEnabled: (_title, tabbar) => Boolean(tabbar === null || tabbar === void 0 ? void 0 : tabbar.titles.some(title => title.closable)),
766 execute: (_title, tabbar) => tabbar && this.shell.closeTabs(tabbar, candidate => candidate.closable),
767 }));
768 commandRegistry.registerCommand(CommonCommands.CLOSE_MAIN_TAB, {
769 isEnabled: () => {
770 const currentWidget = this.shell.getCurrentWidget('main');
771 return currentWidget !== undefined && currentWidget.title.closable;
772 },
773 execute: () => this.shell.getCurrentWidget('main').close()
774 });
775 commandRegistry.registerCommand(CommonCommands.CLOSE_OTHER_MAIN_TABS, {
776 isEnabled: () => {
777 const currentWidget = this.shell.getCurrentWidget('main');
778 return currentWidget !== undefined &&
779 this.shell.mainAreaTabBars.some(tb => tb.titles.some(title => title.owner !== currentWidget && title.closable));
780 },
781 execute: () => {
782 const currentWidget = this.shell.getCurrentWidget('main');
783 this.shell.closeTabs('main', title => title.owner !== currentWidget && title.closable);
784 }
785 });
786 commandRegistry.registerCommand(CommonCommands.CLOSE_ALL_MAIN_TABS, {
787 isEnabled: () => this.shell.mainAreaTabBars.some(tb => tb.titles.some(title => title.closable)),
788 execute: () => this.shell.closeTabs('main', title => title.closable)
789 });
790 commandRegistry.registerCommand(CommonCommands.COLLAPSE_PANEL, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
791 isEnabled: (_title, tabbar) => Boolean(tabbar && application_shell_1.ApplicationShell.isSideArea(this.shell.getAreaFor(tabbar))),
792 isVisible: (_title, tabbar) => Boolean(tabbar && application_shell_1.ApplicationShell.isSideArea(this.shell.getAreaFor(tabbar))),
793 execute: (_title, tabbar) => tabbar && this.shell.collapsePanel(this.shell.getAreaFor(tabbar))
794 }));
795 commandRegistry.registerCommand(CommonCommands.COLLAPSE_ALL_PANELS, {
796 execute: () => {
797 this.shell.collapsePanel('left');
798 this.shell.collapsePanel('right');
799 this.shell.collapsePanel('bottom');
800 }
801 });
802 commandRegistry.registerCommand(CommonCommands.TOGGLE_BOTTOM_PANEL, {
803 isEnabled: () => this.shell.getWidgets('bottom').length > 0,
804 execute: () => {
805 if (this.shell.isExpanded('bottom')) {
806 this.shell.collapsePanel('bottom');
807 }
808 else {
809 this.shell.expandPanel('bottom');
810 }
811 }
812 });
813 commandRegistry.registerCommand(CommonCommands.TOGGLE_STATUS_BAR, {
814 execute: () => this.preferenceService.updateValue('workbench.statusBar.visible', !this.preferences['workbench.statusBar.visible'])
815 });
816 commandRegistry.registerCommand(CommonCommands.TOGGLE_MAXIMIZED, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
817 isEnabled: title => Boolean((title === null || title === void 0 ? void 0 : title.owner) && this.shell.canToggleMaximized(title === null || title === void 0 ? void 0 : title.owner)),
818 isVisible: title => Boolean((title === null || title === void 0 ? void 0 : title.owner) && this.shell.canToggleMaximized(title === null || title === void 0 ? void 0 : title.owner)),
819 execute: title => (title === null || title === void 0 ? void 0 : title.owner) && this.shell.toggleMaximized(title === null || title === void 0 ? void 0 : title.owner),
820 }));
821 commandRegistry.registerCommand(CommonCommands.SHOW_MENU_BAR, {
822 isEnabled: () => !os_1.isOSX,
823 isVisible: () => !os_1.isOSX,
824 execute: () => {
825 const menuBarVisibility = 'window.menuBarVisibility';
826 const visibility = this.preferences[menuBarVisibility];
827 if (visibility !== 'compact') {
828 this.preferenceService.updateValue(menuBarVisibility, 'compact');
829 }
830 else {
831 this.preferenceService.updateValue(menuBarVisibility, 'classic');
832 }
833 }
834 });
835 commandRegistry.registerCommand(CommonCommands.SAVE, {
836 execute: () => this.save({ formatType: 1 /* ON */ })
837 });
838 commandRegistry.registerCommand(CommonCommands.SAVE_AS, {
839 isEnabled: () => this.saveResourceService.canSaveAs(this.shell.currentWidget),
840 execute: () => {
841 const { currentWidget } = this.shell;
842 // No clue what could have happened between `isEnabled` and `execute`
843 // when fetching currentWidget, so better to double-check:
844 if (this.saveResourceService.canSaveAs(currentWidget)) {
845 this.saveResourceService.saveAs(currentWidget);
846 }
847 else {
848 this.messageService.error(nls_1.nls.localize('theia/workspace/failSaveAs', 'Cannot run "{0}" for the current widget.', CommonCommands.SAVE_AS.label));
849 }
850 },
851 });
852 commandRegistry.registerCommand(CommonCommands.SAVE_WITHOUT_FORMATTING, {
853 execute: () => this.save({ formatType: 2 /* OFF */ })
854 });
855 commandRegistry.registerCommand(CommonCommands.SAVE_ALL, {
856 execute: () => this.shell.saveAll({ formatType: 3 /* DIRTY */ })
857 });
858 commandRegistry.registerCommand(CommonCommands.ABOUT_COMMAND, {
859 execute: () => this.openAbout()
860 });
861 commandRegistry.registerCommand(CommonCommands.OPEN_VIEW, {
862 execute: () => { var _a; return (_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.open(quick_view_service_1.QuickViewService.PREFIX); }
863 });
864 commandRegistry.registerCommand(CommonCommands.SELECT_COLOR_THEME, {
865 execute: () => this.selectColorTheme()
866 });
867 commandRegistry.registerCommand(CommonCommands.SELECT_ICON_THEME, {
868 execute: () => this.selectIconTheme()
869 });
870 commandRegistry.registerCommand(CommonCommands.PIN_TAB, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
871 isEnabled: title => Boolean(title && !(0, widgets_1.isPinned)(title)),
872 execute: title => this.togglePinned(title),
873 }));
874 commandRegistry.registerCommand(CommonCommands.UNPIN_TAB, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
875 isEnabled: title => Boolean(title && (0, widgets_1.isPinned)(title)),
876 execute: title => this.togglePinned(title),
877 }));
878 commandRegistry.registerCommand(CommonCommands.CONFIGURE_DISPLAY_LANGUAGE, {
879 execute: () => this.configureDisplayLanguage()
880 });
881 commandRegistry.registerCommand(CommonCommands.TOGGLE_BREADCRUMBS, {
882 execute: () => this.toggleBreadcrumbs(),
883 isToggled: () => this.isBreadcrumbsEnabled(),
884 });
885 commandRegistry.registerCommand(CommonCommands.NEW_UNTITLED_TEXT_FILE, {
886 execute: async () => {
887 const untitledUri = this.untitledResourceResolver.createUntitledURI('', await this.workingDirProvider.getUserWorkingDir());
888 this.untitledResourceResolver.resolve(untitledUri);
889 return (0, opener_service_1.open)(this.openerService, untitledUri);
890 }
891 });
892 commandRegistry.registerCommand(CommonCommands.NEW_UNTITLED_FILE, {
893 execute: async () => this.showNewFilePicker()
894 });
895 for (const [index, ordinal] of this.getOrdinalNumbers().entries()) {
896 commandRegistry.registerCommand({ id: `workbench.action.focus${ordinal}EditorGroup`, label: index === 0 ? nls_1.nls.localizeByDefault('Focus First Editor Group') : '', category: nls_1.nls.localize(CommonCommands.VIEW_CATEGORY_KEY, CommonCommands.VIEW_CATEGORY) }, {
897 isEnabled: () => this.shell.mainAreaTabBars.length > index,
898 execute: () => {
899 var _a, _b;
900 const widget = (_b = (_a = this.shell.mainAreaTabBars[index]) === null || _a === void 0 ? void 0 : _a.currentTitle) === null || _b === void 0 ? void 0 : _b.owner;
901 if (widget) {
902 this.shell.activateWidget(widget.id);
903 }
904 }
905 });
906 }
907 }
908 getOrdinalNumbers() {
909 return ['First', 'Second', 'Third', 'Fourth', 'Fifth', 'Sixth', 'Seventh', 'Eighth', 'Ninth'];
910 }
911 isElectron() {
912 return environment_1.environment.electron.is();
913 }
914 togglePinned(title) {
915 if (title) {
916 (0, widgets_1.togglePinned)(title);
917 this.updatePinnedKey();
918 }
919 }
920 registerKeybindings(registry) {
921 if (exports.supportCut) {
922 registry.registerKeybinding({
923 command: CommonCommands.CUT.id,
924 keybinding: 'ctrlcmd+x'
925 });
926 }
927 if (exports.supportCopy) {
928 registry.registerKeybinding({
929 command: CommonCommands.COPY.id,
930 keybinding: 'ctrlcmd+c'
931 });
932 }
933 if (exports.supportPaste) {
934 registry.registerKeybinding({
935 command: CommonCommands.PASTE.id,
936 keybinding: 'ctrlcmd+v'
937 });
938 }
939 registry.registerKeybinding({
940 command: CommonCommands.COPY_PATH.id,
941 keybinding: os_1.isWindows ? 'shift+alt+c' : 'ctrlcmd+alt+c',
942 when: '!editorFocus'
943 });
944 registry.registerKeybindings(
945 // Edition
946 {
947 command: CommonCommands.UNDO.id,
948 keybinding: 'ctrlcmd+z'
949 }, {
950 command: CommonCommands.REDO.id,
951 keybinding: 'ctrlcmd+shift+z'
952 }, {
953 command: CommonCommands.SELECT_ALL.id,
954 keybinding: 'ctrlcmd+a'
955 }, {
956 command: CommonCommands.FIND.id,
957 keybinding: 'ctrlcmd+f'
958 }, {
959 command: CommonCommands.REPLACE.id,
960 keybinding: 'ctrlcmd+alt+f'
961 },
962 // Tabs
963 {
964 command: CommonCommands.NEXT_TAB.id,
965 keybinding: 'ctrlcmd+tab'
966 }, {
967 command: CommonCommands.NEXT_TAB.id,
968 keybinding: 'ctrlcmd+alt+d'
969 }, {
970 command: CommonCommands.PREVIOUS_TAB.id,
971 keybinding: 'ctrlcmd+shift+tab'
972 }, {
973 command: CommonCommands.PREVIOUS_TAB.id,
974 keybinding: 'ctrlcmd+alt+a'
975 }, {
976 command: CommonCommands.CLOSE_MAIN_TAB.id,
977 keybinding: this.isElectron() ? (os_1.isWindows ? 'ctrl+f4' : 'ctrlcmd+w') : 'alt+w'
978 }, {
979 command: CommonCommands.CLOSE_OTHER_MAIN_TABS.id,
980 keybinding: 'ctrlcmd+alt+t'
981 }, {
982 command: CommonCommands.CLOSE_ALL_MAIN_TABS.id,
983 keybinding: this.isElectron() ? 'ctrlCmd+k ctrlCmd+w' : 'alt+shift+w'
984 },
985 // Panels
986 {
987 command: CommonCommands.COLLAPSE_PANEL.id,
988 keybinding: 'alt+c'
989 }, {
990 command: CommonCommands.TOGGLE_BOTTOM_PANEL.id,
991 keybinding: 'ctrlcmd+j',
992 }, {
993 command: CommonCommands.COLLAPSE_ALL_PANELS.id,
994 keybinding: 'alt+shift+c',
995 }, {
996 command: CommonCommands.TOGGLE_MAXIMIZED.id,
997 keybinding: 'alt+m',
998 },
999 // Saving
1000 {
1001 command: CommonCommands.SAVE.id,
1002 keybinding: 'ctrlcmd+s'
1003 }, {
1004 command: CommonCommands.SAVE_WITHOUT_FORMATTING.id,
1005 keybinding: 'ctrlcmd+k s'
1006 }, {
1007 command: CommonCommands.SAVE_ALL.id,
1008 keybinding: 'ctrlcmd+alt+s'
1009 },
1010 // Theming
1011 {
1012 command: CommonCommands.SELECT_COLOR_THEME.id,
1013 keybinding: 'ctrlcmd+k ctrlcmd+t'
1014 }, {
1015 command: CommonCommands.PIN_TAB.id,
1016 keybinding: 'ctrlcmd+k shift+enter',
1017 when: '!activeEditorIsPinned'
1018 }, {
1019 command: CommonCommands.UNPIN_TAB.id,
1020 keybinding: 'ctrlcmd+k shift+enter',
1021 when: 'activeEditorIsPinned'
1022 }, {
1023 command: CommonCommands.NEW_UNTITLED_TEXT_FILE.id,
1024 keybinding: this.isElectron() ? 'ctrlcmd+n' : 'alt+n',
1025 }, {
1026 command: CommonCommands.NEW_UNTITLED_FILE.id,
1027 keybinding: 'ctrlcmd+alt+n'
1028 });
1029 for (const [index, ordinal] of this.getOrdinalNumbers().entries()) {
1030 registry.registerKeybinding({
1031 command: `workbench.action.focus${ordinal}EditorGroup`,
1032 keybinding: `ctrlcmd+${(index + 1) % 10}`,
1033 });
1034 }
1035 }
1036 async save(options) {
1037 const widget = this.shell.currentWidget;
1038 this.saveResourceService.save(widget, options);
1039 }
1040 async openAbout() {
1041 this.aboutDialog.open();
1042 }
1043 /**
1044 * registers event listener which make sure that
1045 * window doesn't get closed if CMD/CTRL W is pressed.
1046 * Too many users have that in their muscle memory.
1047 * Chrome doesn't let us rebind or prevent default the keybinding, so this
1048 * at least doesn't close the window immediately.
1049 */
1050 registerCtrlWHandling() {
1051 function isCtrlCmd(event) {
1052 return (os_1.isOSX && event.metaKey) || (!os_1.isOSX && event.ctrlKey);
1053 }
1054 window.document.addEventListener('keydown', event => {
1055 this.shouldPreventClose = isCtrlCmd(event) && event.code === 'KeyW';
1056 });
1057 window.document.addEventListener('keyup', () => {
1058 this.shouldPreventClose = false;
1059 });
1060 }
1061 onWillStop() {
1062 if (this.shouldPreventClose || this.shell.canSaveAll()) {
1063 return {
1064 reason: 'Dirty editors present',
1065 action: async () => {
1066 const captionsToSave = this.unsavedTabsCaptions();
1067 const untitledCaptionsToSave = this.unsavedUntitledTabsCaptions();
1068 const result = await (0, dialogs_1.confirmExitWithOrWithoutSaving)(captionsToSave, async () => {
1069 await this.saveDirty(untitledCaptionsToSave);
1070 await this.shell.saveAll();
1071 });
1072 if (this.shell.canSaveAll()) {
1073 this.shouldPreventClose = true;
1074 return false;
1075 }
1076 else {
1077 this.shouldPreventClose = false;
1078 return result;
1079 }
1080 }
1081 };
1082 }
1083 }
1084 unsavedTabsCaptions() {
1085 return this.shell.widgets
1086 .filter(widget => this.saveResourceService.canSave(widget))
1087 .map(widget => widget.title.label);
1088 }
1089 unsavedUntitledTabsCaptions() {
1090 return this.shell.widgets.filter(widget => { var _a; return ((_a = navigatable_1.NavigatableWidget.getUri(widget)) === null || _a === void 0 ? void 0 : _a.scheme) === common_1.UNTITLED_SCHEME && this.saveResourceService.canSaveAs(widget); });
1091 }
1092 async configureDisplayLanguage() {
1093 var _a, _b;
1094 const languageInfo = await this.languageQuickPickService.pickDisplayLanguage();
1095 if (languageInfo && !nls_1.nls.isSelectedLocale(languageInfo.languageId) && await this.confirmRestart((_b = (_a = languageInfo.localizedLanguageName) !== null && _a !== void 0 ? _a : languageInfo.languageName) !== null && _b !== void 0 ? _b : languageInfo.languageId)) {
1096 nls_1.nls.setLocale(languageInfo.languageId);
1097 this.windowService.setSafeToShutDown();
1098 this.windowService.reload();
1099 }
1100 }
1101 async saveDirty(toSave) {
1102 for (const widget of toSave) {
1103 const saveable = saveable_1.Saveable.get(widget);
1104 if (saveable === null || saveable === void 0 ? void 0 : saveable.dirty) {
1105 await this.saveResourceService.save(widget);
1106 }
1107 }
1108 }
1109 toggleBreadcrumbs() {
1110 const value = this.preferenceService.get('breadcrumbs.enabled');
1111 this.preferenceService.set('breadcrumbs.enabled', !value, preferences_1.PreferenceScope.User);
1112 }
1113 isBreadcrumbsEnabled() {
1114 return !!this.preferenceService.get('breadcrumbs.enabled');
1115 }
1116 async confirmRestart(languageName) {
1117 const appName = frontend_application_config_provider_1.FrontendApplicationConfigProvider.get().applicationName;
1118 const shouldRestart = await new dialogs_1.ConfirmDialog({
1119 title: nls_1.nls.localizeByDefault('Restart {0} to switch to {1}?', appName, languageName),
1120 msg: nls_1.nls.localizeByDefault('To change the display language to {0}, {1} needs to restart.', languageName, appName),
1121 ok: nls_1.nls.localizeByDefault('Restart'),
1122 cancel: dialogs_1.Dialog.CANCEL,
1123 }).open();
1124 return shouldRestart === true;
1125 }
1126 selectIconTheme() {
1127 var _a;
1128 let resetTo = this.iconThemes.getCurrent();
1129 const setTheme = (id, persist) => {
1130 const theme = this.iconThemes.getDefinition(id);
1131 if (theme) {
1132 this.iconThemes.setCurrent(theme, persist);
1133 }
1134 };
1135 const previewTheme = debounce(setTheme, 200);
1136 let items = [];
1137 for (const iconTheme of this.iconThemes.definitions) {
1138 items.push({
1139 id: iconTheme.id,
1140 label: iconTheme.label,
1141 description: iconTheme.description,
1142 });
1143 }
1144 items = items.sort((a, b) => {
1145 if (a.id === 'none') {
1146 return -1;
1147 }
1148 return a.label.localeCompare(b.label);
1149 });
1150 (_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.showQuickPick(items, {
1151 placeholder: nls_1.nls.localizeByDefault('Select File Icon Theme'),
1152 activeItem: items.find(item => item.id === (resetTo === null || resetTo === void 0 ? void 0 : resetTo.id)),
1153 onDidChangeSelection: (_, selectedItems) => {
1154 resetTo = undefined;
1155 setTheme(selectedItems[0].id, true);
1156 },
1157 onDidChangeActive: (_, activeItems) => {
1158 previewTheme(activeItems[0].id, false);
1159 },
1160 onDidHide: () => {
1161 if (resetTo) {
1162 this.iconThemes.setCurrent(resetTo, false);
1163 }
1164 }
1165 });
1166 }
1167 selectColorTheme() {
1168 var _a;
1169 let resetTo = this.themeService.getCurrentTheme().id;
1170 const setTheme = (id, persist) => this.themeService.setCurrentTheme(id, persist);
1171 const previewTheme = debounce(setTheme, 200);
1172 const itemsByTheme = { light: [], dark: [], hc: [], hcLight: [] };
1173 const lightThemesSeparator = nls_1.nls.localizeByDefault('light themes');
1174 const darkThemesSeparator = nls_1.nls.localizeByDefault('dark themes');
1175 const highContrastThemesSeparator = nls_1.nls.localizeByDefault('high contrast themes');
1176 for (const theme of this.themeService.getThemes().sort((a, b) => a.label.localeCompare(b.label))) {
1177 const themeItems = itemsByTheme[theme.type];
1178 // Add a separator for the first item in the respective group.
1179 // High Contrast Themes despite dark or light should be grouped together.
1180 if (themeItems.length === 0 && theme.type !== 'hcLight') {
1181 let label = '';
1182 if (theme.type === 'light') {
1183 label = lightThemesSeparator;
1184 }
1185 else if (theme.type === 'dark') {
1186 label = darkThemesSeparator;
1187 }
1188 else {
1189 label = highContrastThemesSeparator;
1190 }
1191 themeItems.push({
1192 type: 'separator',
1193 label
1194 });
1195 }
1196 themeItems.push({
1197 id: theme.id,
1198 label: theme.label,
1199 description: theme.description,
1200 });
1201 }
1202 const items = [...itemsByTheme.light, ...itemsByTheme.dark, ...itemsByTheme.hc, ...itemsByTheme.hcLight];
1203 (_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.showQuickPick(items, {
1204 placeholder: nls_1.nls.localizeByDefault('Select Color Theme (Up/Down Keys to Preview)'),
1205 activeItem: items.find(item => item.id === resetTo),
1206 onDidChangeSelection: (_, selectedItems) => {
1207 resetTo = undefined;
1208 setTheme(selectedItems[0].id, true);
1209 },
1210 onDidChangeActive: (_, activeItems) => {
1211 previewTheme(activeItems[0].id, false);
1212 },
1213 onDidHide: () => {
1214 if (resetTo) {
1215 setTheme(resetTo, false);
1216 }
1217 }
1218 });
1219 }
1220 /**
1221 * @todo https://github.com/eclipse-theia/theia/issues/12824
1222 */
1223 async showNewFilePicker() {
1224 const newFileContributions = this.menuRegistry.getMenuNode(CommonMenus.FILE_NEW_CONTRIBUTIONS); // Add menus
1225 const items = [
1226 {
1227 label: nls_1.nls.localizeByDefault('New Text File'),
1228 execute: async () => this.commandRegistry.executeCommand(CommonCommands.NEW_UNTITLED_TEXT_FILE.id)
1229 },
1230 ...newFileContributions.children
1231 .flatMap(node => {
1232 if (node.children && node.children.length > 0) {
1233 return node.children;
1234 }
1235 return node;
1236 })
1237 .filter(node => node.role || node.command)
1238 .map(node => {
1239 if (node.role) {
1240 return { type: 'separator' };
1241 }
1242 const command = this.commandRegistry.getCommand(node.command);
1243 return {
1244 label: command.label,
1245 execute: async () => this.commandRegistry.executeCommand(command.id)
1246 };
1247 })
1248 ];
1249 this.quickInputService.showQuickPick(items, {
1250 title: nls_1.nls.localizeByDefault('New File...'),
1251 placeholder: nls_1.nls.localizeByDefault('Select File Type or Enter File Name...'),
1252 canSelectMany: false
1253 });
1254 }
1255 registerColors(colors) {
1256 colors.register(
1257 // Base Colors should be aligned with https://code.visualstudio.com/api/references/theme-color#base-colors
1258 // if not yet contributed by Monaco, check runtime css variables to learn
1259 { id: 'selection.background', defaults: { dark: '#217daf', light: '#c0dbf1' }, description: 'Overall border color for focused elements. This color is only used if not overridden by a component.' }, { id: 'icon.foreground', defaults: { dark: '#C5C5C5', light: '#424242', hcDark: '#FFFFFF', hcLight: '#292929' }, description: 'The default color for icons in the workbench.' }, { id: 'sash.hoverBorder', defaults: { dark: color_1.Color.transparent('focusBorder', 0.99), light: color_1.Color.transparent('focusBorder', 0.99), hcDark: 'focusBorder', hcLight: 'focusBorder' }, description: 'The hover border color for draggable sashes.' }, { id: 'sash.activeBorder', defaults: { dark: 'focusBorder', light: 'focusBorder', hcDark: 'focusBorder' }, description: 'The active border color for draggable sashes.' },
1260 // Window border colors should be aligned with https://code.visualstudio.com/api/references/theme-color#window-border
1261 {
1262 id: 'window.activeBorder', defaults: {
1263 hcDark: 'contrastBorder',
1264 hcLight: 'contrastBorder'
1265 }, description: 'The color used for the border of the window when it is active.'
1266 }, {
1267 id: 'window.inactiveBorder', defaults: {
1268 hcDark: 'contrastBorder',
1269 hcLight: 'contrastBorder'
1270 },
1271 description: 'The color used for the border of the window when it is inactive.'
1272 },
1273 // Buttons should be aligned with https://code.visualstudio.com/api/references/theme-color#button-control
1274 // if not yet contributed by Monaco, check runtime css variables to learn
1275 { id: 'button.foreground', defaults: { dark: color_1.Color.white, light: color_1.Color.white, hcDark: color_1.Color.white, hcLight: color_1.Color.white }, description: 'Button foreground color.' }, { id: 'button.background', defaults: { dark: '#0E639C', light: '#007ACC', hcDark: undefined, hcLight: '#0F4A85' }, description: 'Button background color.' }, { id: 'button.hoverBackground', defaults: { dark: color_1.Color.lighten('button.background', 0.2), light: color_1.Color.darken('button.background', 0.2) }, description: 'Button background color when hovering.' },
1276 // Activity Bar colors should be aligned with https://code.visualstudio.com/api/references/theme-color#activity-bar
1277 {
1278 id: 'activityBar.background', defaults: {
1279 dark: '#333333',
1280 light: '#2C2C2C',
1281 hcDark: '#000000',
1282 hcLight: '#FFFFFF'
1283 }, description: 'Activity bar background color. The activity bar is showing on the far left or right and allows to switch between views of the side bar.'
1284 }, {
1285 id: 'activityBar.foreground', defaults: {
1286 dark: color_1.Color.white,
1287 light: color_1.Color.white,
1288 hcDark: color_1.Color.white,
1289 hcLight: 'editor.foreground'
1290 }, description: 'Activity bar item foreground color when it is active. The activity bar is showing on the far left or right and allows to switch between views of the side bar.',
1291 }, {
1292 id: 'activityBar.inactiveForeground', defaults: {
1293 dark: color_1.Color.transparent('activityBar.foreground', 0.4),
1294 light: color_1.Color.transparent('activityBar.foreground', 0.4),
1295 hcDark: color_1.Color.white,
1296 hcLight: 'editor.foreground'
1297 }, description: 'Activity bar item foreground color when it is inactive. The activity bar is showing on the far left or right and allows to switch between views of the side bar.'
1298 }, {
1299 id: 'activityBar.border', defaults: {
1300 hcDark: 'contrastBorder',
1301 hcLight: 'contrastBorder'
1302 }, description: 'Activity bar border color separating to the side bar. The activity bar is showing on the far left or right and allows to switch between views of the side bar.'
1303 }, {
1304 id: 'activityBar.activeBorder', defaults: {
1305 dark: 'activityBar.foreground',
1306 light: 'activityBar.foreground',
1307 hcLight: 'contrastBorder'
1308 }, description: 'Activity bar border color for the active item. The activity bar is showing on the far left or right and allows to switch between views of the side bar.'
1309 }, {
1310 id: 'activityBar.activeFocusBorder', defaults: {
1311 hcLight: '#B5200D'
1312 }, description: 'Activity bar focus border color for the active item. The activity bar is showing on the far left or right and allows to switch between views of the side bar.'
1313 }, { id: 'activityBar.activeBackground', description: 'Activity bar background color for the active item. The activity bar is showing on the far left or right and allows to switch between views of the side bar.' }, {
1314 id: 'activityBar.dropBackground', defaults: {
1315 dark: color_1.Color.transparent('#ffffff', 0.12),
1316 light: color_1.Color.transparent('#ffffff', 0.12),
1317 hcDark: color_1.Color.transparent('#ffffff', 0.12),
1318 }, description: 'Drag and drop feedback color for the activity bar items. The color should have transparency so that the activity bar entries can still shine through. The activity bar is showing on the far left or right and allows to switch between views of the side bar.'
1319 }, {
1320 id: 'activityBarBadge.background', defaults: {
1321 dark: '#007ACC',
1322 light: '#007ACC',
1323 hcDark: '#000000',
1324 hcLight: '#0F4A85'
1325 }, description: 'Activity notification badge background color. The activity bar is showing on the far left or right and allows to switch between views of the side bar.'
1326 }, {
1327 id: 'activityBarBadge.foreground', defaults: {
1328 dark: color_1.Color.white,
1329 light: color_1.Color.white,
1330 hcDark: color_1.Color.white,
1331 hcLight: color_1.Color.white
1332 }, description: 'Activity notification badge foreground color. The activity bar is showing on the far left or right and allows to switch between views of the side bar.'
1333 },
1334 // Side Bar should be aligned with https://code.visualstudio.com/api/references/theme-color#side-bar
1335 // if not yet contributed by Monaco, check runtime css variables to learn
1336 { id: 'sideBar.background', defaults: { dark: '#252526', light: '#F3F3F3', hcDark: '#000000', hcLight: '#FFFFFF' }, description: 'Side bar background color. The side bar is the container for views like explorer and search.' }, { id: 'sideBar.foreground', description: 'Side bar foreground color. The side bar is the container for views like explorer and search.' }, { id: 'sideBarSectionHeader.background', defaults: { dark: '#80808033', light: '#80808033' }, description: 'Side bar section header background color. The side bar is the container for views like explorer and search.' }, { id: 'sideBarSectionHeader.foreground', description: 'Side bar foreground color. The side bar is the container for views like explorer and search.' }, { id: 'sideBarSectionHeader.border', defaults: { dark: 'contrastBorder', light: 'contrastBorder', hcDark: 'contrastBorder', hcLight: 'contrastBorder' }, description: 'Side bar section header border color. The side bar is the container for views like explorer and search.' },
1337 // Lists and Trees colors should be aligned with https://code.visualstudio.com/api/references/theme-color#lists-and-trees
1338 // if not yet contributed by Monaco, check runtime css variables to learn.
1339 // TODO: Following are not yet supported/no respective elements in theia:
1340 // list.focusBackground, list.focusForeground, list.inactiveFocusBackground, list.filterMatchBorder,
1341 // list.dropBackground, listFilterWidget.outline, listFilterWidget.noMatchesOutline
1342 // list.invalidItemForeground => tree node needs an respective class
1343 { id: 'list.activeSelectionBackground', defaults: { dark: '#094771', light: '#0074E8', hcLight: color_1.Color.transparent('#0F4A85', 0.1) }, description: 'List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.' }, { id: 'list.activeSelectionForeground', defaults: { dark: '#FFF', light: '#FFF' }, description: 'List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.' }, { id: 'list.inactiveSelectionBackground', defaults: { dark: '#37373D', light: '#E4E6F1', hcLight: color_1.Color.transparent('#0F4A85', 0.1) }, description: 'List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.' }, { id: 'list.inactiveSelectionForeground', description: 'List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.' }, { id: 'list.hoverBackground', defaults: { dark: '#2A2D2E', light: '#F0F0F0', hcLight: color_1.Color.transparent('#0F4A85', 0.1) }, description: 'List/Tree background when hovering over items using the mouse.' }, { id: 'list.hoverForeground', description: 'List/Tree foreground when hovering over items using the mouse.' }, { id: 'list.errorForeground', defaults: { dark: '#F88070', light: '#B01011' }, description: 'Foreground color of list items containing errors.' }, { id: 'list.warningForeground', defaults: { dark: '#CCA700', light: '#855F00' }, description: 'Foreground color of list items containing warnings.' }, { id: 'list.filterMatchBackground', defaults: { dark: 'editor.findMatchHighlightBackground', light: 'editor.findMatchHighlightBackground' }, description: 'Background color of the filtered match.' }, { id: 'list.highlightForeground', defaults: { dark: '#18A3FF', light: '#0066BF', hcDark: 'focusBorder', hcLight: 'focusBorder' }, description: 'List/Tree foreground color of the match highlights when searching inside the list/tree.' }, { id: 'list.focusHighlightForeground', defaults: { dark: 'list.highlightForeground', light: 'list.activeSelectionForeground', hcDark: 'list.highlightForeground', hcLight: 'list.highlightForeground' }, description: 'List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.' }, { id: 'tree.inactiveIndentGuidesStroke', defaults: { dark: color_1.Color.transparent('tree.indentGuidesStroke', 0.4), light: color_1.Color.transparent('tree.indentGuidesStroke', 0.4), hcDark: color_1.Color.transparent('tree.indentGuidesStroke', 0.4) }, description: 'Tree stroke color for the inactive indentation guides.' },
1344 // Editor Group & Tabs colors should be aligned with https://code.visualstudio.com/api/references/theme-color#editor-groups-tabs
1345 {
1346 id: 'editorGroup.border',
1347 defaults: {
1348 dark: '#444444',
1349 light: '#E7E7E7',
1350 hcDark: 'contrastBorder',
1351 hcLight: 'contrastBorder'
1352 },
1353 description: 'Color to separate multiple editor groups from each other. Editor groups are the containers of editors.'
1354 }, {
1355 id: 'editorGroup.dropBackground',
1356 defaults: {
1357 dark: color_1.Color.transparent('#53595D', 0.5),
1358 light: color_1.Color.transparent('#2677CB', 0.18),
1359 hcLight: color_1.Color.transparent('#0F4A85', 0.50)
1360 },
1361 description: 'Background color when dragging editors around. The color should have transparency so that the editor contents can still shine through.'
1362 }, {
1363 id: 'editorGroupHeader.tabsBackground',
1364 defaults: {
1365 dark: '#252526',
1366 light: '#F3F3F3',
1367 },
1368 description: 'Background color of the editor group title header when tabs are enabled. Editor groups are the containers of editors.'
1369 }, {
1370 id: 'editorGroupHeader.tabsBorder',
1371 defaults: {
1372 hcDark: 'contrastBorder'
1373 },
1374 description: 'Border color of the editor group title header when tabs are enabled. Editor groups are the containers of editors.'
1375 }, {
1376 id: 'tab.activeBackground',
1377 defaults: {
1378 dark: 'editor.background',
1379 light: 'editor.background',
1380 hcDark: 'editor.background',
1381 hcLight: 'editor.background'
1382 },
1383 description: 'Active tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1384 }, {
1385 id: 'tab.unfocusedActiveBackground',
1386 defaults: {
1387 dark: 'tab.activeBackground',
1388 light: 'tab.activeBackground',
1389 hcDark: 'tab.activeBackground',
1390 hcLight: 'tab.activeBackground'
1391 },
1392 description: 'Active tab background color in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1393 }, {
1394 id: 'tab.inactiveBackground',
1395 defaults: {
1396 dark: '#2D2D2D',
1397 light: '#ECECEC'
1398 },
1399 description: 'Inactive tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1400 }, {
1401 id: 'tab.activeForeground',
1402 defaults: {
1403 dark: color_1.Color.white,
1404 light: '#333333',
1405 hcDark: color_1.Color.white,
1406 hcLight: '#292929'
1407 }, description: 'Active tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1408 }, {
1409 id: 'tab.inactiveForeground', defaults: {
1410 dark: color_1.Color.transparent('tab.activeForeground', 0.5),
1411 light: color_1.Color.transparent('tab.activeForeground', 0.7),
1412 hcDark: color_1.Color.white,
1413 hcLight: '#292929'
1414 }, description: 'Inactive tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1415 }, {
1416 id: 'tab.unfocusedActiveForeground', defaults: {
1417 dark: color_1.Color.transparent('tab.activeForeground', 0.5),
1418 light: color_1.Color.transparent('tab.activeForeground', 0.7),
1419 hcDark: color_1.Color.white,
1420 hcLight: '#292929'
1421 }, description: 'Active tab foreground color in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1422 }, {
1423 id: 'tab.unfocusedInactiveForeground', defaults: {
1424 dark: color_1.Color.transparent('tab.inactiveForeground', 0.5),
1425 light: color_1.Color.transparent('tab.inactiveForeground', 0.5),
1426 hcDark: color_1.Color.white,
1427 hcLight: '#292929'
1428 }, description: 'Inactive tab foreground color in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1429 }, {
1430 id: 'tab.border', defaults: {
1431 dark: '#252526',
1432 light: '#F3F3F3',
1433 hcDark: 'contrastBorder',
1434 hcLight: 'contrastBorder'
1435 }, description: 'Border to separate tabs from each other. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1436 }, {
1437 id: 'tab.activeBorder',
1438 description: 'Border on the bottom of an active tab. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1439 }, {
1440 id: 'tab.unfocusedActiveBorder',
1441 defaults: {
1442 dark: color_1.Color.transparent('tab.activeBorder', 0.5),
1443 light: color_1.Color.transparent('tab.activeBorder', 0.7)
1444 },
1445 description: 'Border on the bottom of an active tab in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1446 }, {
1447 id: 'tab.activeBorderTop',
1448 defaults: {
1449 hcLight: '#B5200D'
1450 },
1451 description: 'Border to the top of an active tab. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1452 }, {
1453 id: 'tab.unfocusedActiveBorderTop', defaults: {
1454 dark: color_1.Color.transparent('tab.activeBorderTop', 0.5),
1455 light: color_1.Color.transparent('tab.activeBorderTop', 0.7),
1456 hcLight: '#B5200D'
1457 }, description: 'Border to the top of an active tab in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1458 }, {
1459 id: 'tab.hoverBackground',
1460 description: 'Tab background color when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1461 }, {
1462 id: 'tab.unfocusedHoverBackground', defaults: {
1463 dark: color_1.Color.transparent('tab.hoverBackground', 0.5),
1464 light: color_1.Color.transparent('tab.hoverBackground', 0.7)
1465 }, description: 'Tab background color in an unfocused group when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1466 }, {
1467 id: 'tab.hoverBorder',
1468 description: 'Border to highlight tabs when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1469 }, {
1470 id: 'tab.unfocusedHoverBorder', defaults: {
1471 dark: color_1.Color.transparent('tab.hoverBorder', 0.5),
1472 light: color_1.Color.transparent('tab.hoverBorder', 0.7),
1473 hcLight: 'contrastBorder'
1474 }, description: 'Border to highlight tabs in an unfocused group when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1475 }, {
1476 id: 'tab.activeModifiedBorder', defaults: {
1477 dark: '#3399CC',
1478 light: '#33AAEE',
1479 hcLight: 'contrastBorder'
1480 }, description: 'Border on the top of modified (dirty) active tabs in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1481 }, {
1482 id: 'tab.inactiveModifiedBorder', defaults: {
1483 dark: color_1.Color.transparent('tab.activeModifiedBorder', 0.5),
1484 light: color_1.Color.transparent('tab.activeModifiedBorder', 0.5),
1485 hcDark: color_1.Color.white,
1486 hcLight: 'contrastBorder'
1487 }, description: 'Border on the top of modified (dirty) inactive tabs in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1488 }, {
1489 id: 'tab.unfocusedActiveModifiedBorder', defaults: {
1490 dark: color_1.Color.transparent('tab.activeModifiedBorder', 0.5),
1491 light: color_1.Color.transparent('tab.activeModifiedBorder', 0.7),
1492 hcDark: color_1.Color.white,
1493 hcLight: 'contrastBorder'
1494 }, description: 'Border on the top of modified (dirty) active tabs in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1495 }, {
1496 id: 'tab.unfocusedInactiveModifiedBorder', defaults: {
1497 dark: color_1.Color.transparent('tab.inactiveModifiedBorder', 0.5),
1498 light: color_1.Color.transparent('tab.inactiveModifiedBorder', 0.5),
1499 hcDark: color_1.Color.white,
1500 hcLight: 'contrastBorder'
1501 }, description: 'Border on the top of modified (dirty) inactive tabs in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.'
1502 },
1503 // Status bar colors should be aligned with https://code.visualstudio.com/api/references/theme-color#status-bar-colors
1504 // Not yet supported:
1505 // statusBarItem.prominentForeground, statusBarItem.prominentBackground, statusBarItem.prominentHoverBackground
1506 {
1507 id: 'statusBar.foreground', defaults: {
1508 dark: '#FFFFFF',
1509 light: '#FFFFFF',
1510 hcDark: '#FFFFFF',
1511 hcLight: 'editor.foreground'
1512 }, description: 'Status bar foreground color when a workspace is opened. The status bar is shown in the bottom of the window.'
1513 }, {
1514 id: 'statusBar.background', defaults: {
1515 dark: '#007ACC',
1516 light: '#007ACC'
1517 }, description: 'Status bar background color when a workspace is opened. The status bar is shown in the bottom of the window.'
1518 }, {
1519 id: 'statusBar.noFolderForeground', defaults: {
1520 dark: 'statusBar.foreground',
1521 light: 'statusBar.foreground',
1522 hcDark: 'statusBar.foreground',
1523 hcLight: 'statusBar.foreground'
1524 }, description: 'Status bar foreground color when no folder is opened. The status bar is shown in the bottom of the window.'
1525 }, {
1526 id: 'statusBar.noFolderBackground', defaults: {
1527 dark: '#68217A',
1528 light: '#68217A'
1529 }, description: 'Status bar background color when no folder is opened. The status bar is shown in the bottom of the window.'
1530 }, {
1531 id: 'statusBar.border', defaults: {
1532 hcDark: 'contrastBorder',
1533 hcLight: 'contrastBorder'
1534 }, description: 'Status bar border color separating to the sidebar and editor. The status bar is shown in the bottom of the window.'
1535 }, {
1536 id: 'statusBar.noFolderBorder', defaults: {
1537 dark: 'statusBar.border',
1538 light: 'statusBar.border',
1539 hcDark: 'statusBar.border',
1540 hcLight: 'statusBar.border'
1541 }, description: 'Status bar border color separating to the sidebar and editor when no folder is opened. The status bar is shown in the bottom of the window.'
1542 }, {
1543 id: 'statusBarItem.activeBackground', defaults: {
1544 dark: color_1.Color.rgba(255, 255, 255, 0.18),
1545 light: color_1.Color.rgba(255, 255, 255, 0.18),
1546 hcDark: color_1.Color.rgba(255, 255, 255, 0.18),
1547 hcLight: color_1.Color.rgba(0, 0, 0, 0.18)
1548 }, description: 'Status bar item background color when clicking. The status bar is shown in the bottom of the window.'
1549 }, {
1550 id: 'statusBarItem.hoverBackground', defaults: {
1551 dark: color_1.Color.rgba(255, 255, 255, 0.12),
1552 light: color_1.Color.rgba(255, 255, 255, 0.12),
1553 hcDark: color_1.Color.rgba(255, 255, 255, 0.12),
1554 hcLight: color_1.Color.rgba(0, 0, 0, 0.12)
1555 }, description: 'Status bar item background color when hovering. The status bar is shown in the bottom of the window.'
1556 }, {
1557 id: 'statusBarItem.errorBackground', defaults: {
1558 dark: color_1.Color.darken('errorBackground', 0.4),
1559 light: color_1.Color.darken('errorBackground', 0.4),
1560 hcDark: undefined,
1561 hcLight: '#B5200D'
1562 }, description: 'Status bar error items background color. Error items stand out from other status bar entries to indicate error conditions. The status bar is shown in the bottom of the window.'
1563 }, {
1564 id: 'statusBarItem.errorForeground', defaults: {
1565 dark: color_1.Color.white,
1566 light: color_1.Color.white,
1567 hcDark: color_1.Color.white,
1568 hcLight: color_1.Color.white
1569 }, description: 'Status bar error items foreground color. Error items stand out from other status bar entries to indicate error conditions. The status bar is shown in the bottom of the window.'
1570 }, {
1571 id: 'statusBarItem.warningBackground', defaults: {
1572 dark: color_1.Color.darken('warningBackground', 0.4),
1573 light: color_1.Color.darken('warningBackground', 0.4),
1574 hcDark: undefined,
1575 hcLight: '#895503'
1576 }, description: 'Status bar warning items background color. Warning items stand out from other status bar entries to indicate warning conditions. The status bar is shown in the bottom of the window.'
1577 }, {
1578 id: 'statusBarItem.warningForeground', defaults: {
1579 dark: color_1.Color.white,
1580 light: color_1.Color.white,
1581 hcDark: color_1.Color.white,
1582 hcLight: color_1.Color.white
1583 }, description: 'Status bar warning items foreground color. Warning items stand out from other status bar entries to indicate warning conditions. The status bar is shown in the bottom of the window.'
1584 },
1585 // Quickinput colors should be aligned with https://code.visualstudio.com/api/references/theme-color#quick-picker
1586 // if not yet contributed by Monaco, check runtime css variables to learn.
1587 {
1588 id: 'quickInput.background', defaults: {
1589 dark: 'editorWidget.background',
1590 light: 'editorWidget.background',
1591 hcDark: 'editorWidget.background',
1592 hcLight: 'editorWidget.background'
1593 }, description: 'Quick Input background color. The Quick Input widget is the container for views like the color theme picker.'
1594 }, {
1595 id: 'quickInput.foreground', defaults: {
1596 dark: 'editorWidget.foreground',
1597 light: 'editorWidget.foreground',
1598 hcDark: 'editorWidget.foreground',
1599 hcLight: 'editorWidget.foreground'
1600 }, description: 'Quick Input foreground color. The Quick Input widget is the container for views like the color theme picker.'
1601 }, {
1602 id: 'quickInput.list.focusBackground', defaults: {
1603 dark: undefined,
1604 light: undefined,
1605 hcDark: undefined,
1606 hcLight: undefined
1607 }, description: 'quickInput.list.focusBackground deprecation. Please use quickInputList.focusBackground instead'
1608 }, {
1609 id: 'quickInputList.focusForeground', defaults: {
1610 dark: 'list.activeSelectionForeground',
1611 light: 'list.activeSelectionForeground',
1612 hcDark: 'list.activeSelectionForeground',
1613 hcLight: 'list.activeSelectionForeground'
1614 }, description: 'Quick picker foreground color for the focused item'
1615 }, {
1616 id: 'quickInputList.focusBackground', defaults: {
1617 dark: 'list.activeSelectionBackground',
1618 light: 'list.activeSelectionBackground',
1619 hcDark: undefined
1620 }, description: 'Quick picker background color for the focused item.'
1621 },
1622 // Panel colors should be aligned with https://code.visualstudio.com/api/references/theme-color#panel-colors
1623 {
1624 id: 'panel.background', defaults: {
1625 dark: 'editor.background', light: 'editor.background', hcDark: 'editor.background', hcLight: 'editor.background'
1626 }, description: 'Panel background color. Panels are shown below the editor area and contain views like output and integrated terminal.'
1627 }, {
1628 id: 'panel.border', defaults: {
1629 dark: color_1.Color.transparent('#808080', 0.35), light: color_1.Color.transparent('#808080', 0.35), hcDark: 'contrastBorder', hcLight: 'contrastBorder'
1630 }, description: 'Panel border color to separate the panel from the editor. Panels are shown below the editor area and contain views like output and integrated terminal.'
1631 }, {
1632 id: 'panel.dropBackground', defaults: {
1633 dark: color_1.Color.rgba(255, 255, 255, 0.12), light: color_1.Color.transparent('#2677CB', 0.18), hcDark: color_1.Color.rgba(255, 255, 255, 0.12)
1634 }, description: 'Drag and drop feedback color for the panel title items. The color should have transparency so that the panel entries can still shine through. Panels are shown below the editor area and contain views like output and integrated terminal.'
1635 }, {
1636 id: 'panelTitle.activeForeground', defaults: {
1637 dark: '#E7E7E7', light: '#424242', hcDark: color_1.Color.white, hcLight: 'editor.foreground'
1638 }, description: 'Title color for the active panel. Panels are shown below the editor area and contain views like output and integrated terminal.'
1639 }, {
1640 id: 'panelTitle.inactiveForeground', defaults: {
1641 dark: color_1.Color.transparent('panelTitle.activeForeground', 0.6), light: color_1.Color.transparent('panelTitle.activeForeground', 0.75), hcDark: color_1.Color.white, hcLight: 'editor.foreground'
1642 }, description: 'Title color for the inactive panel. Panels are shown below the editor area and contain views like output and integrated terminal.'
1643 }, {
1644 id: 'panelTitle.activeBorder', defaults: {
1645 dark: 'panelTitle.activeForeground', light: 'panelTitle.activeForeground', hcDark: 'contrastBorder', hcLight: '#B5200D'
1646 }, description: 'Border color for the active panel title. Panels are shown below the editor area and contain views like output and integrated terminal.'
1647 }, {
1648 id: 'panelInput.border', defaults: { light: '#ddd' },
1649 description: 'Input box border for inputs in the panel.'
1650 }, {
1651 id: 'imagePreview.border', defaults: {
1652 dark: color_1.Color.transparent('#808080', 0.35), light: color_1.Color.transparent('#808080', 0.35), hcDark: 'contrastBorder', hcLight: 'contrastBorder'
1653 }, description: 'Border color for image in image preview.'
1654 },
1655 // Title Bar colors should be aligned with https://code.visualstudio.com/api/references/theme-color#title-bar-colors
1656 {
1657 id: 'titleBar.activeForeground', defaults: {
1658 dark: '#CCCCCC',
1659 light: '#333333',
1660 hcDark: '#FFFFFF',
1661 hcLight: '#292929'
1662 }, description: 'Title bar foreground when the window is active. Note that this color is currently only supported on macOS.'
1663 }, {
1664 id: 'titleBar.inactiveForeground', defaults: {
1665 dark: color_1.Color.transparent('titleBar.activeForeground', 0.6),
1666 light: color_1.Color.transparent('titleBar.activeForeground', 0.6),
1667 hcLight: '#292929'
1668 }, description: 'Title bar foreground when the window is inactive. Note that this color is currently only supported on macOS.'
1669 }, {
1670 id: 'titleBar.activeBackground', defaults: {
1671 dark: '#3C3C3C',
1672 light: '#DDDDDD',
1673 hcDark: '#000000',
1674 hcLight: '#FFFFFF'
1675 }, description: 'Title bar background when the window is active. Note that this color is currently only supported on macOS.'
1676 }, {
1677 id: 'titleBar.inactiveBackground', defaults: {
1678 dark: color_1.Color.transparent('titleBar.activeBackground', 0.6),
1679 light: color_1.Color.transparent('titleBar.activeBackground', 0.6)
1680 }, description: 'Title bar background when the window is inactive. Note that this color is currently only supported on macOS.'
1681 }, {
1682 id: 'titleBar.border', defaults: {
1683 hcDark: 'contrastBorder',
1684 hcLight: 'contrastBorder'
1685 }, description: 'Title bar border color. Note that this color is currently only supported on macOS.'
1686 },
1687 // Menu Bar colors should be aligned with https://code.visualstudio.com/api/references/theme-color#menu-bar-colors
1688 {
1689 id: 'menubar.selectionForeground', defaults: {
1690 dark: 'titleBar.activeForeground',
1691 light: 'titleBar.activeForeground',
1692 hcDark: 'titleBar.activeForeground',
1693 hcLight: 'titleBar.activeForeground'
1694 }, description: 'Foreground color of the selected menu item in the menubar.'
1695 }, {
1696 id: 'menubar.selectionBackground', defaults: {
1697 dark: 'toolbar.hoverBackground',
1698 light: 'toolbar.hoverBackground'
1699 }, description: 'Background color of the selected menu item in the menubar.'
1700 }, {
1701 id: 'menubar.selectionBorder', defaults: {
1702 hcDark: 'activeContrastBorder', hcLight: 'activeContrastBorder'
1703 }, description: 'Border color of the selected menu item in the menubar.'
1704 }, {
1705 id: 'menu.border', defaults: {
1706 hcDark: 'contrastBorder', hcLight: 'contrastBorder'
1707 }, description: 'Border color of menus.'
1708 }, {
1709 id: 'menu.foreground', defaults: {
1710 dark: 'dropdown.foreground', light: 'foreground', hcDark: 'dropdown.foreground', hcLight: 'dropdown.foreground'
1711 },
1712 description: 'Foreground color of menu items.'
1713 }, {
1714 id: 'menu.background', defaults: {
1715 dark: 'dropdown.background', light: 'dropdown.background', hcDark: 'dropdown.background', hcLight: 'dropdown.background'
1716 }, description: 'Background color of menu items.'
1717 }, {
1718 id: 'menu.selectionForeground', defaults: {
1719 dark: 'list.activeSelectionForeground', light: 'list.activeSelectionForeground', hcDark: 'list.activeSelectionForeground', hcLight: 'list.activeSelectionForeground'
1720 }, description: 'Foreground color of the selected menu item in menus.'
1721 }, {
1722 id: 'menu.selectionBackground', defaults: {
1723 dark: 'list.activeSelectionBackground', light: 'list.activeSelectionBackground', hcDark: 'list.activeSelectionBackground', hcLight: 'list.activeSelectionBackground'
1724 },
1725 description: 'Background color of the selected menu item in menus.'
1726 }, {
1727 id: 'menu.selectionBorder', defaults: {
1728 hcDark: 'activeContrastBorder', hcLight: 'activeContrastBorder'
1729 }, description: 'Border color of the selected menu item in menus.'
1730 }, {
1731 id: 'menu.separatorBackground', defaults: {
1732 dark: '#BBBBBB', light: '#888888', hcDark: 'contrastBorder', hcLight: 'contrastBorder'
1733 },
1734 description: 'Color of a separator menu item in menus.'
1735 },
1736 // Welcome Page colors should be aligned with https://code.visualstudio.com/api/references/theme-color#welcome-page
1737 { id: 'welcomePage.background', description: 'Background color for the Welcome page.' }, { id: 'welcomePage.buttonBackground', defaults: { dark: color_1.Color.rgba(0, 0, 0, .2), light: color_1.Color.rgba(0, 0, 0, .04), hcDark: color_1.Color.black, hcLight: color_1.Color.white }, description: 'Background color for the buttons on the Welcome page.' }, { id: 'welcomePage.buttonHoverBackground', defaults: { dark: color_1.Color.rgba(200, 235, 255, .072), light: color_1.Color.rgba(0, 0, 0, .10) }, description: 'Hover background color for the buttons on the Welcome page.' }, { id: 'walkThrough.embeddedEditorBackground', defaults: { dark: color_1.Color.rgba(0, 0, 0, .4), light: '#f4f4f4' }, description: 'Background color for the embedded editors on the Interactive Playground.' },
1738 // Dropdown colors should be aligned with https://code.visualstudio.com/api/references/theme-color#dropdown-control
1739 {
1740 id: 'dropdown.background', defaults: {
1741 light: color_1.Color.white,
1742 dark: '#3C3C3C',
1743 hcDark: color_1.Color.black,
1744 hcLight: color_1.Color.white
1745 }, description: 'Dropdown background.'
1746 }, {
1747 id: 'dropdown.listBackground', defaults: {
1748 hcDark: color_1.Color.black,
1749 hcLight: color_1.Color.white
1750 }, description: 'Dropdown list background.'
1751 }, {
1752 id: 'dropdown.foreground', defaults: {
1753 dark: '#F0F0F0',
1754 hcDark: color_1.Color.white,
1755 hcLight: 'foreground'
1756 }, description: 'Dropdown foreground.'
1757 }, {
1758 id: 'dropdown.border', defaults: {
1759 light: '#CECECE',
1760 dark: 'dropdown.background',
1761 hcDark: 'contrastBorder',
1762 hcLight: 'contrastBorder'
1763 }, description: 'Dropdown border.'
1764 },
1765 // Settings Editor colors should be aligned with https://code.visualstudio.com/api/references/theme-color#settings-editor-colors
1766 {
1767 id: 'settings.headerForeground', defaults: {
1768 light: '#444444', dark: '#e7e7e7', hcDark: '#ffffff', hcLight: '#292929'
1769 }, description: 'The foreground color for a section header or active title.'
1770 }, {
1771 id: 'settings.modifiedItemIndicator', defaults: {
1772 light: color_1.Color.rgba(102, 175, 224),
1773 dark: color_1.Color.rgba(12, 125, 157),
1774 hcDark: color_1.Color.rgba(0, 73, 122),
1775 hcLight: color_1.Color.rgba(102, 175, 224)
1776 }, description: 'The color of the modified setting indicator.'
1777 }, {
1778 id: 'settings.dropdownBackground', defaults: {
1779 dark: 'dropdown.background', light: 'dropdown.background', hcDark: 'dropdown.background', hcLight: 'dropdown.background'
1780 },
1781 description: 'Settings editor dropdown background.'
1782 }, {
1783 id: 'settings.dropdownForeground', defaults: {
1784 dark: 'dropdown.foreground', light: 'dropdown.foreground', hcDark: 'dropdown.foreground', hcLight: 'dropdown.foreground'
1785 }, description: 'Settings editor dropdown foreground.'
1786 }, {
1787 id: 'settings.dropdownBorder', defaults: {
1788 dark: 'dropdown.border', light: 'dropdown.border', hcDark: 'dropdown.border', hcLight: 'dropdown.border'
1789 }, description: 'Settings editor dropdown border.'
1790 }, {
1791 id: 'settings.dropdownListBorder', defaults: {
1792 dark: 'editorWidget.border', light: 'editorWidget.border', hcDark: 'editorWidget.border', hcLight: 'editorWidget.border'
1793 }, description: 'Settings editor dropdown list border. This surrounds the options and separates the options from the description.'
1794 }, {
1795 id: 'settings.checkboxBackground', defaults: {
1796 dark: 'checkbox.background', light: 'checkbox.background', hcDark: 'checkbox.background', hcLight: 'checkbox.background'
1797 }, description: 'Settings editor checkbox background.'
1798 }, {
1799 id: 'settings.checkboxForeground', defaults: {
1800 dark: 'checkbox.foreground', light: 'checkbox.foreground', hcDark: 'checkbox.foreground', hcLight: 'checkbox.foreground'
1801 }, description: 'Settings editor checkbox foreground.'
1802 }, {
1803 id: 'settings.checkboxBorder', defaults: {
1804 dark: 'checkbox.border', light: 'checkbox.border', hcDark: 'checkbox.border', hcLight: 'checkbox.border'
1805 }, description: 'Settings editor checkbox border.'
1806 }, {
1807 id: 'settings.textInputBackground', defaults: {
1808 dark: 'input.background', light: 'input.background', hcDark: 'input.background', hcLight: 'input.background'
1809 }, description: 'Settings editor text input box background.'
1810 }, {
1811 id: 'settings.textInputForeground', defaults: {
1812 dark: 'input.foreground', light: 'input.foreground', hcDark: 'input.foreground', hcLight: 'input.foreground'
1813 }, description: 'Settings editor text input box foreground.'
1814 }, {
1815 id: 'settings.textInputBorder', defaults: {
1816 dark: 'input.border', light: 'input.border', hcDark: 'input.border', hcLight: 'input.background'
1817 }, description: 'Settings editor text input box border.'
1818 }, {
1819 id: 'settings.numberInputBackground', defaults: {
1820 dark: 'input.background', light: 'input.background', hcDark: 'input.background', hcLight: 'input.background'
1821 }, description: 'Settings editor number input box background.'
1822 }, {
1823 id: 'settings.numberInputForeground', defaults: {
1824 dark: 'input.foreground', light: 'input.foreground', hcDark: 'input.foreground', hcLight: 'input.foreground'
1825 }, description: 'Settings editor number input box foreground.'
1826 }, {
1827 id: 'settings.numberInputBorder', defaults: {
1828 dark: 'input.border', light: 'input.border', hcDark: 'input.border', hcLight: 'input.border'
1829 }, description: 'Settings editor number input box border.'
1830 }, {
1831 id: 'settings.focusedRowBackground', defaults: {
1832 dark: color_1.Color.transparent('#808080', 0.14),
1833 light: color_1.Color.transparent('#808080', 0.03),
1834 hcDark: undefined,
1835 hcLight: undefined
1836 }, description: 'The background color of a settings row when focused.'
1837 }, {
1838 id: 'settings.rowHoverBackground', defaults: {
1839 dark: color_1.Color.transparent('#808080', 0.07),
1840 light: color_1.Color.transparent('#808080', 0.05),
1841 hcDark: undefined,
1842 hcLight: undefined
1843 }, description: 'The background color of a settings row when hovered.'
1844 }, {
1845 id: 'settings.focusedRowBorder', defaults: {
1846 dark: color_1.Color.rgba(255, 255, 255, 0.12),
1847 light: color_1.Color.rgba(0, 0, 0, 0.12),
1848 hcDark: 'focusBorder',
1849 hcLight: 'focusBorder'
1850 }, description: "The color of the row's top and bottom border when the row is focused."
1851 },
1852 // Toolbar Action colors should be aligned with https://code.visualstudio.com/api/references/theme-color#action-colors
1853 {
1854 id: 'toolbar.hoverBackground', defaults: {
1855 dark: '#5a5d5e50', light: '#b8b8b850', hcDark: undefined, hcLight: undefined
1856 }, description: 'Toolbar background when hovering over actions using the mouse.'
1857 },
1858 // Theia Variable colors
1859 {
1860 id: 'variable.name.color', defaults: {
1861 dark: '#C586C0',
1862 light: '#9B46B0',
1863 hcDark: '#C586C0'
1864 },
1865 description: 'Color of a variable name.'
1866 }, {
1867 id: 'variable.value.color', defaults: {
1868 dark: color_1.Color.rgba(204, 204, 204, 0.6),
1869 light: color_1.Color.rgba(108, 108, 108, 0.8),
1870 hcDark: color_1.Color.rgba(204, 204, 204, 0.6)
1871 },
1872 description: 'Color of a variable value.'
1873 }, {
1874 id: 'variable.number.variable.color', defaults: {
1875 dark: '#B5CEA8',
1876 light: '#09885A',
1877 hcDark: '#B5CEA8'
1878 },
1879 description: 'Value color of a number variable'
1880 }, {
1881 id: 'variable.boolean.variable.color', defaults: {
1882 dark: '#4E94CE',
1883 light: '#0000FF',
1884 hcDark: '#4E94CE'
1885 },
1886 description: 'Value color of a boolean variable'
1887 }, {
1888 id: 'variable.string.variable.color', defaults: {
1889 dark: '#CE9178',
1890 light: '#A31515',
1891 hcDark: '#CE9178'
1892 },
1893 description: 'Value color of a string variable'
1894 },
1895 // Theia ANSI colors
1896 {
1897 id: 'ansi.black.color', defaults: {
1898 dark: '#A0A0A0',
1899 light: color_1.Color.rgba(128, 128, 128),
1900 hcDark: '#A0A0A0'
1901 },
1902 description: 'ANSI black color'
1903 }, {
1904 id: 'ansi.red.color', defaults: {
1905 dark: '#A74747',
1906 light: '#BE1717',
1907 hcDark: '#A74747'
1908 },
1909 description: 'ANSI red color'
1910 }, {
1911 id: 'ansi.green.color', defaults: {
1912 dark: '#348F34',
1913 light: '#338A2F',
1914 hcDark: '#348F34'
1915 },
1916 description: 'ANSI green color'
1917 }, {
1918 id: 'ansi.yellow.color', defaults: {
1919 dark: '#5F4C29',
1920 light: '#BEB817',
1921 hcDark: '#5F4C29'
1922 },
1923 description: 'ANSI yellow color'
1924 }, {
1925 id: 'ansi.blue.color', defaults: {
1926 dark: '#6286BB',
1927 light: color_1.Color.rgba(0, 0, 139),
1928 hcDark: '#6286BB'
1929 },
1930 description: 'ANSI blue color'
1931 }, {
1932 id: 'ansi.magenta.color', defaults: {
1933 dark: '#914191',
1934 light: color_1.Color.rgba(139, 0, 139),
1935 hcDark: '#914191'
1936 },
1937 description: 'ANSI magenta color'
1938 }, {
1939 id: 'ansi.cyan.color', defaults: {
1940 dark: '#218D8D',
1941 light: color_1.Color.rgba(0, 139, 139),
1942 hcDark: '#218D8D'
1943 },
1944 description: 'ANSI cyan color'
1945 }, {
1946 id: 'ansi.white.color', defaults: {
1947 dark: '#707070',
1948 light: '#BDBDBD',
1949 hcDark: '#707070'
1950 },
1951 description: 'ANSI white color'
1952 },
1953 // Theia defaults
1954 // Base
1955 {
1956 id: 'errorBackground',
1957 defaults: {
1958 dark: 'inputValidation.errorBackground',
1959 light: 'inputValidation.errorBackground',
1960 hcDark: 'inputValidation.errorBackground'
1961 }, description: 'Background color of error widgets (like alerts or notifications).'
1962 }, {
1963 id: 'successBackground',
1964 defaults: {
1965 dark: 'editorGutter.addedBackground',
1966 light: 'editorGutter.addedBackground',
1967 hcDark: 'editorGutter.addedBackground'
1968 }, description: 'Background color of success widgets (like alerts or notifications).'
1969 }, {
1970 id: 'warningBackground',
1971 defaults: {
1972 dark: 'editorWarning.foreground',
1973 light: 'editorWarning.foreground',
1974 hcDark: 'editorWarning.border'
1975 }, description: 'Background color of warning widgets (like alerts or notifications).'
1976 }, {
1977 id: 'warningForeground',
1978 defaults: {
1979 dark: 'inputValidation.warningBackground',
1980 light: 'inputValidation.warningBackground',
1981 hcDark: 'inputValidation.warningBackground'
1982 }, description: 'Foreground color of warning widgets (like alerts or notifications).'
1983 },
1984 // Statusbar
1985 {
1986 id: 'statusBar.offlineBackground',
1987 defaults: {
1988 dark: 'editorWarning.foreground',
1989 light: 'editorWarning.foreground',
1990 hcDark: 'editorWarning.foreground',
1991 hcLight: 'editorWarning.foreground'
1992 }, description: 'Background of hovered statusbar item in case the theia server is offline.'
1993 }, {
1994 id: 'statusBar.offlineForeground',
1995 defaults: {
1996 dark: 'editor.background',
1997 light: 'editor.background',
1998 hcDark: 'editor.background',
1999 hcLight: 'editor.background'
2000 }, description: 'Background of hovered statusbar item in case the theia server is offline.'
2001 }, {
2002 id: 'statusBarItem.offlineHoverBackground',
2003 defaults: {
2004 dark: color_1.Color.lighten('statusBar.offlineBackground', 0.4),
2005 light: color_1.Color.lighten('statusBar.offlineBackground', 0.4),
2006 hcDark: color_1.Color.lighten('statusBar.offlineBackground', 0.4),
2007 hcLight: color_1.Color.lighten('statusBar.offlineBackground', 0.4)
2008 }, description: 'Background of hovered statusbar item in case the theia server is offline.'
2009 }, {
2010 id: 'statusBarItem.offlineActiveBackground',
2011 defaults: {
2012 dark: color_1.Color.lighten('statusBar.offlineBackground', 0.6),
2013 light: color_1.Color.lighten('statusBar.offlineBackground', 0.6),
2014 hcDark: color_1.Color.lighten('statusBar.offlineBackground', 0.6),
2015 hcLight: color_1.Color.lighten('statusBar.offlineBackground', 0.6)
2016 }, description: 'Background of active statusbar item in case the theia server is offline.'
2017 }, {
2018 id: 'statusBarItem.remoteBackground',
2019 defaults: {
2020 dark: 'activityBarBadge.background',
2021 light: 'activityBarBadge.background',
2022 hcDark: 'activityBarBadge.background',
2023 hcLight: 'activityBarBadge.background'
2024 }, description: 'Background color for the remote indicator on the status bar.'
2025 }, {
2026 id: 'statusBarItem.remoteForeground',
2027 defaults: {
2028 dark: 'activityBarBadge.foreground',
2029 light: 'activityBarBadge.foreground',
2030 hcDark: 'activityBarBadge.foreground',
2031 hcLight: 'activityBarBadge.foreground'
2032 }, description: 'Foreground color for the remote indicator on the status bar.'
2033 },
2034 // Buttons
2035 {
2036 id: 'secondaryButton.foreground',
2037 defaults: {
2038 dark: 'dropdown.foreground',
2039 light: 'dropdown.foreground',
2040 hcDark: 'dropdown.foreground',
2041 hcLight: 'dropdown.foreground'
2042 }, description: 'Foreground color of secondary buttons.'
2043 }, {
2044 id: 'secondaryButton.disabledForeground',
2045 defaults: {
2046 dark: color_1.Color.transparent('secondaryButton.foreground', 0.5),
2047 light: color_1.Color.transparent('secondaryButton.foreground', 0.5),
2048 hcDark: color_1.Color.transparent('secondaryButton.foreground', 0.5),
2049 hcLight: color_1.Color.transparent('secondaryButton.foreground', 0.5),
2050 }, description: 'Foreground color of secondary buttons.'
2051 }, {
2052 id: 'secondaryButton.background',
2053 defaults: {
2054 dark: color_1.Color.lighten('dropdown.background', 0.5),
2055 light: color_1.Color.lighten('dropdown.background', 0.5)
2056 }, description: 'Background color of secondary buttons.'
2057 }, {
2058 id: 'secondaryButton.hoverBackground',
2059 defaults: {
2060 dark: color_1.Color.lighten('secondaryButton.background', 0.2),
2061 light: color_1.Color.lighten('secondaryButton.background', 0.2)
2062 }, description: 'Background color when hovering secondary buttons.'
2063 }, {
2064 id: 'secondaryButton.disabledBackground',
2065 defaults: {
2066 dark: color_1.Color.transparent('secondaryButton.background', 0.6),
2067 light: color_1.Color.transparent('secondaryButton.background', 0.6)
2068 }, description: 'Background color when hovering secondary buttons.'
2069 }, {
2070 id: 'button.disabledForeground',
2071 defaults: {
2072 dark: color_1.Color.transparent('button.foreground', 0.5),
2073 light: color_1.Color.transparent('button.foreground', 0.5),
2074 hcDark: color_1.Color.transparent('button.foreground', 0.5)
2075 }, description: 'Foreground color of secondary buttons.'
2076 }, {
2077 id: 'button.disabledBackground',
2078 defaults: {
2079 dark: color_1.Color.transparent('button.background', 0.5),
2080 light: color_1.Color.transparent('button.background', 0.5)
2081 }, description: 'Background color of secondary buttons.'
2082 }, {
2083 id: 'editorGutter.commentRangeForeground',
2084 defaults: {
2085 dark: '#c5c5c5',
2086 light: '#c5c5c5',
2087 hcDark: color_1.Color.white,
2088 hcLight: color_1.Color.white
2089 }, description: 'Editor gutter decoration color for commenting ranges.'
2090 }, {
2091 id: 'breadcrumb.foreground',
2092 defaults: {
2093 dark: color_1.Color.transparent('foreground', 0.8),
2094 light: color_1.Color.transparent('foreground', 0.8),
2095 hcDark: color_1.Color.transparent('foreground', 0.8),
2096 hcLight: color_1.Color.transparent('foreground', 0.8)
2097 },
2098 description: 'Color of breadcrumb item text'
2099 }, {
2100 id: 'breadcrumb.background',
2101 defaults: {
2102 dark: 'editor.background',
2103 light: 'editor.background',
2104 hcDark: 'editor.background',
2105 hcLight: 'editor.background'
2106 },
2107 description: 'Color of breadcrumb item background'
2108 }, {
2109 id: 'breadcrumb.focusForeground',
2110 defaults: {
2111 dark: color_1.Color.lighten('foreground', 0.1),
2112 light: color_1.Color.darken('foreground', 0.2),
2113 hcDark: color_1.Color.lighten('foreground', 0.1),
2114 hcLight: color_1.Color.lighten('foreground', 0.1)
2115 },
2116 description: 'Color of breadcrumb item text when focused'
2117 }, {
2118 id: 'breadcrumb.activeSelectionForeground',
2119 defaults: {
2120 dark: color_1.Color.lighten('foreground', 0.1),
2121 light: color_1.Color.darken('foreground', 0.2),
2122 hcDark: color_1.Color.lighten('foreground', 0.1),
2123 hcLight: color_1.Color.lighten('foreground', 0.1)
2124 },
2125 description: 'Color of selected breadcrumb item'
2126 }, {
2127 id: 'breadcrumbPicker.background',
2128 defaults: {
2129 dark: 'editorWidget.background',
2130 light: 'editorWidget.background',
2131 hcDark: 'editorWidget.background',
2132 hcLight: 'editorWidget.background'
2133 },
2134 description: 'Background color of breadcrumb item picker'
2135 }, {
2136 id: 'mainToolbar.background',
2137 defaults: {
2138 dark: color_1.Color.lighten('activityBar.background', 0.1),
2139 light: color_1.Color.darken('activityBar.background', 0.1),
2140 hcDark: color_1.Color.lighten('activityBar.background', 0.1),
2141 hcLight: color_1.Color.lighten('activityBar.background', 0.1)
2142 },
2143 description: 'Background color of shell\'s global toolbar'
2144 }, {
2145 id: 'mainToolbar.foreground', defaults: {
2146 dark: color_1.Color.darken('activityBar.foreground', 0.1),
2147 light: color_1.Color.lighten('activityBar.foreground', 0.1),
2148 hcDark: color_1.Color.lighten('activityBar.foreground', 0.1),
2149 hcLight: color_1.Color.lighten('activityBar.foreground', 0.1),
2150 }, description: 'Foreground color of active toolbar item',
2151 }, {
2152 id: 'editorHoverWidgetInternalBorder',
2153 defaults: {
2154 dark: color_1.Color.transparent('editorHoverWidget.border', 0.5),
2155 light: color_1.Color.transparent('editorHoverWidget.border', 0.5),
2156 hcDark: color_1.Color.transparent('editorHoverWidget.border', 0.5),
2157 hcLight: color_1.Color.transparent('editorHoverWidget.border', 0.5)
2158 },
2159 description: 'The border between subelements of a hover widget'
2160 });
2161 }
2162};
2163__decorate([
2164 (0, inversify_1.inject)(context_key_service_1.ContextKeyService),
2165 __metadata("design:type", Object)
2166], CommonFrontendContribution.prototype, "contextKeyService", void 0);
2167__decorate([
2168 (0, inversify_1.inject)(resource_context_key_1.ResourceContextKey),
2169 __metadata("design:type", resource_context_key_1.ResourceContextKey)
2170], CommonFrontendContribution.prototype, "resourceContextKey", void 0);
2171__decorate([
2172 (0, inversify_1.inject)(command_1.CommandRegistry),
2173 __metadata("design:type", command_1.CommandRegistry)
2174], CommonFrontendContribution.prototype, "commandRegistry", void 0);
2175__decorate([
2176 (0, inversify_1.inject)(menu_1.MenuModelRegistry),
2177 __metadata("design:type", menu_1.MenuModelRegistry)
2178], CommonFrontendContribution.prototype, "menuRegistry", void 0);
2179__decorate([
2180 (0, inversify_1.inject)(storage_service_1.StorageService),
2181 __metadata("design:type", Object)
2182], CommonFrontendContribution.prototype, "storageService", void 0);
2183__decorate([
2184 (0, inversify_1.inject)(quick_input_1.QuickInputService),
2185 (0, inversify_1.optional)(),
2186 __metadata("design:type", Object)
2187], CommonFrontendContribution.prototype, "quickInputService", void 0);
2188__decorate([
2189 (0, inversify_1.inject)(icon_theme_service_1.IconThemeService),
2190 __metadata("design:type", icon_theme_service_1.IconThemeService)
2191], CommonFrontendContribution.prototype, "iconThemes", void 0);
2192__decorate([
2193 (0, inversify_1.inject)(theming_1.ThemeService),
2194 __metadata("design:type", theming_1.ThemeService)
2195], CommonFrontendContribution.prototype, "themeService", void 0);
2196__decorate([
2197 (0, inversify_1.inject)(core_preferences_1.CorePreferences),
2198 __metadata("design:type", Object)
2199], CommonFrontendContribution.prototype, "preferences", void 0);
2200__decorate([
2201 (0, inversify_1.inject)(preferences_1.PreferenceService),
2202 __metadata("design:type", Object)
2203], CommonFrontendContribution.prototype, "preferenceService", void 0);
2204__decorate([
2205 (0, inversify_1.inject)(clipboard_service_1.ClipboardService),
2206 __metadata("design:type", Object)
2207], CommonFrontendContribution.prototype, "clipboardService", void 0);
2208__decorate([
2209 (0, inversify_1.inject)(encoding_registry_1.EncodingRegistry),
2210 __metadata("design:type", encoding_registry_1.EncodingRegistry)
2211], CommonFrontendContribution.prototype, "encodingRegistry", void 0);
2212__decorate([
2213 (0, inversify_1.inject)(env_variables_1.EnvVariablesServer),
2214 __metadata("design:type", Object)
2215], CommonFrontendContribution.prototype, "environments", void 0);
2216__decorate([
2217 (0, inversify_1.inject)(authentication_service_1.AuthenticationService),
2218 __metadata("design:type", Object)
2219], CommonFrontendContribution.prototype, "authenticationService", void 0);
2220__decorate([
2221 (0, inversify_1.inject)(window_service_1.WindowService),
2222 __metadata("design:type", Object)
2223], CommonFrontendContribution.prototype, "windowService", void 0);
2224__decorate([
2225 (0, inversify_1.inject)(user_working_directory_provider_1.UserWorkingDirectoryProvider),
2226 __metadata("design:type", user_working_directory_provider_1.UserWorkingDirectoryProvider)
2227], CommonFrontendContribution.prototype, "workingDirProvider", void 0);
2228__decorate([
2229 (0, inversify_1.inject)(language_quick_pick_service_1.LanguageQuickPickService),
2230 __metadata("design:type", language_quick_pick_service_1.LanguageQuickPickService)
2231], CommonFrontendContribution.prototype, "languageQuickPickService", void 0);
2232__decorate([
2233 (0, inversify_1.inject)(common_1.UntitledResourceResolver),
2234 __metadata("design:type", common_1.UntitledResourceResolver)
2235], CommonFrontendContribution.prototype, "untitledResourceResolver", void 0);
2236CommonFrontendContribution = __decorate([
2237 (0, inversify_1.injectable)(),
2238 __param(0, (0, inversify_1.inject)(application_shell_1.ApplicationShell)),
2239 __param(1, (0, inversify_1.inject)(selection_service_1.SelectionService)),
2240 __param(2, (0, inversify_1.inject)(message_service_1.MessageService)),
2241 __param(3, (0, inversify_1.inject)(opener_service_1.OpenerService)),
2242 __param(4, (0, inversify_1.inject)(about_dialog_1.AboutDialog)),
2243 __param(5, (0, inversify_1.inject)(localization_1.AsyncLocalizationProvider)),
2244 __param(6, (0, inversify_1.inject)(save_resource_service_1.SaveResourceService)),
2245 __metadata("design:paramtypes", [application_shell_1.ApplicationShell,
2246 selection_service_1.SelectionService,
2247 message_service_1.MessageService, Object, about_dialog_1.AboutDialog, Object, save_resource_service_1.SaveResourceService])
2248], CommonFrontendContribution);
2249exports.CommonFrontendContribution = CommonFrontendContribution;
2250//# sourceMappingURL=common-frontend-contribution.js.map
\No newline at end of file