@codingame/monaco-vscode-configuration-service-override 4.5.1 → 4.5.2
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 +3 -3
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +89 -188
- package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.js +33 -43
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +120 -113
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +103 -142
- package/vscode/src/vs/workbench/services/label/common/labelService.js +39 -63
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +39 -48
|
@@ -19,6 +19,7 @@ import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/cont
|
|
|
19
19
|
import { TEXT_FILE_EDITOR_ID } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
|
|
20
20
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
21
21
|
|
|
22
|
+
const _moduleId = "vs/workbench/contrib/workspaces/browser/workspaces.contribution";
|
|
22
23
|
let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Disposable {
|
|
23
24
|
constructor(contextService, notificationService, fileService, quickInputService, hostService, storageService) {
|
|
24
25
|
super();
|
|
@@ -47,15 +48,14 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
47
48
|
const neverShowAgain = { id: 'workspaces.dontPromptToOpen', scope: NeverShowAgainScope.WORKSPACE, isSecondary: true };
|
|
48
49
|
if (workspaces.length === 1) {
|
|
49
50
|
const workspaceFile = workspaces[0];
|
|
50
|
-
this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
)),
|
|
51
|
+
this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
|
|
52
|
+
_moduleId,
|
|
53
|
+
0,
|
|
54
|
+
"This folder contains a workspace file '{0}'. Do you want to open it? [Learn more]({1}) about workspace files.",
|
|
55
|
+
workspaceFile,
|
|
56
|
+
'https://go.microsoft.com/fwlink/?linkid=2025315'
|
|
57
|
+
)), [{
|
|
58
|
+
label: ( localizeWithPath(_moduleId, 1, "Open Workspace")),
|
|
59
59
|
run: () => this.hostService.openWindow([{ workspaceUri: joinPath(folder, workspaceFile) }])
|
|
60
60
|
}], {
|
|
61
61
|
neverShowAgain,
|
|
@@ -63,21 +63,15 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
else if (workspaces.length > 1) {
|
|
66
|
-
this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"Select Workspace"
|
|
74
|
-
)),
|
|
66
|
+
this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
|
|
67
|
+
_moduleId,
|
|
68
|
+
2,
|
|
69
|
+
"This folder contains multiple workspace files. Do you want to open one? [Learn more]({0}) about workspace files.",
|
|
70
|
+
'https://go.microsoft.com/fwlink/?linkid=2025315'
|
|
71
|
+
)), [{
|
|
72
|
+
label: ( localizeWithPath(_moduleId, 3, "Select Workspace")),
|
|
75
73
|
run: () => {
|
|
76
|
-
this.quickInputService.pick(( workspaces.map(workspace => ({ label: workspace }))), { placeHolder: ( localizeWithPath(
|
|
77
|
-
'vs/workbench/contrib/workspaces/browser/workspaces.contribution',
|
|
78
|
-
'selectToOpen',
|
|
79
|
-
"Select a workspace to open"
|
|
80
|
-
)) }).then(pick => {
|
|
74
|
+
this.quickInputService.pick(( (workspaces.map(workspace => ({ label: workspace })))), { placeHolder: ( localizeWithPath(_moduleId, 4, "Select a workspace to open")) }).then(pick => {
|
|
81
75
|
if (pick) {
|
|
82
76
|
this.hostService.openWindow([{ workspaceUri: joinPath(folder, pick.label) }]);
|
|
83
77
|
}
|
|
@@ -90,28 +84,28 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
90
84
|
}
|
|
91
85
|
}
|
|
92
86
|
};
|
|
93
|
-
WorkspacesFinderContribution = ( __decorate([
|
|
94
|
-
( __param(0, IWorkspaceContextService)),
|
|
95
|
-
( __param(1, INotificationService)),
|
|
96
|
-
( __param(2, IFileService)),
|
|
97
|
-
( __param(3, IQuickInputService)),
|
|
98
|
-
( __param(4, IHostService)),
|
|
99
|
-
( __param(5, IStorageService))
|
|
100
|
-
], WorkspacesFinderContribution));
|
|
101
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(WorkspacesFinderContribution, 4 );
|
|
87
|
+
WorkspacesFinderContribution = ( (__decorate([
|
|
88
|
+
( (__param(0, IWorkspaceContextService))),
|
|
89
|
+
( (__param(1, INotificationService))),
|
|
90
|
+
( (__param(2, IFileService))),
|
|
91
|
+
( (__param(3, IQuickInputService))),
|
|
92
|
+
( (__param(4, IHostService))),
|
|
93
|
+
( (__param(5, IStorageService)))
|
|
94
|
+
], WorkspacesFinderContribution)));
|
|
95
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(WorkspacesFinderContribution, 4 );
|
|
102
96
|
registerAction2(class extends Action2 {
|
|
103
97
|
constructor() {
|
|
104
98
|
super({
|
|
105
99
|
id: 'workbench.action.openWorkspaceFromEditor',
|
|
106
|
-
title: ( localize2WithPath(
|
|
107
|
-
'vs/workbench/contrib/workspaces/browser/workspaces.contribution',
|
|
108
|
-
'openWorkspace',
|
|
109
|
-
"Open Workspace"
|
|
110
|
-
)),
|
|
100
|
+
title: ( localize2WithPath(_moduleId, 1, "Open Workspace")),
|
|
111
101
|
f1: false,
|
|
112
102
|
menu: {
|
|
113
103
|
id: MenuId.EditorContent,
|
|
114
|
-
when: ( ContextKeyExpr.and(
|
|
104
|
+
when: ( (ContextKeyExpr.and(
|
|
105
|
+
(ResourceContextKey.Extension.isEqualTo(WORKSPACE_SUFFIX)),
|
|
106
|
+
(ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)),
|
|
107
|
+
(TemporaryWorkspaceContext.toNegated())
|
|
108
|
+
)))
|
|
115
109
|
}
|
|
116
110
|
});
|
|
117
111
|
}
|
|
@@ -122,11 +116,7 @@ registerAction2(class extends Action2 {
|
|
|
122
116
|
if (contextService.getWorkbenchState() === 3 ) {
|
|
123
117
|
const workspaceConfiguration = contextService.getWorkspace().configuration;
|
|
124
118
|
if (workspaceConfiguration && isEqual(workspaceConfiguration, uri)) {
|
|
125
|
-
notificationService.info(( localizeWithPath(
|
|
126
|
-
'vs/workbench/contrib/workspaces/browser/workspaces.contribution',
|
|
127
|
-
'alreadyOpen',
|
|
128
|
-
"This workspace is already open."
|
|
129
|
-
)));
|
|
119
|
+
notificationService.info(( localizeWithPath(_moduleId, 5, "This workspace is already open.")));
|
|
130
120
|
return;
|
|
131
121
|
}
|
|
132
122
|
}
|