@theia/core 1.66.2 → 1.67.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/lib/browser/badges/badge-service.d.ts +14 -0
- package/lib/browser/badges/badge-service.d.ts.map +1 -0
- package/lib/browser/badges/badge-service.js +45 -0
- package/lib/browser/badges/badge-service.js.map +1 -0
- package/lib/browser/badges/index.d.ts +3 -0
- package/lib/browser/badges/index.d.ts.map +1 -0
- package/lib/browser/badges/index.js +21 -0
- package/lib/browser/badges/index.js.map +1 -0
- package/lib/browser/badges/tabbar-badge-decorator.d.ts +14 -0
- package/lib/browser/badges/tabbar-badge-decorator.d.ts.map +1 -0
- package/lib/browser/badges/tabbar-badge-decorator.js +68 -0
- package/lib/browser/badges/tabbar-badge-decorator.js.map +1 -0
- package/lib/browser/catalog.json +38 -41
- package/lib/browser/common-commands.d.ts +66 -0
- package/lib/browser/common-commands.d.ts.map +1 -0
- package/lib/browser/common-commands.js +271 -0
- package/lib/browser/common-commands.js.map +1 -0
- package/lib/browser/common-frontend-contribution.d.ts +5 -99
- package/lib/browser/common-frontend-contribution.d.ts.map +1 -1
- package/lib/browser/common-frontend-contribution.js +157 -439
- package/lib/browser/common-frontend-contribution.js.map +1 -1
- package/lib/browser/common-menus.d.ts +35 -0
- package/lib/browser/common-menus.d.ts.map +1 -0
- package/lib/browser/common-menus.js +56 -0
- package/lib/browser/common-menus.js.map +1 -0
- package/lib/browser/frontend-application-module.d.ts.map +1 -1
- package/lib/browser/frontend-application-module.js +2 -0
- package/lib/browser/frontend-application-module.js.map +1 -1
- package/lib/browser/index.d.ts +3 -0
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +3 -0
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/quick-input/quick-command-frontend-contribution.js +3 -3
- package/lib/browser/quick-input/quick-command-frontend-contribution.js.map +1 -1
- package/lib/browser/shell/shell-layout-restorer.js +3 -3
- package/lib/browser/shell/shell-layout-restorer.js.map +1 -1
- package/lib/browser/shell/tab-bars.d.ts +1 -1
- package/lib/browser/shell/tab-bars.d.ts.map +1 -1
- package/lib/browser/shell/tab-bars.js +52 -49
- package/lib/browser/shell/tab-bars.js.map +1 -1
- package/lib/browser/shell/view-contribution.js +2 -2
- package/lib/browser/shell/view-contribution.js.map +1 -1
- package/lib/browser/window-contribution.js +2 -2
- package/lib/browser/window-contribution.js.map +1 -1
- package/lib/common/preferences/preference-service.d.ts.map +1 -1
- package/lib/common/preferences/preference-service.js +6 -1
- package/lib/common/preferences/preference-service.js.map +1 -1
- package/package.json +6 -6
- package/src/browser/badges/badge-service.ts +44 -0
- package/src/browser/badges/index.ts +18 -0
- package/src/browser/badges/tabbar-badge-decorator.ts +63 -0
- package/src/browser/common-commands.ts +281 -0
- package/src/browser/common-frontend-contribution.ts +4 -306
- package/src/browser/common-menus.ts +60 -0
- package/src/browser/frontend-application-module.ts +2 -0
- package/src/browser/index.ts +3 -0
- package/src/browser/quick-input/quick-command-frontend-contribution.ts +1 -1
- package/src/browser/shell/shell-layout-restorer.ts +1 -1
- package/src/browser/shell/tab-bars.ts +24 -26
- package/src/browser/shell/view-contribution.ts +1 -1
- package/src/browser/window-contribution.ts +1 -1
- package/src/common/preferences/preference-service.ts +6 -1
|
@@ -21,7 +21,11 @@ const tslib_1 = require("tslib");
|
|
|
21
21
|
const debounce = require("lodash.debounce");
|
|
22
22
|
const inversify_1 = require("inversify");
|
|
23
23
|
const menu_1 = require("../common/menu");
|
|
24
|
+
const common_menus_1 = require("./common-menus");
|
|
25
|
+
Object.defineProperty(exports, "CommonMenus", { enumerable: true, get: function () { return common_menus_1.CommonMenus; } });
|
|
24
26
|
const command_1 = require("../common/command");
|
|
27
|
+
const common_commands_1 = require("./common-commands");
|
|
28
|
+
Object.defineProperty(exports, "CommonCommands", { enumerable: true, get: function () { return common_commands_1.CommonCommands; } });
|
|
25
29
|
const uri_command_handler_1 = require("../common/uri-command-handler");
|
|
26
30
|
const selection_service_1 = require("../common/selection-service");
|
|
27
31
|
const message_service_1 = require("../common/message-service");
|
|
@@ -64,292 +68,6 @@ const common_1 = require("../common");
|
|
|
64
68
|
const language_quick_pick_service_1 = require("./i18n/language-quick-pick-service");
|
|
65
69
|
const undo_redo_handler_1 = require("./undo-redo-handler");
|
|
66
70
|
const promise_util_1 = require("../common/promise-util");
|
|
67
|
-
var CommonMenus;
|
|
68
|
-
(function (CommonMenus) {
|
|
69
|
-
CommonMenus.FILE = [...menu_1.MAIN_MENU_BAR, '1_file'];
|
|
70
|
-
CommonMenus.FILE_NEW_TEXT = [...CommonMenus.FILE, '1_new_text'];
|
|
71
|
-
CommonMenus.FILE_NEW = [...CommonMenus.FILE, '1_new'];
|
|
72
|
-
CommonMenus.FILE_OPEN = [...CommonMenus.FILE, '2_open'];
|
|
73
|
-
CommonMenus.FILE_SAVE = [...CommonMenus.FILE, '3_save'];
|
|
74
|
-
CommonMenus.FILE_AUTOSAVE = [...CommonMenus.FILE, '4_autosave'];
|
|
75
|
-
CommonMenus.FILE_SETTINGS = [...CommonMenus.FILE, '5_settings'];
|
|
76
|
-
CommonMenus.FILE_SETTINGS_SUBMENU = [...CommonMenus.FILE_SETTINGS, '1_settings_submenu'];
|
|
77
|
-
CommonMenus.FILE_SETTINGS_SUBMENU_OPEN = [...CommonMenus.FILE_SETTINGS_SUBMENU, '1_settings_submenu_open'];
|
|
78
|
-
CommonMenus.FILE_SETTINGS_SUBMENU_THEME = [...CommonMenus.FILE_SETTINGS_SUBMENU, '2_settings_submenu_theme'];
|
|
79
|
-
CommonMenus.FILE_CLOSE = [...CommonMenus.FILE, '6_close'];
|
|
80
|
-
CommonMenus.FILE_NEW_CONTRIBUTIONS = ['file', 'newFile'];
|
|
81
|
-
CommonMenus.EDIT = [...menu_1.MAIN_MENU_BAR, '2_edit'];
|
|
82
|
-
CommonMenus.EDIT_UNDO = [...CommonMenus.EDIT, '1_undo'];
|
|
83
|
-
CommonMenus.EDIT_CLIPBOARD = [...CommonMenus.EDIT, '2_clipboard'];
|
|
84
|
-
CommonMenus.EDIT_FIND = [...CommonMenus.EDIT, '3_find'];
|
|
85
|
-
CommonMenus.VIEW = [...menu_1.MAIN_MENU_BAR, '4_view'];
|
|
86
|
-
CommonMenus.VIEW_PRIMARY = [...CommonMenus.VIEW, '0_primary'];
|
|
87
|
-
CommonMenus.VIEW_APPEARANCE = [...CommonMenus.VIEW, '1_appearance'];
|
|
88
|
-
CommonMenus.VIEW_APPEARANCE_SUBMENU = [...CommonMenus.VIEW_APPEARANCE, '1_appearance_submenu'];
|
|
89
|
-
CommonMenus.VIEW_APPEARANCE_SUBMENU_SCREEN = [...CommonMenus.VIEW_APPEARANCE_SUBMENU, '2_appearance_submenu_screen'];
|
|
90
|
-
CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR = [...CommonMenus.VIEW_APPEARANCE_SUBMENU, '3_appearance_submenu_bar'];
|
|
91
|
-
CommonMenus.VIEW_EDITOR_SUBMENU = [...CommonMenus.VIEW_APPEARANCE, '2_editor_submenu'];
|
|
92
|
-
CommonMenus.VIEW_EDITOR_SUBMENU_SPLIT = [...CommonMenus.VIEW_EDITOR_SUBMENU, '1_editor_submenu_split'];
|
|
93
|
-
CommonMenus.VIEW_EDITOR_SUBMENU_ORTHO = [...CommonMenus.VIEW_EDITOR_SUBMENU, '2_editor_submenu_ortho'];
|
|
94
|
-
CommonMenus.VIEW_VIEWS = [...CommonMenus.VIEW, '2_views'];
|
|
95
|
-
CommonMenus.VIEW_LAYOUT = [...CommonMenus.VIEW, '3_layout'];
|
|
96
|
-
CommonMenus.VIEW_TOGGLE = [...CommonMenus.VIEW, '4_toggle'];
|
|
97
|
-
CommonMenus.MANAGE_GENERAL = [...menu_1.MANAGE_MENU, '1_manage_general'];
|
|
98
|
-
CommonMenus.MANAGE_SETTINGS = [...menu_1.MANAGE_MENU, '2_manage_settings'];
|
|
99
|
-
CommonMenus.MANAGE_SETTINGS_THEMES = [...CommonMenus.MANAGE_SETTINGS, '1_manage_settings_themes'];
|
|
100
|
-
// last menu item
|
|
101
|
-
CommonMenus.HELP = [...menu_1.MAIN_MENU_BAR, '9_help'];
|
|
102
|
-
})(CommonMenus || (exports.CommonMenus = CommonMenus = {}));
|
|
103
|
-
var CommonCommands;
|
|
104
|
-
(function (CommonCommands) {
|
|
105
|
-
CommonCommands.FILE_CATEGORY = 'File';
|
|
106
|
-
CommonCommands.VIEW_CATEGORY = 'View';
|
|
107
|
-
CommonCommands.CREATE_CATEGORY = 'Create';
|
|
108
|
-
CommonCommands.PREFERENCES_CATEGORY = 'Preferences';
|
|
109
|
-
CommonCommands.MANAGE_CATEGORY = 'Manage';
|
|
110
|
-
CommonCommands.FILE_CATEGORY_KEY = nls_1.nls.getDefaultKey(CommonCommands.FILE_CATEGORY);
|
|
111
|
-
CommonCommands.VIEW_CATEGORY_KEY = nls_1.nls.getDefaultKey(CommonCommands.VIEW_CATEGORY);
|
|
112
|
-
CommonCommands.PREFERENCES_CATEGORY_KEY = nls_1.nls.getDefaultKey(CommonCommands.PREFERENCES_CATEGORY);
|
|
113
|
-
CommonCommands.OPEN = {
|
|
114
|
-
id: 'core.open',
|
|
115
|
-
};
|
|
116
|
-
CommonCommands.CUT = command_1.Command.toDefaultLocalizedCommand({
|
|
117
|
-
id: 'core.cut',
|
|
118
|
-
label: 'Cut'
|
|
119
|
-
});
|
|
120
|
-
CommonCommands.COPY = command_1.Command.toDefaultLocalizedCommand({
|
|
121
|
-
id: 'core.copy',
|
|
122
|
-
label: 'Copy'
|
|
123
|
-
});
|
|
124
|
-
CommonCommands.PASTE = command_1.Command.toDefaultLocalizedCommand({
|
|
125
|
-
id: 'core.paste',
|
|
126
|
-
label: 'Paste'
|
|
127
|
-
});
|
|
128
|
-
CommonCommands.COPY_PATH = command_1.Command.toDefaultLocalizedCommand({
|
|
129
|
-
id: 'core.copy.path',
|
|
130
|
-
label: 'Copy Path'
|
|
131
|
-
});
|
|
132
|
-
CommonCommands.UNDO = command_1.Command.toDefaultLocalizedCommand({
|
|
133
|
-
id: 'core.undo',
|
|
134
|
-
label: 'Undo'
|
|
135
|
-
});
|
|
136
|
-
CommonCommands.REDO = command_1.Command.toDefaultLocalizedCommand({
|
|
137
|
-
id: 'core.redo',
|
|
138
|
-
label: 'Redo'
|
|
139
|
-
});
|
|
140
|
-
CommonCommands.SELECT_ALL = command_1.Command.toDefaultLocalizedCommand({
|
|
141
|
-
id: 'core.selectAll',
|
|
142
|
-
label: 'Select All'
|
|
143
|
-
});
|
|
144
|
-
CommonCommands.FIND = command_1.Command.toDefaultLocalizedCommand({
|
|
145
|
-
id: 'core.find',
|
|
146
|
-
label: 'Find'
|
|
147
|
-
});
|
|
148
|
-
CommonCommands.REPLACE = command_1.Command.toDefaultLocalizedCommand({
|
|
149
|
-
id: 'core.replace',
|
|
150
|
-
label: 'Replace'
|
|
151
|
-
});
|
|
152
|
-
CommonCommands.NEXT_TAB = command_1.Command.toDefaultLocalizedCommand({
|
|
153
|
-
id: 'core.nextTab',
|
|
154
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
155
|
-
label: 'Show Next Tab'
|
|
156
|
-
});
|
|
157
|
-
CommonCommands.PREVIOUS_TAB = command_1.Command.toDefaultLocalizedCommand({
|
|
158
|
-
id: 'core.previousTab',
|
|
159
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
160
|
-
label: 'Show Previous Tab'
|
|
161
|
-
});
|
|
162
|
-
CommonCommands.NEXT_TAB_IN_GROUP = command_1.Command.toLocalizedCommand({
|
|
163
|
-
id: 'core.nextTabInGroup',
|
|
164
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
165
|
-
label: 'Switch to Next Tab in Group'
|
|
166
|
-
}, 'theia/core/common/showNextTabInGroup', CommonCommands.VIEW_CATEGORY_KEY);
|
|
167
|
-
CommonCommands.PREVIOUS_TAB_IN_GROUP = command_1.Command.toLocalizedCommand({
|
|
168
|
-
id: 'core.previousTabInGroup',
|
|
169
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
170
|
-
label: 'Switch to Previous Tab in Group'
|
|
171
|
-
}, 'theia/core/common/showPreviousTabInGroup', CommonCommands.VIEW_CATEGORY_KEY);
|
|
172
|
-
CommonCommands.NEXT_TAB_GROUP = command_1.Command.toLocalizedCommand({
|
|
173
|
-
id: 'core.nextTabGroup',
|
|
174
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
175
|
-
label: 'Switch to Next Tab Group'
|
|
176
|
-
}, 'theia/core/common/showNextTabGroup', CommonCommands.VIEW_CATEGORY_KEY);
|
|
177
|
-
CommonCommands.PREVIOUS_TAB_GROUP = command_1.Command.toLocalizedCommand({
|
|
178
|
-
id: 'core.previousTabBar',
|
|
179
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
180
|
-
label: 'Switch to Previous Tab Group'
|
|
181
|
-
}, 'theia/core/common/showPreviousTabGroup', CommonCommands.VIEW_CATEGORY_KEY);
|
|
182
|
-
CommonCommands.CLOSE_TAB = command_1.Command.toLocalizedCommand({
|
|
183
|
-
id: 'core.close.tab',
|
|
184
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
185
|
-
label: 'Close Tab'
|
|
186
|
-
}, 'theia/core/common/closeTab', CommonCommands.VIEW_CATEGORY_KEY);
|
|
187
|
-
CommonCommands.CLOSE_OTHER_TABS = command_1.Command.toLocalizedCommand({
|
|
188
|
-
id: 'core.close.other.tabs',
|
|
189
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
190
|
-
label: 'Close Other Tabs'
|
|
191
|
-
}, 'theia/core/common/closeOthers', CommonCommands.VIEW_CATEGORY_KEY);
|
|
192
|
-
CommonCommands.CLOSE_SAVED_TABS = command_1.Command.toDefaultLocalizedCommand({
|
|
193
|
-
id: 'workbench.action.closeUnmodifiedEditors',
|
|
194
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
195
|
-
label: 'Close Saved Editors in Group',
|
|
196
|
-
});
|
|
197
|
-
CommonCommands.CLOSE_RIGHT_TABS = command_1.Command.toLocalizedCommand({
|
|
198
|
-
id: 'core.close.right.tabs',
|
|
199
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
200
|
-
label: 'Close Tabs to the Right'
|
|
201
|
-
}, 'theia/core/common/closeRight', CommonCommands.VIEW_CATEGORY_KEY);
|
|
202
|
-
CommonCommands.CLOSE_ALL_TABS = command_1.Command.toLocalizedCommand({
|
|
203
|
-
id: 'core.close.all.tabs',
|
|
204
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
205
|
-
label: 'Close All Tabs'
|
|
206
|
-
}, 'theia/core/common/closeAll', CommonCommands.VIEW_CATEGORY_KEY);
|
|
207
|
-
CommonCommands.CLOSE_MAIN_TAB = command_1.Command.toLocalizedCommand({
|
|
208
|
-
id: 'core.close.main.tab',
|
|
209
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
210
|
-
label: 'Close Tab in Main Area'
|
|
211
|
-
}, 'theia/core/common/closeTabMain', CommonCommands.VIEW_CATEGORY_KEY);
|
|
212
|
-
CommonCommands.CLOSE_OTHER_MAIN_TABS = command_1.Command.toLocalizedCommand({
|
|
213
|
-
id: 'core.close.other.main.tabs',
|
|
214
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
215
|
-
label: 'Close Other Tabs in Main Area'
|
|
216
|
-
}, 'theia/core/common/closeOtherTabMain', CommonCommands.VIEW_CATEGORY_KEY);
|
|
217
|
-
CommonCommands.CLOSE_ALL_MAIN_TABS = command_1.Command.toLocalizedCommand({
|
|
218
|
-
id: 'core.close.all.main.tabs',
|
|
219
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
220
|
-
label: 'Close All Tabs in Main Area'
|
|
221
|
-
}, 'theia/core/common/closeAllTabMain', CommonCommands.VIEW_CATEGORY_KEY);
|
|
222
|
-
CommonCommands.COLLAPSE_PANEL = command_1.Command.toLocalizedCommand({
|
|
223
|
-
id: 'core.collapse.tab',
|
|
224
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
225
|
-
label: 'Collapse Side Panel'
|
|
226
|
-
}, 'theia/core/common/collapseTab', CommonCommands.VIEW_CATEGORY_KEY);
|
|
227
|
-
CommonCommands.COLLAPSE_ALL_PANELS = command_1.Command.toLocalizedCommand({
|
|
228
|
-
id: 'core.collapse.all.tabs',
|
|
229
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
230
|
-
label: 'Collapse All Side Panels'
|
|
231
|
-
}, 'theia/core/common/collapseAllTabs', CommonCommands.VIEW_CATEGORY_KEY);
|
|
232
|
-
CommonCommands.TOGGLE_BOTTOM_PANEL = command_1.Command.toLocalizedCommand({
|
|
233
|
-
id: 'core.toggle.bottom.panel',
|
|
234
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
235
|
-
label: 'Toggle Bottom Panel'
|
|
236
|
-
}, 'theia/core/common/collapseBottomPanel', CommonCommands.VIEW_CATEGORY_KEY);
|
|
237
|
-
CommonCommands.TOGGLE_LEFT_PANEL = command_1.Command.toLocalizedCommand({
|
|
238
|
-
id: 'core.toggle.left.panel',
|
|
239
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
240
|
-
label: 'Toggle Left Panel'
|
|
241
|
-
}, 'theia/core/common/collapseLeftPanel', CommonCommands.VIEW_CATEGORY_KEY);
|
|
242
|
-
CommonCommands.TOGGLE_RIGHT_PANEL = command_1.Command.toLocalizedCommand({
|
|
243
|
-
id: 'core.toggle.right.panel',
|
|
244
|
-
category: CommonCommands.VIEW_CATEGORY,
|
|
245
|
-
label: 'Toggle Right Panel'
|
|
246
|
-
}, 'theia/core/common/collapseRightPanel', 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
|
-
/**
|
|
278
|
-
* Command Parameters:
|
|
279
|
-
* - `fileName`: string
|
|
280
|
-
* - `directory`: URI
|
|
281
|
-
*/
|
|
282
|
-
CommonCommands.NEW_FILE = command_1.Command.toDefaultLocalizedCommand({
|
|
283
|
-
id: 'workbench.action.files.newFile',
|
|
284
|
-
category: CommonCommands.FILE_CATEGORY
|
|
285
|
-
});
|
|
286
|
-
// This command immediately opens a new untitled text file
|
|
287
|
-
// Some VS Code extensions use this command to create new files
|
|
288
|
-
CommonCommands.NEW_UNTITLED_TEXT_FILE = command_1.Command.toDefaultLocalizedCommand({
|
|
289
|
-
id: 'workbench.action.files.newUntitledFile',
|
|
290
|
-
category: CommonCommands.FILE_CATEGORY,
|
|
291
|
-
label: 'New Untitled Text File'
|
|
292
|
-
});
|
|
293
|
-
// This command opens a quick pick to select a file type to create
|
|
294
|
-
CommonCommands.PICK_NEW_FILE = command_1.Command.toDefaultLocalizedCommand({
|
|
295
|
-
id: 'workbench.action.files.pickNewFile',
|
|
296
|
-
category: CommonCommands.CREATE_CATEGORY,
|
|
297
|
-
label: 'New File...'
|
|
298
|
-
});
|
|
299
|
-
CommonCommands.SAVE = command_1.Command.toDefaultLocalizedCommand({
|
|
300
|
-
id: 'core.save',
|
|
301
|
-
category: CommonCommands.FILE_CATEGORY,
|
|
302
|
-
label: 'Save',
|
|
303
|
-
});
|
|
304
|
-
CommonCommands.SAVE_AS = command_1.Command.toDefaultLocalizedCommand({
|
|
305
|
-
id: 'file.saveAs',
|
|
306
|
-
category: CommonCommands.FILE_CATEGORY,
|
|
307
|
-
label: 'Save As...',
|
|
308
|
-
});
|
|
309
|
-
CommonCommands.SAVE_WITHOUT_FORMATTING = command_1.Command.toDefaultLocalizedCommand({
|
|
310
|
-
id: 'core.saveWithoutFormatting',
|
|
311
|
-
category: CommonCommands.FILE_CATEGORY,
|
|
312
|
-
label: 'Save without Formatting',
|
|
313
|
-
});
|
|
314
|
-
CommonCommands.SAVE_ALL = command_1.Command.toDefaultLocalizedCommand({
|
|
315
|
-
id: 'core.saveAll',
|
|
316
|
-
category: CommonCommands.FILE_CATEGORY,
|
|
317
|
-
label: 'Save All',
|
|
318
|
-
});
|
|
319
|
-
CommonCommands.AUTO_SAVE = command_1.Command.toDefaultLocalizedCommand({
|
|
320
|
-
id: 'textEditor.commands.autosave',
|
|
321
|
-
category: CommonCommands.FILE_CATEGORY,
|
|
322
|
-
label: 'Auto Save',
|
|
323
|
-
});
|
|
324
|
-
CommonCommands.ABOUT_COMMAND = command_1.Command.toDefaultLocalizedCommand({
|
|
325
|
-
id: 'core.about',
|
|
326
|
-
label: 'About'
|
|
327
|
-
});
|
|
328
|
-
CommonCommands.OPEN_PREFERENCES = command_1.Command.toDefaultLocalizedCommand({
|
|
329
|
-
id: 'preferences:open',
|
|
330
|
-
category: CommonCommands.PREFERENCES_CATEGORY,
|
|
331
|
-
label: 'Open Settings (UI)',
|
|
332
|
-
});
|
|
333
|
-
CommonCommands.SELECT_COLOR_THEME = command_1.Command.toDefaultLocalizedCommand({
|
|
334
|
-
id: 'workbench.action.selectTheme',
|
|
335
|
-
label: 'Color Theme',
|
|
336
|
-
category: CommonCommands.PREFERENCES_CATEGORY
|
|
337
|
-
});
|
|
338
|
-
CommonCommands.SELECT_ICON_THEME = command_1.Command.toDefaultLocalizedCommand({
|
|
339
|
-
id: 'workbench.action.selectIconTheme',
|
|
340
|
-
label: 'File Icon Theme',
|
|
341
|
-
category: CommonCommands.PREFERENCES_CATEGORY
|
|
342
|
-
});
|
|
343
|
-
CommonCommands.CONFIGURE_DISPLAY_LANGUAGE = command_1.Command.toDefaultLocalizedCommand({
|
|
344
|
-
id: 'workbench.action.configureLanguage',
|
|
345
|
-
label: 'Configure Display Language'
|
|
346
|
-
});
|
|
347
|
-
CommonCommands.TOGGLE_BREADCRUMBS = command_1.Command.toDefaultLocalizedCommand({
|
|
348
|
-
id: 'breadcrumbs.toggle',
|
|
349
|
-
label: 'Toggle Breadcrumbs',
|
|
350
|
-
category: CommonCommands.VIEW_CATEGORY
|
|
351
|
-
});
|
|
352
|
-
})(CommonCommands || (exports.CommonCommands = CommonCommands = {}));
|
|
353
71
|
exports.supportCut = environment_1.environment.electron.is() || document.queryCommandSupported('cut');
|
|
354
72
|
exports.supportCopy = environment_1.environment.electron.is() || document.queryCommandSupported('copy');
|
|
355
73
|
// Chrome incorrectly returns true for document.queryCommandSupported('paste')
|
|
@@ -400,7 +118,7 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
400
118
|
app.shell.leftPanelHandler.addBottomMenu({
|
|
401
119
|
id: 'settings-menu',
|
|
402
120
|
iconClass: (0, widgets_1.codicon)('settings-gear'),
|
|
403
|
-
title: nls_1.nls.localizeByDefault(CommonCommands.MANAGE_CATEGORY),
|
|
121
|
+
title: nls_1.nls.localizeByDefault(common_commands_1.CommonCommands.MANAGE_CATEGORY),
|
|
404
122
|
menuPath: menu_1.MANAGE_MENU,
|
|
405
123
|
order: 0,
|
|
406
124
|
});
|
|
@@ -512,167 +230,167 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
512
230
|
this.selectionService.onSelectionChanged(updateContextKeys);
|
|
513
231
|
}
|
|
514
232
|
registerMenus(registry) {
|
|
515
|
-
registry.registerSubmenu(CommonMenus.FILE, nls_1.nls.localizeByDefault('File'));
|
|
516
|
-
registry.registerSubmenu(CommonMenus.EDIT, nls_1.nls.localizeByDefault('Edit'));
|
|
517
|
-
registry.registerSubmenu(CommonMenus.VIEW, nls_1.nls.localizeByDefault('View'));
|
|
518
|
-
registry.registerSubmenu(CommonMenus.HELP, nls_1.nls.localizeByDefault('Help'));
|
|
233
|
+
registry.registerSubmenu(common_menus_1.CommonMenus.FILE, nls_1.nls.localizeByDefault('File'));
|
|
234
|
+
registry.registerSubmenu(common_menus_1.CommonMenus.EDIT, nls_1.nls.localizeByDefault('Edit'));
|
|
235
|
+
registry.registerSubmenu(common_menus_1.CommonMenus.VIEW, nls_1.nls.localizeByDefault('View'));
|
|
236
|
+
registry.registerSubmenu(common_menus_1.CommonMenus.HELP, nls_1.nls.localizeByDefault('Help'));
|
|
519
237
|
// For plugins contributing create new file commands/menu-actions
|
|
520
|
-
registry.registerSubmenu(CommonMenus.FILE_NEW_CONTRIBUTIONS, nls_1.nls.localizeByDefault('New File...'));
|
|
521
|
-
registry.registerMenuAction(CommonMenus.FILE_SAVE, {
|
|
522
|
-
commandId: CommonCommands.SAVE.id
|
|
238
|
+
registry.registerSubmenu(common_menus_1.CommonMenus.FILE_NEW_CONTRIBUTIONS, nls_1.nls.localizeByDefault('New File...'));
|
|
239
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.FILE_SAVE, {
|
|
240
|
+
commandId: common_commands_1.CommonCommands.SAVE.id
|
|
523
241
|
});
|
|
524
|
-
registry.registerMenuAction(CommonMenus.FILE_SAVE, {
|
|
525
|
-
commandId: CommonCommands.SAVE_ALL.id
|
|
242
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.FILE_SAVE, {
|
|
243
|
+
commandId: common_commands_1.CommonCommands.SAVE_ALL.id
|
|
526
244
|
});
|
|
527
|
-
registry.registerMenuAction(CommonMenus.FILE_AUTOSAVE, {
|
|
528
|
-
commandId: CommonCommands.AUTO_SAVE.id
|
|
245
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.FILE_AUTOSAVE, {
|
|
246
|
+
commandId: common_commands_1.CommonCommands.AUTO_SAVE.id
|
|
529
247
|
});
|
|
530
|
-
registry.registerSubmenu(CommonMenus.FILE_SETTINGS_SUBMENU, nls_1.nls.localizeByDefault(CommonCommands.PREFERENCES_CATEGORY));
|
|
531
|
-
registry.registerMenuAction(CommonMenus.EDIT_UNDO, {
|
|
532
|
-
commandId: CommonCommands.UNDO.id,
|
|
248
|
+
registry.registerSubmenu(common_menus_1.CommonMenus.FILE_SETTINGS_SUBMENU, nls_1.nls.localizeByDefault(common_commands_1.CommonCommands.PREFERENCES_CATEGORY));
|
|
249
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.EDIT_UNDO, {
|
|
250
|
+
commandId: common_commands_1.CommonCommands.UNDO.id,
|
|
533
251
|
order: '0'
|
|
534
252
|
});
|
|
535
|
-
registry.registerMenuAction(CommonMenus.EDIT_UNDO, {
|
|
536
|
-
commandId: CommonCommands.REDO.id,
|
|
253
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.EDIT_UNDO, {
|
|
254
|
+
commandId: common_commands_1.CommonCommands.REDO.id,
|
|
537
255
|
order: '1'
|
|
538
256
|
});
|
|
539
|
-
registry.registerMenuAction(CommonMenus.EDIT_FIND, {
|
|
540
|
-
commandId: CommonCommands.FIND.id,
|
|
257
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.EDIT_FIND, {
|
|
258
|
+
commandId: common_commands_1.CommonCommands.FIND.id,
|
|
541
259
|
order: '0'
|
|
542
260
|
});
|
|
543
|
-
registry.registerMenuAction(CommonMenus.EDIT_FIND, {
|
|
544
|
-
commandId: CommonCommands.REPLACE.id,
|
|
261
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.EDIT_FIND, {
|
|
262
|
+
commandId: common_commands_1.CommonCommands.REPLACE.id,
|
|
545
263
|
order: '1'
|
|
546
264
|
});
|
|
547
|
-
registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
|
|
548
|
-
commandId: CommonCommands.CUT.id,
|
|
265
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.EDIT_CLIPBOARD, {
|
|
266
|
+
commandId: common_commands_1.CommonCommands.CUT.id,
|
|
549
267
|
order: '0'
|
|
550
268
|
});
|
|
551
|
-
registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
|
|
552
|
-
commandId: CommonCommands.COPY.id,
|
|
269
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.EDIT_CLIPBOARD, {
|
|
270
|
+
commandId: common_commands_1.CommonCommands.COPY.id,
|
|
553
271
|
order: '1'
|
|
554
272
|
});
|
|
555
|
-
registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
|
|
556
|
-
commandId: CommonCommands.PASTE.id,
|
|
273
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.EDIT_CLIPBOARD, {
|
|
274
|
+
commandId: common_commands_1.CommonCommands.PASTE.id,
|
|
557
275
|
order: '2'
|
|
558
276
|
});
|
|
559
|
-
registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
|
|
560
|
-
commandId: CommonCommands.COPY_PATH.id,
|
|
277
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.EDIT_CLIPBOARD, {
|
|
278
|
+
commandId: common_commands_1.CommonCommands.COPY_PATH.id,
|
|
561
279
|
order: '3'
|
|
562
280
|
});
|
|
563
|
-
registry.registerMenuAction(CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
|
|
564
|
-
commandId: CommonCommands.TOGGLE_BOTTOM_PANEL.id,
|
|
281
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
|
|
282
|
+
commandId: common_commands_1.CommonCommands.TOGGLE_BOTTOM_PANEL.id,
|
|
565
283
|
order: '1'
|
|
566
284
|
});
|
|
567
|
-
registry.registerMenuAction(CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
|
|
568
|
-
commandId: CommonCommands.TOGGLE_STATUS_BAR.id,
|
|
285
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
|
|
286
|
+
commandId: common_commands_1.CommonCommands.TOGGLE_STATUS_BAR.id,
|
|
569
287
|
order: '2',
|
|
570
288
|
label: nls_1.nls.localizeByDefault('Toggle Status Bar Visibility')
|
|
571
289
|
});
|
|
572
|
-
registry.registerMenuAction(CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
|
|
573
|
-
commandId: CommonCommands.COLLAPSE_ALL_PANELS.id,
|
|
290
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
|
|
291
|
+
commandId: common_commands_1.CommonCommands.COLLAPSE_ALL_PANELS.id,
|
|
574
292
|
order: '3'
|
|
575
293
|
});
|
|
576
294
|
registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_CLOSE, {
|
|
577
|
-
commandId: CommonCommands.CLOSE_TAB.id,
|
|
295
|
+
commandId: common_commands_1.CommonCommands.CLOSE_TAB.id,
|
|
578
296
|
label: nls_1.nls.localizeByDefault('Close'),
|
|
579
297
|
order: '0'
|
|
580
298
|
});
|
|
581
299
|
registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_CLOSE, {
|
|
582
|
-
commandId: CommonCommands.CLOSE_OTHER_TABS.id,
|
|
300
|
+
commandId: common_commands_1.CommonCommands.CLOSE_OTHER_TABS.id,
|
|
583
301
|
label: nls_1.nls.localizeByDefault('Close Others'),
|
|
584
302
|
order: '1'
|
|
585
303
|
});
|
|
586
304
|
registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_CLOSE, {
|
|
587
|
-
commandId: CommonCommands.CLOSE_RIGHT_TABS.id,
|
|
305
|
+
commandId: common_commands_1.CommonCommands.CLOSE_RIGHT_TABS.id,
|
|
588
306
|
label: nls_1.nls.localizeByDefault('Close to the Right'),
|
|
589
307
|
order: '2'
|
|
590
308
|
});
|
|
591
309
|
registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_CLOSE, {
|
|
592
|
-
commandId: CommonCommands.CLOSE_SAVED_TABS.id,
|
|
310
|
+
commandId: common_commands_1.CommonCommands.CLOSE_SAVED_TABS.id,
|
|
593
311
|
label: nls_1.nls.localizeByDefault('Close Saved'),
|
|
594
312
|
order: '3',
|
|
595
313
|
});
|
|
596
314
|
registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_CLOSE, {
|
|
597
|
-
commandId: CommonCommands.CLOSE_ALL_TABS.id,
|
|
315
|
+
commandId: common_commands_1.CommonCommands.CLOSE_ALL_TABS.id,
|
|
598
316
|
label: nls_1.nls.localizeByDefault('Close All'),
|
|
599
317
|
order: '4'
|
|
600
318
|
});
|
|
601
319
|
registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_SPLIT, {
|
|
602
|
-
commandId: CommonCommands.COLLAPSE_PANEL.id,
|
|
603
|
-
label: CommonCommands.COLLAPSE_PANEL.label,
|
|
320
|
+
commandId: common_commands_1.CommonCommands.COLLAPSE_PANEL.id,
|
|
321
|
+
label: common_commands_1.CommonCommands.COLLAPSE_PANEL.label,
|
|
604
322
|
order: '5'
|
|
605
323
|
});
|
|
606
324
|
registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_SPLIT, {
|
|
607
|
-
commandId: CommonCommands.TOGGLE_MAXIMIZED.id,
|
|
608
|
-
label: CommonCommands.TOGGLE_MAXIMIZED.label,
|
|
325
|
+
commandId: common_commands_1.CommonCommands.TOGGLE_MAXIMIZED.id,
|
|
326
|
+
label: common_commands_1.CommonCommands.TOGGLE_MAXIMIZED.label,
|
|
609
327
|
order: '6'
|
|
610
328
|
});
|
|
611
|
-
registry.registerMenuAction(CommonMenus.VIEW_APPEARANCE_SUBMENU_SCREEN, {
|
|
612
|
-
commandId: CommonCommands.TOGGLE_MAXIMIZED.id,
|
|
613
|
-
label: CommonCommands.TOGGLE_MAXIMIZED.label,
|
|
329
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.VIEW_APPEARANCE_SUBMENU_SCREEN, {
|
|
330
|
+
commandId: common_commands_1.CommonCommands.TOGGLE_MAXIMIZED.id,
|
|
331
|
+
label: common_commands_1.CommonCommands.TOGGLE_MAXIMIZED.label,
|
|
614
332
|
order: '6'
|
|
615
333
|
});
|
|
616
334
|
registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_COPY, {
|
|
617
|
-
commandId: CommonCommands.COPY_PATH.id,
|
|
618
|
-
label: CommonCommands.COPY_PATH.label,
|
|
335
|
+
commandId: common_commands_1.CommonCommands.COPY_PATH.id,
|
|
336
|
+
label: common_commands_1.CommonCommands.COPY_PATH.label,
|
|
619
337
|
order: '1',
|
|
620
338
|
});
|
|
621
|
-
registry.registerMenuAction(CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
|
|
622
|
-
commandId: CommonCommands.SHOW_MENU_BAR.id,
|
|
339
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.VIEW_APPEARANCE_SUBMENU_BAR, {
|
|
340
|
+
commandId: common_commands_1.CommonCommands.SHOW_MENU_BAR.id,
|
|
623
341
|
label: nls_1.nls.localizeByDefault('Toggle Menu Bar'),
|
|
624
342
|
order: '0'
|
|
625
343
|
});
|
|
626
344
|
registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_PIN, {
|
|
627
|
-
commandId: CommonCommands.PIN_TAB.id,
|
|
345
|
+
commandId: common_commands_1.CommonCommands.PIN_TAB.id,
|
|
628
346
|
label: nls_1.nls.localizeByDefault('Pin'),
|
|
629
347
|
order: '7'
|
|
630
348
|
});
|
|
631
349
|
registry.registerMenuAction(tab_bars_1.SHELL_TABBAR_CONTEXT_PIN, {
|
|
632
|
-
commandId: CommonCommands.UNPIN_TAB.id,
|
|
350
|
+
commandId: common_commands_1.CommonCommands.UNPIN_TAB.id,
|
|
633
351
|
label: nls_1.nls.localizeByDefault('Unpin'),
|
|
634
352
|
order: '8'
|
|
635
353
|
});
|
|
636
|
-
registry.registerMenuAction(CommonMenus.HELP, {
|
|
637
|
-
commandId: CommonCommands.ABOUT_COMMAND.id,
|
|
638
|
-
label: CommonCommands.ABOUT_COMMAND.label,
|
|
354
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.HELP, {
|
|
355
|
+
commandId: common_commands_1.CommonCommands.ABOUT_COMMAND.id,
|
|
356
|
+
label: common_commands_1.CommonCommands.ABOUT_COMMAND.label,
|
|
639
357
|
order: '9'
|
|
640
358
|
});
|
|
641
|
-
registry.registerMenuAction(CommonMenus.VIEW_PRIMARY, {
|
|
642
|
-
commandId: CommonCommands.OPEN_VIEW.id
|
|
359
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.VIEW_PRIMARY, {
|
|
360
|
+
commandId: common_commands_1.CommonCommands.OPEN_VIEW.id
|
|
643
361
|
});
|
|
644
|
-
registry.registerMenuAction(CommonMenus.FILE_SETTINGS_SUBMENU_THEME, {
|
|
645
|
-
commandId: CommonCommands.SELECT_COLOR_THEME.id
|
|
362
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.FILE_SETTINGS_SUBMENU_THEME, {
|
|
363
|
+
commandId: common_commands_1.CommonCommands.SELECT_COLOR_THEME.id
|
|
646
364
|
});
|
|
647
|
-
registry.registerMenuAction(CommonMenus.FILE_SETTINGS_SUBMENU_THEME, {
|
|
648
|
-
commandId: CommonCommands.SELECT_ICON_THEME.id
|
|
365
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.FILE_SETTINGS_SUBMENU_THEME, {
|
|
366
|
+
commandId: common_commands_1.CommonCommands.SELECT_ICON_THEME.id
|
|
649
367
|
});
|
|
650
|
-
registry.registerSubmenu(CommonMenus.MANAGE_SETTINGS_THEMES, nls_1.nls.localizeByDefault('Themes'), { sortString: 'a50' });
|
|
651
|
-
registry.registerMenuAction(CommonMenus.MANAGE_SETTINGS_THEMES, {
|
|
652
|
-
commandId: CommonCommands.SELECT_COLOR_THEME.id,
|
|
368
|
+
registry.registerSubmenu(common_menus_1.CommonMenus.MANAGE_SETTINGS_THEMES, nls_1.nls.localizeByDefault('Themes'), { sortString: 'a50' });
|
|
369
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.MANAGE_SETTINGS_THEMES, {
|
|
370
|
+
commandId: common_commands_1.CommonCommands.SELECT_COLOR_THEME.id,
|
|
653
371
|
order: '0'
|
|
654
372
|
});
|
|
655
|
-
registry.registerMenuAction(CommonMenus.MANAGE_SETTINGS_THEMES, {
|
|
656
|
-
commandId: CommonCommands.SELECT_ICON_THEME.id,
|
|
373
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.MANAGE_SETTINGS_THEMES, {
|
|
374
|
+
commandId: common_commands_1.CommonCommands.SELECT_ICON_THEME.id,
|
|
657
375
|
order: '1'
|
|
658
376
|
});
|
|
659
|
-
registry.registerSubmenu(CommonMenus.VIEW_APPEARANCE_SUBMENU, nls_1.nls.localizeByDefault('Appearance'));
|
|
660
|
-
registry.registerMenuAction(CommonMenus.FILE_NEW_TEXT, {
|
|
661
|
-
commandId: CommonCommands.NEW_UNTITLED_TEXT_FILE.id,
|
|
377
|
+
registry.registerSubmenu(common_menus_1.CommonMenus.VIEW_APPEARANCE_SUBMENU, nls_1.nls.localizeByDefault('Appearance'));
|
|
378
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.FILE_NEW_TEXT, {
|
|
379
|
+
commandId: common_commands_1.CommonCommands.NEW_UNTITLED_TEXT_FILE.id,
|
|
662
380
|
label: nls_1.nls.localizeByDefault('New Text File'),
|
|
663
381
|
order: 'a'
|
|
664
382
|
});
|
|
665
|
-
registry.registerMenuAction(CommonMenus.FILE_NEW_TEXT, {
|
|
666
|
-
commandId: CommonCommands.PICK_NEW_FILE.id,
|
|
383
|
+
registry.registerMenuAction(common_menus_1.CommonMenus.FILE_NEW_TEXT, {
|
|
384
|
+
commandId: common_commands_1.CommonCommands.PICK_NEW_FILE.id,
|
|
667
385
|
label: nls_1.nls.localizeByDefault('New File...'),
|
|
668
386
|
order: 'a1'
|
|
669
387
|
});
|
|
670
388
|
}
|
|
671
389
|
registerCommands(commandRegistry) {
|
|
672
|
-
commandRegistry.registerCommand(CommonCommands.OPEN, uri_command_handler_1.UriAwareCommandHandler.MultiSelect(this.selectionService, {
|
|
390
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.OPEN, uri_command_handler_1.UriAwareCommandHandler.MultiSelect(this.selectionService, {
|
|
673
391
|
execute: uris => uris.map(uri => (0, opener_service_1.open)(this.openerService, uri)),
|
|
674
392
|
}));
|
|
675
|
-
commandRegistry.registerCommand(CommonCommands.CUT, {
|
|
393
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.CUT, {
|
|
676
394
|
execute: () => {
|
|
677
395
|
if (exports.supportCut) {
|
|
678
396
|
document.execCommand('cut');
|
|
@@ -682,7 +400,7 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
682
400
|
}
|
|
683
401
|
}
|
|
684
402
|
});
|
|
685
|
-
commandRegistry.registerCommand(CommonCommands.COPY, {
|
|
403
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.COPY, {
|
|
686
404
|
execute: () => {
|
|
687
405
|
if (exports.supportCopy) {
|
|
688
406
|
document.execCommand('copy');
|
|
@@ -692,7 +410,7 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
692
410
|
}
|
|
693
411
|
}
|
|
694
412
|
});
|
|
695
|
-
commandRegistry.registerCommand(CommonCommands.PASTE, {
|
|
413
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.PASTE, {
|
|
696
414
|
execute: () => {
|
|
697
415
|
if (exports.supportPaste) {
|
|
698
416
|
document.execCommand('paste');
|
|
@@ -702,7 +420,7 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
702
420
|
}
|
|
703
421
|
}
|
|
704
422
|
});
|
|
705
|
-
commandRegistry.registerCommand(CommonCommands.COPY_PATH, uri_command_handler_1.UriAwareCommandHandler.MultiSelect(this.selectionService, {
|
|
423
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.COPY_PATH, uri_command_handler_1.UriAwareCommandHandler.MultiSelect(this.selectionService, {
|
|
706
424
|
isVisible: uris => Array.isArray(uris) && uris.some(uri => uri instanceof uri_1.default),
|
|
707
425
|
isEnabled: uris => Array.isArray(uris) && uris.some(uri => uri instanceof uri_1.default),
|
|
708
426
|
execute: async (uris) => {
|
|
@@ -716,62 +434,62 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
716
434
|
}
|
|
717
435
|
}
|
|
718
436
|
}));
|
|
719
|
-
commandRegistry.registerCommand(CommonCommands.UNDO, {
|
|
437
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.UNDO, {
|
|
720
438
|
execute: () => {
|
|
721
439
|
this.undoRedoHandlerService.undo();
|
|
722
440
|
}
|
|
723
441
|
});
|
|
724
|
-
commandRegistry.registerCommand(CommonCommands.REDO, {
|
|
442
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.REDO, {
|
|
725
443
|
execute: () => {
|
|
726
444
|
this.undoRedoHandlerService.redo();
|
|
727
445
|
}
|
|
728
446
|
});
|
|
729
|
-
commandRegistry.registerCommand(CommonCommands.SELECT_ALL, {
|
|
447
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.SELECT_ALL, {
|
|
730
448
|
execute: () => document.execCommand('selectAll')
|
|
731
449
|
});
|
|
732
|
-
commandRegistry.registerCommand(CommonCommands.FIND, {
|
|
450
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.FIND, {
|
|
733
451
|
execute: () => { }
|
|
734
452
|
});
|
|
735
|
-
commandRegistry.registerCommand(CommonCommands.REPLACE, {
|
|
453
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.REPLACE, {
|
|
736
454
|
execute: () => { }
|
|
737
455
|
});
|
|
738
|
-
commandRegistry.registerCommand(CommonCommands.NEXT_TAB, {
|
|
456
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.NEXT_TAB, {
|
|
739
457
|
isEnabled: () => this.shell.currentTabBar !== undefined,
|
|
740
458
|
execute: () => this.shell.activateNextTab()
|
|
741
459
|
});
|
|
742
|
-
commandRegistry.registerCommand(CommonCommands.PREVIOUS_TAB, {
|
|
460
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.PREVIOUS_TAB, {
|
|
743
461
|
isEnabled: () => this.shell.currentTabBar !== undefined,
|
|
744
462
|
execute: () => this.shell.activatePreviousTab()
|
|
745
463
|
});
|
|
746
|
-
commandRegistry.registerCommand(CommonCommands.NEXT_TAB_IN_GROUP, {
|
|
464
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.NEXT_TAB_IN_GROUP, {
|
|
747
465
|
isEnabled: () => this.shell.nextTabIndexInTabBar() !== -1,
|
|
748
466
|
execute: () => this.shell.activateNextTabInTabBar()
|
|
749
467
|
});
|
|
750
|
-
commandRegistry.registerCommand(CommonCommands.PREVIOUS_TAB_IN_GROUP, {
|
|
468
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.PREVIOUS_TAB_IN_GROUP, {
|
|
751
469
|
isEnabled: () => this.shell.previousTabIndexInTabBar() !== -1,
|
|
752
470
|
execute: () => this.shell.activatePreviousTabInTabBar()
|
|
753
471
|
});
|
|
754
|
-
commandRegistry.registerCommand(CommonCommands.NEXT_TAB_GROUP, {
|
|
472
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.NEXT_TAB_GROUP, {
|
|
755
473
|
isEnabled: () => this.shell.nextTabBar() !== undefined,
|
|
756
474
|
execute: () => this.shell.activateNextTabBar()
|
|
757
475
|
});
|
|
758
|
-
commandRegistry.registerCommand(CommonCommands.PREVIOUS_TAB_GROUP, {
|
|
476
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.PREVIOUS_TAB_GROUP, {
|
|
759
477
|
isEnabled: () => this.shell.previousTabBar() !== undefined,
|
|
760
478
|
execute: () => this.shell.activatePreviousTabBar()
|
|
761
479
|
});
|
|
762
|
-
commandRegistry.registerCommand(CommonCommands.CLOSE_TAB, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
480
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.CLOSE_TAB, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
763
481
|
isEnabled: title => Boolean(title === null || title === void 0 ? void 0 : title.closable),
|
|
764
482
|
execute: (title, tabBar) => tabBar && this.shell.closeTabs(tabBar, candidate => candidate === title),
|
|
765
483
|
}));
|
|
766
|
-
commandRegistry.registerCommand(CommonCommands.CLOSE_OTHER_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
484
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.CLOSE_OTHER_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
767
485
|
isEnabled: (title, tabbar) => Boolean(tabbar === null || tabbar === void 0 ? void 0 : tabbar.titles.some(candidate => candidate !== title && candidate.closable)),
|
|
768
486
|
execute: (title, tabbar) => tabbar && this.shell.closeTabs(tabbar, candidate => candidate !== title && candidate.closable),
|
|
769
487
|
}));
|
|
770
|
-
commandRegistry.registerCommand(CommonCommands.CLOSE_SAVED_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
488
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.CLOSE_SAVED_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
771
489
|
isEnabled: (_title, tabbar) => Boolean(tabbar === null || tabbar === void 0 ? void 0 : tabbar.titles.some(candidate => candidate.closable && !saveable_1.Saveable.isDirty(candidate.owner))),
|
|
772
490
|
execute: (_title, tabbar) => tabbar && this.shell.closeTabs(tabbar, candidate => candidate.closable && !saveable_1.Saveable.isDirty(candidate.owner)),
|
|
773
491
|
}));
|
|
774
|
-
commandRegistry.registerCommand(CommonCommands.CLOSE_RIGHT_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
492
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.CLOSE_RIGHT_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
775
493
|
isEnabled: (title, tabbar) => {
|
|
776
494
|
let targetSeen = false;
|
|
777
495
|
return Boolean(tabbar === null || tabbar === void 0 ? void 0 : tabbar.titles.some(candidate => {
|
|
@@ -807,18 +525,18 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
807
525
|
}
|
|
808
526
|
}
|
|
809
527
|
}));
|
|
810
|
-
commandRegistry.registerCommand(CommonCommands.CLOSE_ALL_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
528
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.CLOSE_ALL_TABS, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
811
529
|
isEnabled: (_title, tabbar) => Boolean(tabbar === null || tabbar === void 0 ? void 0 : tabbar.titles.some(title => title.closable)),
|
|
812
530
|
execute: (_title, tabbar) => tabbar && this.shell.closeTabs(tabbar, candidate => candidate.closable),
|
|
813
531
|
}));
|
|
814
|
-
commandRegistry.registerCommand(CommonCommands.CLOSE_MAIN_TAB, {
|
|
532
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.CLOSE_MAIN_TAB, {
|
|
815
533
|
isEnabled: () => {
|
|
816
534
|
const currentWidget = this.shell.getCurrentWidget('main');
|
|
817
535
|
return currentWidget !== undefined && currentWidget.title.closable;
|
|
818
536
|
},
|
|
819
537
|
execute: () => this.shell.getCurrentWidget('main').close()
|
|
820
538
|
});
|
|
821
|
-
commandRegistry.registerCommand(CommonCommands.CLOSE_OTHER_MAIN_TABS, {
|
|
539
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.CLOSE_OTHER_MAIN_TABS, {
|
|
822
540
|
isEnabled: () => {
|
|
823
541
|
const currentWidget = this.shell.getCurrentWidget('main');
|
|
824
542
|
return currentWidget !== undefined &&
|
|
@@ -829,11 +547,11 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
829
547
|
this.shell.closeTabs('main', title => title.owner !== currentWidget && title.closable);
|
|
830
548
|
}
|
|
831
549
|
});
|
|
832
|
-
commandRegistry.registerCommand(CommonCommands.CLOSE_ALL_MAIN_TABS, {
|
|
550
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.CLOSE_ALL_MAIN_TABS, {
|
|
833
551
|
isEnabled: () => this.shell.mainAreaTabBars.some(tb => tb.titles.some(title => title.closable)),
|
|
834
552
|
execute: () => this.shell.closeTabs('main', title => title.closable)
|
|
835
553
|
});
|
|
836
|
-
commandRegistry.registerCommand(CommonCommands.COLLAPSE_PANEL, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
554
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.COLLAPSE_PANEL, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
837
555
|
isEnabled: (_title, tabbar) => {
|
|
838
556
|
if (tabbar) {
|
|
839
557
|
const area = this.shell.getAreaFor(tabbar);
|
|
@@ -844,14 +562,14 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
844
562
|
isVisible: (_title, tabbar) => Boolean(tabbar && application_shell_1.ApplicationShell.isSideArea(this.shell.getAreaFor(tabbar))),
|
|
845
563
|
execute: (_title, tabbar) => tabbar && this.shell.collapsePanel(this.shell.getAreaFor(tabbar))
|
|
846
564
|
}));
|
|
847
|
-
commandRegistry.registerCommand(CommonCommands.COLLAPSE_ALL_PANELS, {
|
|
565
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.COLLAPSE_ALL_PANELS, {
|
|
848
566
|
execute: () => {
|
|
849
567
|
this.shell.collapsePanel('left');
|
|
850
568
|
this.shell.collapsePanel('right');
|
|
851
569
|
this.shell.collapsePanel('bottom');
|
|
852
570
|
}
|
|
853
571
|
});
|
|
854
|
-
commandRegistry.registerCommand(CommonCommands.TOGGLE_BOTTOM_PANEL, {
|
|
572
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.TOGGLE_BOTTOM_PANEL, {
|
|
855
573
|
isEnabled: () => this.shell.getWidgets('bottom').length > 0,
|
|
856
574
|
execute: () => {
|
|
857
575
|
if (this.shell.isExpanded('bottom')) {
|
|
@@ -862,7 +580,7 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
862
580
|
}
|
|
863
581
|
}
|
|
864
582
|
});
|
|
865
|
-
commandRegistry.registerCommand(CommonCommands.TOGGLE_LEFT_PANEL, {
|
|
583
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.TOGGLE_LEFT_PANEL, {
|
|
866
584
|
isEnabled: () => this.shell.getWidgets('left').length > 0,
|
|
867
585
|
execute: () => {
|
|
868
586
|
if (this.shell.isExpanded('left')) {
|
|
@@ -873,7 +591,7 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
873
591
|
}
|
|
874
592
|
}
|
|
875
593
|
});
|
|
876
|
-
commandRegistry.registerCommand(CommonCommands.TOGGLE_RIGHT_PANEL, {
|
|
594
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.TOGGLE_RIGHT_PANEL, {
|
|
877
595
|
isEnabled: () => this.shell.getWidgets('right').length > 0,
|
|
878
596
|
execute: () => {
|
|
879
597
|
if (this.shell.isExpanded('right')) {
|
|
@@ -884,15 +602,15 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
884
602
|
}
|
|
885
603
|
}
|
|
886
604
|
});
|
|
887
|
-
commandRegistry.registerCommand(CommonCommands.TOGGLE_STATUS_BAR, {
|
|
605
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.TOGGLE_STATUS_BAR, {
|
|
888
606
|
execute: () => this.preferenceService.updateValue('workbench.statusBar.visible', !this.preferences['workbench.statusBar.visible'])
|
|
889
607
|
});
|
|
890
|
-
commandRegistry.registerCommand(CommonCommands.TOGGLE_MAXIMIZED, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
608
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.TOGGLE_MAXIMIZED, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
891
609
|
isEnabled: title => Boolean((title === null || title === void 0 ? void 0 : title.owner) && this.shell.canToggleMaximized(title === null || title === void 0 ? void 0 : title.owner)),
|
|
892
610
|
isVisible: title => Boolean((title === null || title === void 0 ? void 0 : title.owner) && this.shell.canToggleMaximized(title === null || title === void 0 ? void 0 : title.owner)),
|
|
893
611
|
execute: title => (title === null || title === void 0 ? void 0 : title.owner) && this.shell.toggleMaximized(title === null || title === void 0 ? void 0 : title.owner),
|
|
894
612
|
}));
|
|
895
|
-
commandRegistry.registerCommand(CommonCommands.SHOW_MENU_BAR, {
|
|
613
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.SHOW_MENU_BAR, {
|
|
896
614
|
isEnabled: () => !os_1.isOSX,
|
|
897
615
|
isVisible: () => !os_1.isOSX,
|
|
898
616
|
execute: () => {
|
|
@@ -906,10 +624,10 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
906
624
|
}
|
|
907
625
|
}
|
|
908
626
|
});
|
|
909
|
-
commandRegistry.registerCommand(CommonCommands.SAVE, {
|
|
627
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.SAVE, {
|
|
910
628
|
execute: () => this.save({ formatType: 1 /* FormatType.ON */ })
|
|
911
629
|
});
|
|
912
|
-
commandRegistry.registerCommand(CommonCommands.SAVE_AS, {
|
|
630
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.SAVE_AS, {
|
|
913
631
|
isEnabled: () => this.saveResourceService.canSaveAs(this.shell.currentWidget),
|
|
914
632
|
execute: () => {
|
|
915
633
|
const { currentWidget } = this.shell;
|
|
@@ -919,44 +637,44 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
919
637
|
this.saveResourceService.saveAs(currentWidget);
|
|
920
638
|
}
|
|
921
639
|
else {
|
|
922
|
-
this.messageService.error(nls_1.nls.localize('theia/workspace/failSaveAs', 'Cannot run "{0}" for the current widget.', CommonCommands.SAVE_AS.label));
|
|
640
|
+
this.messageService.error(nls_1.nls.localize('theia/workspace/failSaveAs', 'Cannot run "{0}" for the current widget.', common_commands_1.CommonCommands.SAVE_AS.label));
|
|
923
641
|
}
|
|
924
642
|
},
|
|
925
643
|
});
|
|
926
|
-
commandRegistry.registerCommand(CommonCommands.SAVE_WITHOUT_FORMATTING, {
|
|
644
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.SAVE_WITHOUT_FORMATTING, {
|
|
927
645
|
execute: () => this.save({ formatType: 2 /* FormatType.OFF */ })
|
|
928
646
|
});
|
|
929
|
-
commandRegistry.registerCommand(CommonCommands.SAVE_ALL, {
|
|
647
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.SAVE_ALL, {
|
|
930
648
|
execute: () => this.shell.saveAll({ formatType: 3 /* FormatType.DIRTY */ })
|
|
931
649
|
});
|
|
932
|
-
commandRegistry.registerCommand(CommonCommands.ABOUT_COMMAND, {
|
|
650
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.ABOUT_COMMAND, {
|
|
933
651
|
execute: () => this.openAbout()
|
|
934
652
|
});
|
|
935
|
-
commandRegistry.registerCommand(CommonCommands.OPEN_VIEW, {
|
|
653
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.OPEN_VIEW, {
|
|
936
654
|
execute: () => { var _a; return (_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.open(quick_view_service_1.QuickViewService.PREFIX); }
|
|
937
655
|
});
|
|
938
|
-
commandRegistry.registerCommand(CommonCommands.SELECT_COLOR_THEME, {
|
|
656
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.SELECT_COLOR_THEME, {
|
|
939
657
|
execute: () => this.selectColorTheme()
|
|
940
658
|
});
|
|
941
|
-
commandRegistry.registerCommand(CommonCommands.SELECT_ICON_THEME, {
|
|
659
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.SELECT_ICON_THEME, {
|
|
942
660
|
execute: () => this.selectIconTheme()
|
|
943
661
|
});
|
|
944
|
-
commandRegistry.registerCommand(CommonCommands.PIN_TAB, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
662
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.PIN_TAB, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
945
663
|
isEnabled: title => Boolean(title && !(0, widgets_1.isPinned)(title)),
|
|
946
664
|
execute: title => this.togglePinned(title),
|
|
947
665
|
}));
|
|
948
|
-
commandRegistry.registerCommand(CommonCommands.UNPIN_TAB, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
666
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.UNPIN_TAB, new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
949
667
|
isEnabled: title => Boolean(title && (0, widgets_1.isPinned)(title)),
|
|
950
668
|
execute: title => this.togglePinned(title),
|
|
951
669
|
}));
|
|
952
|
-
commandRegistry.registerCommand(CommonCommands.CONFIGURE_DISPLAY_LANGUAGE, {
|
|
670
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.CONFIGURE_DISPLAY_LANGUAGE, {
|
|
953
671
|
execute: () => this.configureDisplayLanguage()
|
|
954
672
|
});
|
|
955
|
-
commandRegistry.registerCommand(CommonCommands.TOGGLE_BREADCRUMBS, {
|
|
673
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.TOGGLE_BREADCRUMBS, {
|
|
956
674
|
execute: () => this.toggleBreadcrumbs(),
|
|
957
675
|
isToggled: () => this.isBreadcrumbsEnabled(),
|
|
958
676
|
});
|
|
959
|
-
commandRegistry.registerCommand(CommonCommands.NEW_UNTITLED_TEXT_FILE, {
|
|
677
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.NEW_UNTITLED_TEXT_FILE, {
|
|
960
678
|
execute: async () => {
|
|
961
679
|
const untitledUri = this.untitledResourceResolver.createUntitledURI('', await this.workingDirProvider.getUserWorkingDir());
|
|
962
680
|
this.untitledResourceResolver.resolve(untitledUri);
|
|
@@ -968,11 +686,11 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
968
686
|
return editor;
|
|
969
687
|
}
|
|
970
688
|
});
|
|
971
|
-
commandRegistry.registerCommand(CommonCommands.PICK_NEW_FILE, {
|
|
689
|
+
commandRegistry.registerCommand(common_commands_1.CommonCommands.PICK_NEW_FILE, {
|
|
972
690
|
execute: async () => this.showNewFilePicker()
|
|
973
691
|
});
|
|
974
692
|
for (const [index, ordinal] of this.getOrdinalNumbers().entries()) {
|
|
975
|
-
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) }, {
|
|
693
|
+
commandRegistry.registerCommand({ id: `workbench.action.focus${ordinal}EditorGroup`, label: index === 0 ? nls_1.nls.localizeByDefault('Focus First Editor Group') : '', category: nls_1.nls.localize(common_commands_1.CommonCommands.VIEW_CATEGORY_KEY, common_commands_1.CommonCommands.VIEW_CATEGORY) }, {
|
|
976
694
|
isEnabled: () => this.shell.mainAreaTabBars.length > index,
|
|
977
695
|
execute: () => {
|
|
978
696
|
var _a, _b;
|
|
@@ -999,110 +717,110 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
999
717
|
registerKeybindings(registry) {
|
|
1000
718
|
if (exports.supportCut) {
|
|
1001
719
|
registry.registerKeybinding({
|
|
1002
|
-
command: CommonCommands.CUT.id,
|
|
720
|
+
command: common_commands_1.CommonCommands.CUT.id,
|
|
1003
721
|
keybinding: 'ctrlcmd+x'
|
|
1004
722
|
});
|
|
1005
723
|
}
|
|
1006
724
|
if (exports.supportCopy) {
|
|
1007
725
|
registry.registerKeybinding({
|
|
1008
|
-
command: CommonCommands.COPY.id,
|
|
726
|
+
command: common_commands_1.CommonCommands.COPY.id,
|
|
1009
727
|
keybinding: 'ctrlcmd+c'
|
|
1010
728
|
});
|
|
1011
729
|
}
|
|
1012
730
|
if (exports.supportPaste) {
|
|
1013
731
|
registry.registerKeybinding({
|
|
1014
|
-
command: CommonCommands.PASTE.id,
|
|
732
|
+
command: common_commands_1.CommonCommands.PASTE.id,
|
|
1015
733
|
keybinding: 'ctrlcmd+v'
|
|
1016
734
|
});
|
|
1017
735
|
}
|
|
1018
736
|
registry.registerKeybinding({
|
|
1019
|
-
command: CommonCommands.COPY_PATH.id,
|
|
737
|
+
command: common_commands_1.CommonCommands.COPY_PATH.id,
|
|
1020
738
|
keybinding: os_1.isWindows ? 'shift+alt+c' : 'ctrlcmd+alt+c',
|
|
1021
739
|
when: '!editorFocus'
|
|
1022
740
|
});
|
|
1023
741
|
registry.registerKeybindings(
|
|
1024
742
|
// Edition
|
|
1025
743
|
{
|
|
1026
|
-
command: CommonCommands.UNDO.id,
|
|
744
|
+
command: common_commands_1.CommonCommands.UNDO.id,
|
|
1027
745
|
keybinding: 'ctrlcmd+z'
|
|
1028
746
|
}, {
|
|
1029
|
-
command: CommonCommands.REDO.id,
|
|
747
|
+
command: common_commands_1.CommonCommands.REDO.id,
|
|
1030
748
|
keybinding: os_1.isOSX ? 'ctrlcmd+shift+z' : 'ctrlcmd+y'
|
|
1031
749
|
}, {
|
|
1032
|
-
command: CommonCommands.SELECT_ALL.id,
|
|
750
|
+
command: common_commands_1.CommonCommands.SELECT_ALL.id,
|
|
1033
751
|
keybinding: 'ctrlcmd+a'
|
|
1034
752
|
}, {
|
|
1035
|
-
command: CommonCommands.FIND.id,
|
|
753
|
+
command: common_commands_1.CommonCommands.FIND.id,
|
|
1036
754
|
keybinding: 'ctrlcmd+f'
|
|
1037
755
|
}, {
|
|
1038
|
-
command: CommonCommands.REPLACE.id,
|
|
756
|
+
command: common_commands_1.CommonCommands.REPLACE.id,
|
|
1039
757
|
keybinding: 'ctrlcmd+alt+f'
|
|
1040
758
|
},
|
|
1041
759
|
// Tabs
|
|
1042
760
|
{
|
|
1043
|
-
command: CommonCommands.NEXT_TAB.id,
|
|
761
|
+
command: common_commands_1.CommonCommands.NEXT_TAB.id,
|
|
1044
762
|
keybinding: 'ctrl+tab'
|
|
1045
763
|
}, {
|
|
1046
|
-
command: CommonCommands.NEXT_TAB.id,
|
|
764
|
+
command: common_commands_1.CommonCommands.NEXT_TAB.id,
|
|
1047
765
|
keybinding: 'ctrlcmd+alt+d'
|
|
1048
766
|
}, {
|
|
1049
|
-
command: CommonCommands.PREVIOUS_TAB.id,
|
|
767
|
+
command: common_commands_1.CommonCommands.PREVIOUS_TAB.id,
|
|
1050
768
|
keybinding: 'ctrl+shift+tab'
|
|
1051
769
|
}, {
|
|
1052
|
-
command: CommonCommands.PREVIOUS_TAB.id,
|
|
770
|
+
command: common_commands_1.CommonCommands.PREVIOUS_TAB.id,
|
|
1053
771
|
keybinding: 'ctrlcmd+alt+a'
|
|
1054
772
|
}, {
|
|
1055
|
-
command: CommonCommands.CLOSE_MAIN_TAB.id,
|
|
773
|
+
command: common_commands_1.CommonCommands.CLOSE_MAIN_TAB.id,
|
|
1056
774
|
keybinding: this.isElectron() ? (os_1.isWindows ? 'ctrl+f4' : 'ctrlcmd+w') : 'alt+w'
|
|
1057
775
|
}, {
|
|
1058
|
-
command: CommonCommands.CLOSE_OTHER_MAIN_TABS.id,
|
|
776
|
+
command: common_commands_1.CommonCommands.CLOSE_OTHER_MAIN_TABS.id,
|
|
1059
777
|
keybinding: 'ctrlcmd+alt+t'
|
|
1060
778
|
}, {
|
|
1061
|
-
command: CommonCommands.CLOSE_ALL_MAIN_TABS.id,
|
|
779
|
+
command: common_commands_1.CommonCommands.CLOSE_ALL_MAIN_TABS.id,
|
|
1062
780
|
keybinding: this.isElectron() ? 'ctrlCmd+k ctrlCmd+w' : 'alt+shift+w'
|
|
1063
781
|
},
|
|
1064
782
|
// Panels
|
|
1065
783
|
{
|
|
1066
|
-
command: CommonCommands.COLLAPSE_PANEL.id,
|
|
784
|
+
command: common_commands_1.CommonCommands.COLLAPSE_PANEL.id,
|
|
1067
785
|
keybinding: 'alt+c'
|
|
1068
786
|
}, {
|
|
1069
|
-
command: CommonCommands.TOGGLE_BOTTOM_PANEL.id,
|
|
787
|
+
command: common_commands_1.CommonCommands.TOGGLE_BOTTOM_PANEL.id,
|
|
1070
788
|
keybinding: 'ctrlcmd+j',
|
|
1071
789
|
}, {
|
|
1072
|
-
command: CommonCommands.COLLAPSE_ALL_PANELS.id,
|
|
790
|
+
command: common_commands_1.CommonCommands.COLLAPSE_ALL_PANELS.id,
|
|
1073
791
|
keybinding: 'alt+shift+c',
|
|
1074
792
|
}, {
|
|
1075
|
-
command: CommonCommands.TOGGLE_MAXIMIZED.id,
|
|
793
|
+
command: common_commands_1.CommonCommands.TOGGLE_MAXIMIZED.id,
|
|
1076
794
|
keybinding: 'alt+m',
|
|
1077
795
|
},
|
|
1078
796
|
// Saving
|
|
1079
797
|
{
|
|
1080
|
-
command: CommonCommands.SAVE.id,
|
|
798
|
+
command: common_commands_1.CommonCommands.SAVE.id,
|
|
1081
799
|
keybinding: 'ctrlcmd+s'
|
|
1082
800
|
}, {
|
|
1083
|
-
command: CommonCommands.SAVE_WITHOUT_FORMATTING.id,
|
|
801
|
+
command: common_commands_1.CommonCommands.SAVE_WITHOUT_FORMATTING.id,
|
|
1084
802
|
keybinding: 'ctrlcmd+k s'
|
|
1085
803
|
}, {
|
|
1086
|
-
command: CommonCommands.SAVE_ALL.id,
|
|
804
|
+
command: common_commands_1.CommonCommands.SAVE_ALL.id,
|
|
1087
805
|
keybinding: 'ctrlcmd+alt+s'
|
|
1088
806
|
},
|
|
1089
807
|
// Theming
|
|
1090
808
|
{
|
|
1091
|
-
command: CommonCommands.SELECT_COLOR_THEME.id,
|
|
809
|
+
command: common_commands_1.CommonCommands.SELECT_COLOR_THEME.id,
|
|
1092
810
|
keybinding: 'ctrlcmd+k ctrlcmd+t'
|
|
1093
811
|
}, {
|
|
1094
|
-
command: CommonCommands.PIN_TAB.id,
|
|
812
|
+
command: common_commands_1.CommonCommands.PIN_TAB.id,
|
|
1095
813
|
keybinding: 'ctrlcmd+k shift+enter',
|
|
1096
814
|
when: '!activeEditorIsPinned'
|
|
1097
815
|
}, {
|
|
1098
|
-
command: CommonCommands.UNPIN_TAB.id,
|
|
816
|
+
command: common_commands_1.CommonCommands.UNPIN_TAB.id,
|
|
1099
817
|
keybinding: 'ctrlcmd+k shift+enter',
|
|
1100
818
|
when: 'activeEditorIsPinned'
|
|
1101
819
|
}, {
|
|
1102
|
-
command: CommonCommands.NEW_UNTITLED_TEXT_FILE.id,
|
|
820
|
+
command: common_commands_1.CommonCommands.NEW_UNTITLED_TEXT_FILE.id,
|
|
1103
821
|
keybinding: this.isElectron() ? 'ctrlcmd+n' : 'alt+n',
|
|
1104
822
|
}, {
|
|
1105
|
-
command: CommonCommands.PICK_NEW_FILE.id,
|
|
823
|
+
command: common_commands_1.CommonCommands.PICK_NEW_FILE.id,
|
|
1106
824
|
keybinding: 'ctrlcmd+alt+n'
|
|
1107
825
|
});
|
|
1108
826
|
for (const [index, ordinal] of this.getOrdinalNumbers().entries()) {
|
|
@@ -1343,12 +1061,12 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
1343
1061
|
* @todo https://github.com/eclipse-theia/theia/issues/12824
|
|
1344
1062
|
*/
|
|
1345
1063
|
async showNewFilePicker() {
|
|
1346
|
-
const newFileContributions = this.menuRegistry.getMenuNode(CommonMenus.FILE_NEW_CONTRIBUTIONS); // Add menus
|
|
1064
|
+
const newFileContributions = this.menuRegistry.getMenuNode(common_menus_1.CommonMenus.FILE_NEW_CONTRIBUTIONS); // Add menus
|
|
1347
1065
|
const items = [
|
|
1348
1066
|
{
|
|
1349
1067
|
label: nls_1.nls.localizeByDefault('New Text File'),
|
|
1350
1068
|
description: nls_1.nls.localizeByDefault('Built-in'),
|
|
1351
|
-
execute: async () => this.commandRegistry.executeCommand(CommonCommands.NEW_UNTITLED_TEXT_FILE.id)
|
|
1069
|
+
execute: async () => this.commandRegistry.executeCommand(common_commands_1.CommonCommands.NEW_UNTITLED_TEXT_FILE.id)
|
|
1352
1070
|
},
|
|
1353
1071
|
...newFileContributions.children
|
|
1354
1072
|
.flatMap(node => {
|
|
@@ -1366,13 +1084,13 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
1366
1084
|
const item = node;
|
|
1367
1085
|
return {
|
|
1368
1086
|
label: item.label,
|
|
1369
|
-
execute: () => item.run(CommonMenus.FILE_NEW_CONTRIBUTIONS)
|
|
1087
|
+
execute: () => item.run(common_menus_1.CommonMenus.FILE_NEW_CONTRIBUTIONS)
|
|
1370
1088
|
};
|
|
1371
1089
|
}
|
|
1372
1090
|
})
|
|
1373
1091
|
];
|
|
1374
1092
|
const CREATE_NEW_FILE_ITEM_ID = 'create-new-file';
|
|
1375
|
-
const hasNewFileHandler = this.commandRegistry.getActiveHandler(CommonCommands.NEW_FILE.id) !== undefined;
|
|
1093
|
+
const hasNewFileHandler = this.commandRegistry.getActiveHandler(common_commands_1.CommonCommands.NEW_FILE.id) !== undefined;
|
|
1376
1094
|
// Create a "Create New File" item only if there is a NEW_FILE command handler.
|
|
1377
1095
|
const createNewFileItem = hasNewFileHandler ? {
|
|
1378
1096
|
id: CREATE_NEW_FILE_ITEM_ID,
|
|
@@ -1382,7 +1100,7 @@ let CommonFrontendContribution = class CommonFrontendContribution {
|
|
|
1382
1100
|
if (createNewFileItem === null || createNewFileItem === void 0 ? void 0 : createNewFileItem.value) {
|
|
1383
1101
|
const parent = await this.workingDirProvider.getUserWorkingDir();
|
|
1384
1102
|
// Exec NEW_FILE command with the file name and parent dir as arguments
|
|
1385
|
-
return this.commandRegistry.executeCommand(CommonCommands.NEW_FILE.id, createNewFileItem.value, parent);
|
|
1103
|
+
return this.commandRegistry.executeCommand(common_commands_1.CommonCommands.NEW_FILE.id, createNewFileItem.value, parent);
|
|
1386
1104
|
}
|
|
1387
1105
|
}
|
|
1388
1106
|
} : undefined;
|