@codingame/monaco-vscode-base-service-override 8.0.4 → 9.0.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/package.json +2 -2
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +1 -1
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +1 -1
- package/vscode/src/vs/workbench/services/label/common/labelService.js +13 -13
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +10 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-base-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@9.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -107,7 +107,7 @@ let JSONEditingService = class JSONEditingService {
|
|
|
107
107
|
switch (error) {
|
|
108
108
|
case JSONEditingErrorCode.ERROR_INVALID_FILE: {
|
|
109
109
|
return ( localize(
|
|
110
|
-
|
|
110
|
+
1026,
|
|
111
111
|
"Unable to write into the file. Please open the file to correct errors/warnings in the file and try again."
|
|
112
112
|
));
|
|
113
113
|
}
|
|
@@ -159,7 +159,7 @@ class DecorationStyles {
|
|
|
159
159
|
const strikethrough = ( (data.some(d => d.strikethrough)));
|
|
160
160
|
if (onlyChildren) {
|
|
161
161
|
badgeClassName = rule.bubbleBadgeClassName;
|
|
162
|
-
tooltip = ( localize(
|
|
162
|
+
tooltip = ( localize(1027, "Contains emphasized items"));
|
|
163
163
|
}
|
|
164
164
|
return {
|
|
165
165
|
labelClassName,
|
|
@@ -31,7 +31,7 @@ import { firstOrDefault } from 'vscode/vscode/vs/base/common/arrays';
|
|
|
31
31
|
const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
32
32
|
extensionPoint: 'resourceLabelFormatters',
|
|
33
33
|
jsonSchema: {
|
|
34
|
-
description: ( localize(
|
|
34
|
+
description: ( localize(1028, 'Contributes resource label formatting rules.')),
|
|
35
35
|
type: 'array',
|
|
36
36
|
items: {
|
|
37
37
|
type: 'object',
|
|
@@ -40,52 +40,52 @@ const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoin
|
|
|
40
40
|
scheme: {
|
|
41
41
|
type: 'string',
|
|
42
42
|
description: ( localize(
|
|
43
|
-
|
|
43
|
+
1029,
|
|
44
44
|
'URI scheme on which to match the formatter on. For example "file". Simple glob patterns are supported.'
|
|
45
45
|
)),
|
|
46
46
|
},
|
|
47
47
|
authority: {
|
|
48
48
|
type: 'string',
|
|
49
49
|
description: ( localize(
|
|
50
|
-
|
|
50
|
+
1030,
|
|
51
51
|
'URI authority on which to match the formatter on. Simple glob patterns are supported.'
|
|
52
52
|
)),
|
|
53
53
|
},
|
|
54
54
|
formatting: {
|
|
55
|
-
description: ( localize(
|
|
55
|
+
description: ( localize(1031, "Rules for formatting uri resource labels.")),
|
|
56
56
|
type: 'object',
|
|
57
57
|
properties: {
|
|
58
58
|
label: {
|
|
59
59
|
type: 'string',
|
|
60
60
|
description: ( localize(
|
|
61
|
-
|
|
61
|
+
1032,
|
|
62
62
|
"Label rules to display. For example: myLabel:/${path}. ${path}, ${scheme}, ${authority} and ${authoritySuffix} are supported as variables."
|
|
63
63
|
))
|
|
64
64
|
},
|
|
65
65
|
separator: {
|
|
66
66
|
type: 'string',
|
|
67
67
|
description: ( localize(
|
|
68
|
-
|
|
68
|
+
1033,
|
|
69
69
|
"Separator to be used in the uri label display. '/' or '\' as an example."
|
|
70
70
|
))
|
|
71
71
|
},
|
|
72
72
|
stripPathStartingSeparator: {
|
|
73
73
|
type: 'boolean',
|
|
74
74
|
description: ( localize(
|
|
75
|
-
|
|
75
|
+
1034,
|
|
76
76
|
"Controls whether `${path}` substitutions should have starting separator characters stripped."
|
|
77
77
|
))
|
|
78
78
|
},
|
|
79
79
|
tildify: {
|
|
80
80
|
type: 'boolean',
|
|
81
81
|
description: ( localize(
|
|
82
|
-
|
|
82
|
+
1035,
|
|
83
83
|
"Controls if the start of the uri label should be tildified when possible."
|
|
84
84
|
))
|
|
85
85
|
},
|
|
86
86
|
workspaceSuffix: {
|
|
87
87
|
type: 'string',
|
|
88
|
-
description: ( localize(
|
|
88
|
+
description: ( localize(1036, "Suffix appended to the workspace label."))
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -264,10 +264,10 @@ let LabelService = class LabelService extends Disposable {
|
|
|
264
264
|
}
|
|
265
265
|
doGetWorkspaceLabel(workspaceUri, options) {
|
|
266
266
|
if (isUntitledWorkspace(workspaceUri, this.environmentService)) {
|
|
267
|
-
return ( localize(
|
|
267
|
+
return ( localize(1037, "Untitled (Workspace)"));
|
|
268
268
|
}
|
|
269
269
|
if (isTemporaryWorkspace(workspaceUri)) {
|
|
270
|
-
return ( localize(
|
|
270
|
+
return ( localize(1038, "Workspace"));
|
|
271
271
|
}
|
|
272
272
|
let filename = basename(workspaceUri);
|
|
273
273
|
if (filename.endsWith(WORKSPACE_EXTENSION)) {
|
|
@@ -280,14 +280,14 @@ let LabelService = class LabelService extends Disposable {
|
|
|
280
280
|
break;
|
|
281
281
|
case Verbosity.LONG:
|
|
282
282
|
label = ( localize(
|
|
283
|
-
|
|
283
|
+
1039,
|
|
284
284
|
"{0} (Workspace)",
|
|
285
285
|
this.getUriLabel(joinPath(dirname(workspaceUri), filename))
|
|
286
286
|
));
|
|
287
287
|
break;
|
|
288
288
|
case Verbosity.MEDIUM:
|
|
289
289
|
default:
|
|
290
|
-
label = ( localize(
|
|
290
|
+
label = ( localize(1040, "{0} (Workspace)", filename));
|
|
291
291
|
break;
|
|
292
292
|
}
|
|
293
293
|
if (options?.verbose === Verbosity.SHORT) {
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { RunOnceScheduler, runWhenGlobalIdle } from 'vscode/vscode/vs/base/common/async';
|
|
2
|
+
import { RunOnceScheduler, runWhenGlobalIdle, disposableTimeout } from 'vscode/vscode/vs/base/common/async';
|
|
3
3
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
|
-
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { Disposable, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
6
6
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
7
|
import { userActivityRegistry } from './userActivityRegistry.js';
|
|
8
8
|
|
|
9
|
+
const MARK_INACTIVE_DEBOUNCE = 10000;
|
|
9
10
|
let UserActivityService = class UserActivityService extends Disposable {
|
|
10
11
|
constructor(instantiationService) {
|
|
11
12
|
super();
|
|
12
13
|
this.markInactive = this._register(( new RunOnceScheduler(() => {
|
|
13
14
|
this.isActive = false;
|
|
14
15
|
this.changeEmitter.fire(false);
|
|
15
|
-
},
|
|
16
|
+
}, MARK_INACTIVE_DEBOUNCE)));
|
|
16
17
|
this.changeEmitter = this._register(( new Emitter()));
|
|
17
18
|
this.active = 0;
|
|
18
19
|
this.isActive = true;
|
|
19
20
|
this.onDidChangeIsActive = this.changeEmitter.event;
|
|
20
21
|
this._register(runWhenGlobalIdle(() => userActivityRegistry.take(this, instantiationService)));
|
|
21
22
|
}
|
|
22
|
-
markActive() {
|
|
23
|
+
markActive(opts) {
|
|
24
|
+
if (opts?.whenHeldFor) {
|
|
25
|
+
const store = ( new DisposableStore());
|
|
26
|
+
store.add(disposableTimeout(() => store.add(this.markActive()), opts.whenHeldFor));
|
|
27
|
+
return store;
|
|
28
|
+
}
|
|
23
29
|
if (++this.active === 1) {
|
|
24
30
|
this.isActive = true;
|
|
25
31
|
this.changeEmitter.fire(true);
|