@theia/core 1.38.0-next.5 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/i18n/nls.cs.json +1 -4
- package/i18n/nls.de.json +1 -4
- package/i18n/nls.es.json +1 -4
- package/i18n/nls.fr.json +1 -4
- package/i18n/nls.hu.json +1 -4
- package/i18n/nls.it.json +1 -4
- package/i18n/nls.ja.json +1 -4
- package/i18n/nls.json +1 -4
- package/i18n/nls.pl.json +1 -4
- package/i18n/nls.pt-br.json +1 -4
- package/i18n/nls.pt-pt.json +1 -4
- package/i18n/nls.ru.json +1 -4
- package/i18n/nls.zh-cn.json +1 -4
- package/lib/browser/common-frontend-contribution.js +3 -3
- package/lib/browser/common-frontend-contribution.js.map +1 -1
- package/lib/browser/common-styling-participants.d.ts.map +1 -1
- package/lib/browser/common-styling-participants.js +20 -0
- package/lib/browser/common-styling-participants.js.map +1 -1
- package/lib/browser/core-preferences.js +1 -1
- package/lib/browser/core-preferences.js.map +1 -1
- package/lib/browser/endpoint.js +3 -3
- package/lib/browser/endpoint.js.map +1 -1
- package/lib/browser/keybinding.js +1 -1
- package/lib/browser/keybinding.js.map +1 -1
- package/lib/browser/label-provider.js +1 -1
- package/lib/browser/label-provider.js.map +1 -1
- package/lib/browser/preferences/preference-proxy.js +2 -2
- package/lib/browser/preferences/preference-proxy.js.map +1 -1
- package/lib/browser/quick-input/quick-command-frontend-contribution.d.ts.map +1 -1
- package/lib/browser/quick-input/quick-command-frontend-contribution.js +25 -1
- package/lib/browser/quick-input/quick-command-frontend-contribution.js.map +1 -1
- package/lib/browser/quick-input/quick-command-service.d.ts +1 -0
- package/lib/browser/quick-input/quick-command-service.d.ts.map +1 -1
- package/lib/browser/quick-input/quick-command-service.js +4 -1
- package/lib/browser/quick-input/quick-command-service.js.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.d.ts +2 -0
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.d.ts.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.js +23 -8
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.js.map +1 -1
- package/lib/browser/tree/search-box-debounce.js +1 -1
- package/lib/browser/tree/search-box-debounce.js.map +1 -1
- package/lib/browser/view-container.d.ts +10 -0
- package/lib/browser/view-container.d.ts.map +1 -1
- package/lib/browser/view-container.js +15 -1
- package/lib/browser/view-container.js.map +1 -1
- package/lib/browser/widget-decoration.js +1 -1
- package/lib/browser/widget-decoration.js.map +1 -1
- package/lib/common/command.d.ts +1 -0
- package/lib/common/command.d.ts.map +1 -1
- package/lib/common/command.js.map +1 -1
- package/lib/common/glob.js +5 -5
- package/lib/common/glob.js.map +1 -1
- package/lib/common/index.d.ts +1 -0
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +1 -0
- package/lib/common/index.js.map +1 -1
- package/lib/common/objects.d.ts +1 -0
- package/lib/common/objects.d.ts.map +1 -1
- package/lib/common/objects.js +43 -1
- package/lib/common/objects.js.map +1 -1
- package/lib/common/path.js +9 -9
- package/lib/common/path.js.map +1 -1
- package/lib/common/paths.js +1 -1
- package/lib/common/paths.js.map +1 -1
- package/lib/common/severity.js +1 -1
- package/lib/common/severity.js.map +1 -1
- package/lib/common/telemetry.d.ts +20 -0
- package/lib/common/telemetry.d.ts.map +1 -0
- package/lib/common/telemetry.js +25 -0
- package/lib/common/telemetry.js.map +1 -0
- package/lib/electron-browser/menu/electron-main-menu-factory.d.ts +5 -0
- package/lib/electron-browser/menu/electron-main-menu-factory.d.ts.map +1 -1
- package/lib/electron-browser/menu/electron-main-menu-factory.js +4 -3
- package/lib/electron-browser/menu/electron-main-menu-factory.js.map +1 -1
- package/lib/node/backend-application-module.d.ts.map +1 -1
- package/lib/node/backend-application-module.js +2 -0
- package/lib/node/backend-application-module.js.map +1 -1
- package/lib/node/filesystem-locking.d.ts +24 -0
- package/lib/node/filesystem-locking.d.ts.map +1 -0
- package/lib/node/filesystem-locking.js +71 -0
- package/lib/node/filesystem-locking.js.map +1 -0
- package/lib/node/index.d.ts +1 -0
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +3 -0
- package/lib/node/index.js.map +1 -1
- package/lib/node/messaging/ipc-connection-provider.js +1 -1
- package/lib/node/messaging/ipc-connection-provider.js.map +1 -1
- package/package.json +7 -6
- package/src/browser/common-frontend-contribution.ts +3 -3
- package/src/browser/common-styling-participants.ts +20 -0
- package/src/browser/core-preferences.ts +1 -1
- package/src/browser/endpoint.ts +3 -3
- package/src/browser/keybinding.ts +1 -1
- package/src/browser/label-provider.ts +1 -1
- package/src/browser/preferences/preference-proxy.ts +2 -2
- package/src/browser/quick-input/quick-command-frontend-contribution.ts +26 -2
- package/src/browser/quick-input/quick-command-service.ts +4 -0
- package/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar.tsx +23 -6
- package/src/browser/tree/search-box-debounce.ts +1 -1
- package/src/browser/view-container.ts +21 -0
- package/src/browser/widget-decoration.ts +1 -1
- package/src/common/command.ts +1 -0
- package/src/common/glob.ts +5 -5
- package/src/common/i18n/nls.metadata.json +16592 -14032
- package/src/common/index.ts +1 -0
- package/src/common/objects.ts +48 -1
- package/src/common/path.ts +9 -9
- package/src/common/paths.ts +1 -1
- package/src/common/severity.ts +1 -1
- package/src/common/telemetry.ts +45 -0
- package/src/electron-browser/menu/electron-main-menu-factory.ts +10 -3
- package/src/node/backend-application-module.ts +3 -0
- package/src/node/filesystem-locking.ts +77 -0
- package/src/node/index.ts +1 -0
- package/src/node/messaging/ipc-connection-provider.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ipc-connection-provider.js","sourceRoot":"","sources":["../../../src/node/messaging/ipc-connection-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,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;gBACD,IAAI,YAAY,CAAC,aAAa,EAAE,EAAE;oBAC9B,YAAY,CAAC,OAAO,EAAE,CAAC;oBACvB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;iBACjD;YACL,CAAC,CAAC,CAAC;SACN;QACD,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClB,OAAO,MAAM,CAAC;IAClB,CAAC;IAES,IAAI,CAAC,OAAqC;QAChD,MAAM,WAAW,GAAmB;YAChC,GAAG,EAAE,IAAA,2BAAY,EAAC,OAAO,CAAC;YAC1B,QAAQ,EAAE,EAAE;YACZ,uEAAuE;YACvE,gEAAgE;YAChE,+FAA+F;YAC/F,wEAAwE;YACxE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAsB,CAAC;SACjE,CAAC;QACF,MAAM,gBAAgB,GAAG,KAAK,OAAO,CAAC,UAAU,UAAU,CAAC;QAC3D,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAC1E,IAAI,UAAU,KAAK,SAAS,EAAE;YAC1B,WAAW,CAAC,QAAQ,GAAG,CAAC,UAAU,EAAE,YAAY,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"ipc-connection-provider.js","sourceRoot":"","sources":["../../../src/node/messaging/ipc-connection-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;;;;;;;;;;AAEhF,oCAAoC;AACpC,yCAA+C;AAC/C,6BA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AAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,YAAY,CAAC,GAAG,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;QAEpI,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,YAAY,CAAC,GAAG,eAAe,CAAC,CAAC;QAC9E,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,YAAY,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;QAE9G,OAAO,YAAY,CAAC;IACxB,CAAC;CAEJ,CAAA;AAjEG;IADC,IAAA,kBAAM,EAAC,gBAAO,CAAC;;qDACmB;AAH1B,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CAoEjC;AApEY,sDAAqB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/core",
|
|
3
|
-
"version": "1.38.0
|
|
3
|
+
"version": "1.38.0",
|
|
4
4
|
"description": "Theia is a cloud & desktop IDE framework implemented in TypeScript.",
|
|
5
5
|
"main": "lib/common/index.js",
|
|
6
6
|
"typings": "lib/common/index.d.ts",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"@phosphor/signaling": "1",
|
|
17
17
|
"@phosphor/virtualdom": "1",
|
|
18
18
|
"@phosphor/widgets": "1",
|
|
19
|
-
"@theia/application-package": "1.38.0
|
|
20
|
-
"@theia/request": "1.38.0
|
|
19
|
+
"@theia/application-package": "1.38.0",
|
|
20
|
+
"@theia/request": "1.38.0",
|
|
21
21
|
"@types/body-parser": "^1.16.4",
|
|
22
22
|
"@types/cookie": "^0.3.3",
|
|
23
23
|
"@types/dompurify": "^2.2.2",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@types/yargs": "^15",
|
|
35
35
|
"@vscode/codicons": "*",
|
|
36
36
|
"ajv": "^6.5.3",
|
|
37
|
+
"async-mutex": "^0.4.0",
|
|
37
38
|
"body-parser": "^1.17.2",
|
|
38
39
|
"cookie": "^0.4.0",
|
|
39
40
|
"dompurify": "^2.2.9",
|
|
@@ -198,12 +199,12 @@
|
|
|
198
199
|
"watch": "theiaext watch"
|
|
199
200
|
},
|
|
200
201
|
"devDependencies": {
|
|
201
|
-
"@theia/ext-scripts": "1.
|
|
202
|
-
"@theia/re-exports": "1.
|
|
202
|
+
"@theia/ext-scripts": "1.38.0",
|
|
203
|
+
"@theia/re-exports": "1.38.0",
|
|
203
204
|
"minimist": "^1.2.0"
|
|
204
205
|
},
|
|
205
206
|
"nyc": {
|
|
206
207
|
"extends": "../../configs/nyc.json"
|
|
207
208
|
},
|
|
208
|
-
"gitHead": "
|
|
209
|
+
"gitHead": "c9b01e0eb9ad26b821b145e276cb474999614954"
|
|
209
210
|
}
|
|
@@ -695,7 +695,7 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
|
|
|
695
695
|
|
|
696
696
|
registry.registerMenuAction(CommonMenus.FILE_NEW, {
|
|
697
697
|
commandId: CommonCommands.NEW_UNTITLED_FILE.id,
|
|
698
|
-
label: nls.localizeByDefault('New File'),
|
|
698
|
+
label: nls.localizeByDefault('New File...'),
|
|
699
699
|
order: 'a'
|
|
700
700
|
});
|
|
701
701
|
}
|
|
@@ -1180,8 +1180,8 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
|
|
|
1180
1180
|
protected async confirmRestart(languageName: string): Promise<boolean> {
|
|
1181
1181
|
const appName = FrontendApplicationConfigProvider.get().applicationName;
|
|
1182
1182
|
const shouldRestart = await new ConfirmDialog({
|
|
1183
|
-
title: nls.localizeByDefault('
|
|
1184
|
-
msg: nls.localizeByDefault('To change the display language
|
|
1183
|
+
title: nls.localizeByDefault('Restart {0} to switch to {1}?', appName, languageName),
|
|
1184
|
+
msg: nls.localizeByDefault('To change the display language to {0}, {1} needs to restart.', languageName, appName),
|
|
1185
1185
|
ok: nls.localizeByDefault('Restart'),
|
|
1186
1186
|
cancel: Dialog.CANCEL,
|
|
1187
1187
|
}).open();
|
|
@@ -182,12 +182,19 @@ export class TabbarStylingParticipant implements StylingParticipant {
|
|
|
182
182
|
|
|
183
183
|
if (highContrast && focusBorder) {
|
|
184
184
|
collector.addRule(`
|
|
185
|
+
#theia-bottom-content-panel .p-TabBar .p-TabBar-tab,
|
|
185
186
|
#theia-main-content-panel .p-TabBar .p-TabBar-tab {
|
|
186
187
|
outline-offset: -4px;
|
|
187
188
|
}
|
|
189
|
+
#theia-bottom-content-panel .p-TabBar .p-TabBar-tab.p-mod-current,
|
|
188
190
|
#theia-main-content-panel .p-TabBar .p-TabBar-tab.p-mod-current {
|
|
189
191
|
outline: 1px solid ${focusBorder};
|
|
190
192
|
}
|
|
193
|
+
#theia-bottom-content-panel .p-TabBar:not(.theia-tabBar-active) .p-TabBar-tab.p-mod-current,
|
|
194
|
+
#theia-main-content-panel .p-TabBar:not(.theia-tabBar-active) .p-TabBar-tab.p-mod-current {
|
|
195
|
+
outline: 1px dotted ${focusBorder};
|
|
196
|
+
}
|
|
197
|
+
#theia-bottom-content-panel .p-TabBar .p-TabBar-tab:not(.p-mod-current):hover,
|
|
191
198
|
#theia-main-content-panel .p-TabBar .p-TabBar-tab:not(.p-mod-current):hover {
|
|
192
199
|
outline: 1px dashed ${focusBorder};
|
|
193
200
|
}
|
|
@@ -237,6 +244,19 @@ export class TabbarStylingParticipant implements StylingParticipant {
|
|
|
237
244
|
`);
|
|
238
245
|
}
|
|
239
246
|
|
|
247
|
+
// Activity Bar Active Border
|
|
248
|
+
const activityBarActiveBorder = theme.getColor('activityBar.activeBorder') || 'var(--theia-activityBar-foreground)';
|
|
249
|
+
collector.addRule(`
|
|
250
|
+
.p-TabBar.theia-app-left .p-TabBar-tab.p-mod-current {
|
|
251
|
+
border-top-color: transparent;
|
|
252
|
+
box-shadow: 2px 0 0 ${activityBarActiveBorder} inset;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.p-TabBar.theia-app-right .p-TabBar-tab.p-mod-current {
|
|
256
|
+
border-top-color: transparent;
|
|
257
|
+
box-shadow: -2px 0 0 ${activityBarActiveBorder} inset;
|
|
258
|
+
}
|
|
259
|
+
`);
|
|
240
260
|
// Hover Background
|
|
241
261
|
const tabHoverBackground = theme.getColor('tab.hoverBackground');
|
|
242
262
|
if (tabHoverBackground) {
|
|
@@ -175,7 +175,7 @@ export const corePreferenceSchema: PreferenceSchema = {
|
|
|
175
175
|
},
|
|
176
176
|
'workbench.editor.revealIfOpen': {
|
|
177
177
|
'type': 'boolean',
|
|
178
|
-
'description': nls.localizeByDefault('Controls whether an editor is revealed in any of the visible groups if opened. If disabled, an editor will prefer to open in the currently active editor group. If enabled, an already opened editor will be revealed instead of opened again in the currently active editor group. Note that there are some cases where this setting is ignored,
|
|
178
|
+
'description': nls.localizeByDefault('Controls whether an editor is revealed in any of the visible groups if opened. If disabled, an editor will prefer to open in the currently active editor group. If enabled, an already opened editor will be revealed instead of opened again in the currently active editor group. Note that there are some cases where this setting is ignored, such as when forcing an editor to open in a specific group or to the side of the currently active group.'),
|
|
179
179
|
'default': false
|
|
180
180
|
},
|
|
181
181
|
'workbench.commandPalette.history': {
|
package/src/browser/endpoint.ts
CHANGED
|
@@ -47,7 +47,7 @@ export class Endpoint {
|
|
|
47
47
|
return '';
|
|
48
48
|
}
|
|
49
49
|
if (this.location.pathname.endsWith('/')) {
|
|
50
|
-
return this.location.pathname.
|
|
50
|
+
return this.location.pathname.substring(0, this.location.pathname.length - 1);
|
|
51
51
|
}
|
|
52
52
|
return this.location.pathname;
|
|
53
53
|
}
|
|
@@ -75,10 +75,10 @@ export class Endpoint {
|
|
|
75
75
|
if (!search) {
|
|
76
76
|
return defaultValue;
|
|
77
77
|
}
|
|
78
|
-
return search.
|
|
78
|
+
return search.substring(1).split('&')
|
|
79
79
|
.filter(value => value.startsWith(name + '='))
|
|
80
80
|
.map(value => {
|
|
81
|
-
const encoded = value.
|
|
81
|
+
const encoded = value.substring(name.length + 1);
|
|
82
82
|
return decodeURIComponent(encoded);
|
|
83
83
|
})[0] || defaultValue;
|
|
84
84
|
}
|
|
@@ -620,7 +620,7 @@ export class KeybindingRegistry {
|
|
|
620
620
|
const { command, context, when, keybinding } = binding;
|
|
621
621
|
if (!this.isUsable(binding)) {
|
|
622
622
|
disabled = disabled || new Set<string>();
|
|
623
|
-
disabled.add(JSON.stringify({ command: command.
|
|
623
|
+
disabled.add(JSON.stringify({ command: command.substring(1), context, when, keybinding }));
|
|
624
624
|
return false;
|
|
625
625
|
}
|
|
626
626
|
return !disabled?.has(JSON.stringify({ command, context, when, keybinding }));
|
|
@@ -222,7 +222,7 @@ export class DefaultUriLabelProviderContribution implements LabelProviderContrib
|
|
|
222
222
|
|
|
223
223
|
// convert \c:\something => C:\something
|
|
224
224
|
if (formatting.normalizeDriveLetter && this.hasDriveLetter(label)) {
|
|
225
|
-
label = label.charAt(1).toUpperCase() + label.
|
|
225
|
+
label = label.charAt(1).toUpperCase() + label.substring(2);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
if (formatting.tildify) {
|
|
@@ -228,12 +228,12 @@ export function createPreferenceProxy<T>(preferences: PreferenceService, promise
|
|
|
228
228
|
if (p.startsWith(prefix)) {
|
|
229
229
|
const idx = p.indexOf('.', prefix.length);
|
|
230
230
|
if (idx !== -1 && isDeep) {
|
|
231
|
-
const pre = p.
|
|
231
|
+
const pre = p.substring(prefix.length, idx);
|
|
232
232
|
if (properties.indexOf(pre) === -1) {
|
|
233
233
|
properties.push(pre);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
const prop = p.
|
|
236
|
+
const prop = p.substring(prefix.length);
|
|
237
237
|
if (isFlat || prop.indexOf('.') === -1) {
|
|
238
238
|
properties.push(prop);
|
|
239
239
|
}
|
|
@@ -17,8 +17,9 @@ import { injectable, inject, optional } from 'inversify';
|
|
|
17
17
|
import { CommandRegistry, CommandContribution, MenuContribution, MenuModelRegistry, nls } from '../../common';
|
|
18
18
|
import { KeybindingRegistry, KeybindingContribution } from '../keybinding';
|
|
19
19
|
import { CommonMenus } from '../common-frontend-contribution';
|
|
20
|
-
import { CLEAR_COMMAND_HISTORY, quickCommand, QuickCommandService } from './quick-command-service';
|
|
20
|
+
import { CLOSE_QUICK_OPEN, CLEAR_COMMAND_HISTORY, quickCommand, QuickCommandService } from './quick-command-service';
|
|
21
21
|
import { QuickInputService } from './quick-input-service';
|
|
22
|
+
import { ConfirmDialog, Dialog } from '../dialogs';
|
|
22
23
|
|
|
23
24
|
@injectable()
|
|
24
25
|
export class QuickCommandFrontendContribution implements CommandContribution, KeybindingContribution, MenuContribution {
|
|
@@ -36,7 +37,20 @@ export class QuickCommandFrontendContribution implements CommandContribution, Ke
|
|
|
36
37
|
}
|
|
37
38
|
});
|
|
38
39
|
commands.registerCommand(CLEAR_COMMAND_HISTORY, {
|
|
39
|
-
execute: () =>
|
|
40
|
+
execute: async () => {
|
|
41
|
+
const shouldClear = await new ConfirmDialog({
|
|
42
|
+
title: nls.localizeByDefault('Clear Command History'),
|
|
43
|
+
msg: nls.localizeByDefault('Do you want to clear the history of recently used commands?'),
|
|
44
|
+
ok: nls.localizeByDefault('Clear'),
|
|
45
|
+
cancel: Dialog.CANCEL,
|
|
46
|
+
}).open();
|
|
47
|
+
if (shouldClear) {
|
|
48
|
+
commands.clearCommandHistory();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
commands.registerCommand(CLOSE_QUICK_OPEN, {
|
|
53
|
+
execute: () => this.quickInputService?.hide()
|
|
40
54
|
});
|
|
41
55
|
}
|
|
42
56
|
|
|
@@ -56,5 +70,15 @@ export class QuickCommandFrontendContribution implements CommandContribution, Ke
|
|
|
56
70
|
command: quickCommand.id,
|
|
57
71
|
keybinding: 'ctrlcmd+shift+p'
|
|
58
72
|
});
|
|
73
|
+
keybindings.registerKeybinding({
|
|
74
|
+
command: CLOSE_QUICK_OPEN.id,
|
|
75
|
+
keybinding: 'esc',
|
|
76
|
+
when: 'inQuickOpen'
|
|
77
|
+
});
|
|
78
|
+
keybindings.registerKeybinding({
|
|
79
|
+
command: CLOSE_QUICK_OPEN.id,
|
|
80
|
+
keybinding: 'shift+esc',
|
|
81
|
+
when: 'inQuickOpen'
|
|
82
|
+
});
|
|
59
83
|
}
|
|
60
84
|
}
|
|
@@ -33,6 +33,10 @@ export const CLEAR_COMMAND_HISTORY = Command.toDefaultLocalizedCommand({
|
|
|
33
33
|
label: 'Clear Command History'
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
+
export const CLOSE_QUICK_OPEN: Command = {
|
|
37
|
+
id: 'workbench.action.closeQuickOpen'
|
|
38
|
+
};
|
|
39
|
+
|
|
36
40
|
@injectable()
|
|
37
41
|
export class QuickCommandService implements QuickAccessContribution, QuickAccessProvider {
|
|
38
42
|
static PREFIX = '>';
|
|
@@ -43,6 +43,7 @@ export class TabBarToolbar extends ReactWidget {
|
|
|
43
43
|
protected more = new Map<string, TabBarToolbarItem>();
|
|
44
44
|
|
|
45
45
|
protected contextKeyListener: Disposable | undefined;
|
|
46
|
+
protected toDisposeOnUpdateItems: DisposableCollection = new DisposableCollection();
|
|
46
47
|
|
|
47
48
|
@inject(CommandRegistry) protected readonly commands: CommandRegistry;
|
|
48
49
|
@inject(LabelParser) protected readonly labelParser: LabelParser;
|
|
@@ -59,11 +60,20 @@ export class TabBarToolbar extends ReactWidget {
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
updateItems(items: Array<TabBarToolbarItem | ReactTabBarToolbarItem>, current: Widget | undefined): void {
|
|
63
|
+
this.toDisposeOnUpdateItems.dispose();
|
|
64
|
+
this.toDisposeOnUpdateItems = new DisposableCollection();
|
|
62
65
|
this.inline.clear();
|
|
63
66
|
this.more.clear();
|
|
64
67
|
|
|
65
68
|
const contextKeys = new Set<string>();
|
|
66
69
|
for (const item of items.sort(TabBarToolbarItem.PRIORITY_COMPARATOR).reverse()) {
|
|
70
|
+
if ('command' in item) {
|
|
71
|
+
this.commands.getAllHandlers(item.command).forEach(handler => {
|
|
72
|
+
if (handler.onDidChangeEnabled) {
|
|
73
|
+
this.toDisposeOnUpdateItems.push(handler.onDidChangeEnabled(() => this.update()));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
67
77
|
if ('render' in item || item.group === undefined || item.group === 'navigation') {
|
|
68
78
|
this.inline.set(item.id, item);
|
|
69
79
|
} else {
|
|
@@ -149,7 +159,6 @@ export class TabBarToolbar extends ReactWidget {
|
|
|
149
159
|
const tooltip = item.tooltip || (command && command.label);
|
|
150
160
|
|
|
151
161
|
const toolbarItemClassNames = this.getToolbarItemClassNames(item);
|
|
152
|
-
if (item.menuPath && !item.command) { toolbarItemClassNames.push('enabled'); }
|
|
153
162
|
return <div key={item.id}
|
|
154
163
|
className={toolbarItemClassNames.join(' ')}
|
|
155
164
|
onMouseDown={this.onMouseDownEvent}
|
|
@@ -162,10 +171,18 @@ export class TabBarToolbar extends ReactWidget {
|
|
|
162
171
|
</div>;
|
|
163
172
|
}
|
|
164
173
|
|
|
174
|
+
protected isEnabled(item: AnyToolbarItem): boolean {
|
|
175
|
+
if (!!item.command) {
|
|
176
|
+
return this.commandIsEnabled(item.command) && this.evaluateWhenClause(item.when);
|
|
177
|
+
} else {
|
|
178
|
+
return !!item.menuPath;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
165
182
|
protected getToolbarItemClassNames(item: AnyToolbarItem): string[] {
|
|
166
183
|
const classNames = [TabBarToolbar.Styles.TAB_BAR_TOOLBAR_ITEM];
|
|
167
184
|
if (item.command) {
|
|
168
|
-
if (this.
|
|
185
|
+
if (this.isEnabled(item)) {
|
|
169
186
|
classNames.push('enabled');
|
|
170
187
|
}
|
|
171
188
|
if (this.commandIsToggled(item.command)) {
|
|
@@ -254,15 +271,15 @@ export class TabBarToolbar extends ReactWidget {
|
|
|
254
271
|
|
|
255
272
|
const item: AnyToolbarItem | undefined = this.inline.get(e.currentTarget.id);
|
|
256
273
|
|
|
257
|
-
if (!this.
|
|
274
|
+
if (!item || !this.isEnabled(item)) {
|
|
258
275
|
return;
|
|
259
276
|
}
|
|
260
277
|
|
|
261
|
-
if (item
|
|
278
|
+
if (item.command && item.menuPath) {
|
|
262
279
|
this.menuCommandExecutor.executeCommand(item.menuPath, item.command, this.current);
|
|
263
|
-
} else if (item
|
|
280
|
+
} else if (item.command) {
|
|
264
281
|
this.commands.executeCommand(item.command, this.current);
|
|
265
|
-
} else if (item
|
|
282
|
+
} else if (item.menuPath) {
|
|
266
283
|
this.renderMoreContextMenu(this.toAnchor(e), item.menuPath);
|
|
267
284
|
}
|
|
268
285
|
this.update();
|
|
@@ -67,7 +67,7 @@ export class SearchBoxDebounce implements Disposable {
|
|
|
67
67
|
this.state = input;
|
|
68
68
|
} else {
|
|
69
69
|
if (input === '\b') {
|
|
70
|
-
this.state = this.state.length === 1 ? '' : this.state.
|
|
70
|
+
this.state = this.state.length === 1 ? '' : this.state.substring(0, this.state.length - 1);
|
|
71
71
|
} else {
|
|
72
72
|
this.state += input;
|
|
73
73
|
}
|
|
@@ -76,6 +76,20 @@ export namespace BadgeWidget {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* A widget that may change it's internal structure dynamically.
|
|
81
|
+
* Current use is to update the toolbar when a contributed view is constructed "lazily".
|
|
82
|
+
*/
|
|
83
|
+
export interface DynamicToolbarWidget {
|
|
84
|
+
onDidChangeToolbarItems: CommonEvent<void>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export namespace DynamicToolbarWidget {
|
|
88
|
+
export function is(arg: unknown): arg is DynamicToolbarWidget {
|
|
89
|
+
return isObject(arg) && 'onDidChangeToolbarItems' in arg;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
79
93
|
/**
|
|
80
94
|
* A view container holds an arbitrary number of widgets inside a split panel.
|
|
81
95
|
* Each widget is wrapped in a _part_ that displays the widget title and toolbar
|
|
@@ -970,6 +984,13 @@ export class ViewContainerPart extends BaseWidget {
|
|
|
970
984
|
this.wrapped.onDidChangeBadgeTooltip(() => this.onDidChangeBadgeTooltipEmitter.fire(), undefined, this.toDispose);
|
|
971
985
|
}
|
|
972
986
|
|
|
987
|
+
if (DynamicToolbarWidget.is(this.wrapped)) {
|
|
988
|
+
this.wrapped.onDidChangeToolbarItems(() => {
|
|
989
|
+
this.toolbar.updateTarget(this.wrapped);
|
|
990
|
+
this.viewContainer?.update();
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
|
|
973
994
|
const { header, body, disposable } = this.createContent();
|
|
974
995
|
this.header = header;
|
|
975
996
|
this.body = body;
|
|
@@ -284,7 +284,7 @@ export namespace WidgetDecoration {
|
|
|
284
284
|
result.push({ data });
|
|
285
285
|
}
|
|
286
286
|
const { length } = ranges.splice(containerIndex, 1).shift()!;
|
|
287
|
-
result.push({ data: caption.
|
|
287
|
+
result.push({ data: caption.substring(i, i + length), highlight: true });
|
|
288
288
|
data = '';
|
|
289
289
|
i = i + length - 1;
|
|
290
290
|
}
|
package/src/common/command.ts
CHANGED
|
@@ -122,6 +122,7 @@ export interface CommandHandler {
|
|
|
122
122
|
*/
|
|
123
123
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
124
124
|
isEnabled?(...args: any[]): boolean;
|
|
125
|
+
onDidChangeEnabled?: Event<void>;
|
|
125
126
|
/**
|
|
126
127
|
* Test whether menu items for this handler should be visible.
|
|
127
128
|
*/
|
package/src/common/glob.ts
CHANGED
|
@@ -329,7 +329,7 @@ function parsePattern(arg1: string | IRelativePattern, options: IGlobOptions): P
|
|
|
329
329
|
// Check for Trivias
|
|
330
330
|
let match: RegExpExecArray;
|
|
331
331
|
if (T1.test(pattern)) { // common pattern: **/*.txt just need endsWith check
|
|
332
|
-
const base = pattern.
|
|
332
|
+
const base = pattern.substring(4); // '**/*'.length === 4
|
|
333
333
|
parsedPattern = function (path, basename): string {
|
|
334
334
|
return path && strings.endsWith(path, base) ? pattern : null!;
|
|
335
335
|
};
|
|
@@ -338,7 +338,7 @@ function parsePattern(arg1: string | IRelativePattern, options: IGlobOptions): P
|
|
|
338
338
|
} else if ((options.trimForExclusions ? T3_2 : T3).test(pattern)) { // repetition of common patterns (see above) {**/*.txt,**/*.png}
|
|
339
339
|
parsedPattern = trivia3(pattern, options);
|
|
340
340
|
} else if (match = T4.exec(trimForExclusions(pattern, options))!) { // common pattern: **/something/else just need endsWith check
|
|
341
|
-
parsedPattern = trivia4and5(match[1].
|
|
341
|
+
parsedPattern = trivia4and5(match[1].substring(1), pattern, true);
|
|
342
342
|
} else if (match = T5.exec(trimForExclusions(pattern, options))!) { // common pattern: something/else just need equals check
|
|
343
343
|
parsedPattern = trivia4and5(match[1], pattern, false);
|
|
344
344
|
}
|
|
@@ -370,7 +370,7 @@ function wrapRelativePattern(parsedPattern: ParsedStringPattern, arg2: string |
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
function trimForExclusions(pattern: string, options: IGlobOptions): string {
|
|
373
|
-
return options.trimForExclusions && strings.endsWith(pattern, '/**') ? pattern.
|
|
373
|
+
return options.trimForExclusions && strings.endsWith(pattern, '/**') ? pattern.substring(0, pattern.length - 2) : pattern; // dropping **, tailing / is dropped later
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
// common pattern: **/some.txt just need basename check
|
|
@@ -632,7 +632,7 @@ function parsedExpression(expression: IExpression, options: IGlobOptions): Parse
|
|
|
632
632
|
basename = paths.basename(path);
|
|
633
633
|
}
|
|
634
634
|
if (!name) {
|
|
635
|
-
name = basename.
|
|
635
|
+
name = basename.substring(0, basename.length - paths.extname(path).length);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
const result = parsedPattern(path, basename, name, hasSibling!);
|
|
@@ -726,7 +726,7 @@ function aggregateBasenameMatches(parsedPatterns: (ParsedStringPattern | ParsedE
|
|
|
726
726
|
break;
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
|
-
basename = path.
|
|
729
|
+
basename = path.substring(i);
|
|
730
730
|
}
|
|
731
731
|
const index = basenames.indexOf(basename);
|
|
732
732
|
return index !== -1 ? patterns[index] : null!;
|