@codingame/monaco-vscode-extension-gallery-service-override 1.83.9
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/extensionGallery.d.ts +12 -0
- package/extensionGallery.js +76 -0
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
- package/external/tslib/tslib.es6.js +11 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/override/vs/platform/dialogs/common/dialogs.js +8 -0
- package/package.json +30 -0
- package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js +784 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionEnablementService.js +142 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.js +855 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementIpc.js +119 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionTipsService.js +57 -0
- package/vscode/src/vs/platform/extensionManagement/common/unsupportedExtensionsMigration.js +58 -0
- package/vscode/src/vs/platform/externalServices/common/marketplace.js +17 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +492 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/browserRuntimeExtensionsEditor.js +28 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +78 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/deprecatedExtensionsChecker.js +87 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +60 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +1868 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.js +52 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +437 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendations.js +17 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.js +221 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +2063 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.web.contribution.js +13 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.js +46 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.js +65 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.js +98 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsList.js +224 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.js +121 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.js +285 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +912 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.js +1270 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.js +824 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +1730 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +324 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/keymapRecommendations.js +28 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/languageRecommendations.js +28 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extension.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionEditor.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionsViewlet.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionsWidgets.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/runtimeExtensionsEditor.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/remoteRecommendations.js +29 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/unsupportedExtensionsMigrationContribution.js +26 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +38 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +88 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionQuery.js +67 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +43 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +104 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/reportExtensionIssueAction.js +31 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +41 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +207 -0
- package/vscode/src/vs/workbench/contrib/update/common/update.js +3 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/builtinExtensionsScannerService.js +84 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js +634 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +883 -0
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementChannelClient.js +109 -0
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js +62 -0
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js +633 -0
- package/vscode/src/vs/workbench/services/extensionManagement/common/remoteExtensionManagementService.js +58 -0
- package/vscode/src/vs/workbench/services/extensionManagement/common/webExtensionManagementService.js +269 -0
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService.js +83 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteExtensionsScanner.js +73 -0
|
@@ -0,0 +1,2063 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
+
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
4
|
+
import { registerAction2, MenuRegistry, MenuId, Action2 } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
5
|
+
import { IExtensionManagementService, ExtensionsLocalizedLabel, PreferencesLocalizedLabel, IExtensionGalleryService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
6
|
+
import { IWorkbenchExtensionManagementService, IExtensionManagementServerService, IWorkbenchExtensionEnablementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
|
|
7
|
+
import { IExtensionIgnoredRecommendationsService } from 'vscode/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations';
|
|
8
|
+
import { Extensions as Extensions$3 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
9
|
+
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
10
|
+
import { VIEWLET_ID, IExtensionsWorkbenchService, CONTEXT_HAS_GALLERY, AutoUpdateConfigurationKey, HasOutdatedExtensionsContext, OUTDATED_EXTENSIONS_VIEW_ID, SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID, INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID, LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID, WORKSPACE_RECOMMENDATIONS_VIEW_ID, THEME_ACTIONS_GROUP, INSTALL_ACTIONS_GROUP, TOGGLE_IGNORE_EXTENSION_ACTION_ID } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensions';
|
|
11
|
+
import { SearchExtensionsAction, PromptExtensionInstallFailureAction, ConfigureWorkspaceFolderRecommendedExtensionsAction, InstallSpecificVersionOfExtensionAction, ReinstallAction, SetColorThemeAction, SetFileIconThemeAction, SetProductIconThemeAction, SwitchToPreReleaseVersionAction, SwitchToReleasedVersionAction, ClearLanguageAction, ConfigureWorkspaceRecommendedExtensionsAction } from 'vscode/vscode/vs/workbench/contrib/extensions/browser/extensionsActions';
|
|
12
|
+
import { ExtensionsInput } from '../common/extensionsInput.js';
|
|
13
|
+
import { ExtensionEditor } from './extensionEditor.js';
|
|
14
|
+
import { ExtensionsViewPaneContainer, StatusUpdater, MaliciousExtensionChecker, ExtensionsViewletViewsContribution, DefaultViewsContext, SearchHasTextContext } from './extensionsViewlet.js';
|
|
15
|
+
import { Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
|
|
16
|
+
import * as JSONContributionRegistry from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
17
|
+
import { ExtensionsConfigurationSchemaId, ExtensionsConfigurationSchema } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensionsFileTemplate';
|
|
18
|
+
import { CommandsRegistry, ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
19
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
20
|
+
import { KeymapExtensions } from '../common/extensionsUtils.js';
|
|
21
|
+
import { areSameExtensions, getIdAndVersion } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
22
|
+
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
23
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
24
|
+
import { ExtensionActivationProgress } from './extensionsActivationProgress.js';
|
|
25
|
+
import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
26
|
+
import { ExtensionDependencyChecker } from './extensionsDependencyChecker.js';
|
|
27
|
+
import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation.js';
|
|
28
|
+
import { Extensions as Extensions$1, IViewsService } from 'vscode/vscode/vs/workbench/common/views';
|
|
29
|
+
import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
|
|
30
|
+
import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences';
|
|
31
|
+
import { RawContextKey, ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
32
|
+
import { Extensions } from 'monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js';
|
|
33
|
+
import { ManageExtensionsQuickAccessProvider, InstallExtensionQuickAccessProvider } from './extensionsQuickAccess.js';
|
|
34
|
+
import { CONTEXT_SYNC_ENABLEMENT } from 'vscode/vscode/vs/workbench/services/userDataSync/common/userDataSync';
|
|
35
|
+
import { CopyAction, CutAction, PasteAction } from 'monaco-editor/esm/vs/editor/contrib/clipboard/browser/clipboard.js';
|
|
36
|
+
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
37
|
+
import { Categories } from 'monaco-editor/esm/vs/platform/action/common/actionCommonCategories.js';
|
|
38
|
+
import { IExtensionService, toExtensionDescription } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
39
|
+
import { INotificationService, Severity } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
40
|
+
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host';
|
|
41
|
+
import { WorkbenchStateContext, ResourceContextKey } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
42
|
+
import { IWorkspaceExtensionsConfigService } from 'vscode/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig';
|
|
43
|
+
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
44
|
+
import { ShowRuntimeExtensionsAction } from './abstractRuntimeExtensionsEditor.js';
|
|
45
|
+
import { ExtensionEnablementWorkspaceTrustTransitionParticipant } from './extensionEnablementWorkspaceTrustTransitionParticipant.js';
|
|
46
|
+
import { extensionsViewIcon, installWorkspaceRecommendedIcon, filterIcon, clearSearchResultsIcon, refreshIcon, configureRecommendedIcon } from 'vscode/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons';
|
|
47
|
+
import { Disposable, DisposableStore, isDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
48
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
49
|
+
import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
50
|
+
import { mnemonicButtonLabel } from 'monaco-editor/esm/vs/base/common/labels.js';
|
|
51
|
+
import { Promises } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
52
|
+
import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
53
|
+
import { WORKSPACE_TRUST_EXTENSION_SUPPORT } from 'vscode/vscode/vs/workbench/services/workspaces/common/workspaceTrust';
|
|
54
|
+
import { ExtensionsCompletionItemsProvider } from './extensionsCompletionItemsProvider.js';
|
|
55
|
+
import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
|
|
56
|
+
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
57
|
+
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite';
|
|
58
|
+
import { UnsupportedExtensionsMigrationContrib } from './unsupportedExtensionsMigrationContribution.js';
|
|
59
|
+
import { isWeb } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
60
|
+
import { ExtensionStorageService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionStorage';
|
|
61
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
62
|
+
import { CONTEXT_KEYBINDINGS_EDITOR } from 'vscode/vscode/vs/workbench/contrib/preferences/common/preferences';
|
|
63
|
+
import { DeprecatedExtensionsChecker } from './deprecatedExtensionsChecker.js';
|
|
64
|
+
import { IFileDialogService, IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
|
|
65
|
+
|
|
66
|
+
( Registry.as(Extensions.Quickaccess)).registerQuickAccessProvider({
|
|
67
|
+
ctor: ManageExtensionsQuickAccessProvider,
|
|
68
|
+
prefix: ManageExtensionsQuickAccessProvider.PREFIX,
|
|
69
|
+
placeholder: ( localizeWithPath(
|
|
70
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
71
|
+
'manageExtensionsQuickAccessPlaceholder',
|
|
72
|
+
"Press Enter to manage extensions."
|
|
73
|
+
)),
|
|
74
|
+
helpEntries: [{ description: ( localizeWithPath(
|
|
75
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
76
|
+
'manageExtensionsHelp',
|
|
77
|
+
"Manage Extensions"
|
|
78
|
+
)) }]
|
|
79
|
+
});
|
|
80
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(ExtensionEditor, ExtensionEditor.ID, ( localizeWithPath(
|
|
81
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
82
|
+
'extension',
|
|
83
|
+
"Extension"
|
|
84
|
+
))), [
|
|
85
|
+
( new SyncDescriptor(ExtensionsInput))
|
|
86
|
+
]);
|
|
87
|
+
( Registry.as(Extensions$1.ViewContainersRegistry)).registerViewContainer({
|
|
88
|
+
id: VIEWLET_ID,
|
|
89
|
+
title: { value: ( localizeWithPath(
|
|
90
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
91
|
+
'extensions',
|
|
92
|
+
"Extensions"
|
|
93
|
+
)), original: 'Extensions' },
|
|
94
|
+
openCommandActionDescriptor: {
|
|
95
|
+
id: VIEWLET_ID,
|
|
96
|
+
mnemonicTitle: ( localizeWithPath(
|
|
97
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
98
|
+
{ key: 'miViewExtensions', comment: ['&& denotes a mnemonic'] },
|
|
99
|
+
"E&&xtensions"
|
|
100
|
+
)),
|
|
101
|
+
keybindings: { primary: 2048 | 1024 | 54 },
|
|
102
|
+
order: 4,
|
|
103
|
+
},
|
|
104
|
+
ctorDescriptor: ( new SyncDescriptor(ExtensionsViewPaneContainer)),
|
|
105
|
+
icon: extensionsViewIcon,
|
|
106
|
+
order: 4,
|
|
107
|
+
rejectAddedViews: true,
|
|
108
|
+
alwaysUseContainerInfo: true,
|
|
109
|
+
}, 0 );
|
|
110
|
+
( Registry.as(Extensions$2.Configuration))
|
|
111
|
+
.registerConfiguration({
|
|
112
|
+
id: 'extensions',
|
|
113
|
+
order: 30,
|
|
114
|
+
title: ( localizeWithPath(
|
|
115
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
116
|
+
'extensionsConfigurationTitle',
|
|
117
|
+
"Extensions"
|
|
118
|
+
)),
|
|
119
|
+
type: 'object',
|
|
120
|
+
properties: {
|
|
121
|
+
'extensions.autoUpdate': {
|
|
122
|
+
enum: [true, 'onlyEnabledExtensions', false,],
|
|
123
|
+
enumItemLabels: [
|
|
124
|
+
( localizeWithPath(
|
|
125
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
126
|
+
'all',
|
|
127
|
+
"All Extensions"
|
|
128
|
+
)),
|
|
129
|
+
( localizeWithPath(
|
|
130
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
131
|
+
'enabled',
|
|
132
|
+
"Only Enabled Extensions"
|
|
133
|
+
)),
|
|
134
|
+
( localizeWithPath(
|
|
135
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
136
|
+
'none',
|
|
137
|
+
"None"
|
|
138
|
+
)),
|
|
139
|
+
],
|
|
140
|
+
enumDescriptions: [
|
|
141
|
+
( localizeWithPath(
|
|
142
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
143
|
+
'extensions.autoUpdate.true',
|
|
144
|
+
'Download and install updates automatically for all extensions except for those updates are ignored.'
|
|
145
|
+
)),
|
|
146
|
+
( localizeWithPath(
|
|
147
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
148
|
+
'extensions.autoUpdate.enabled',
|
|
149
|
+
'Download and install updates automatically only for enabled extensions except for those updates are ignored. Disabled extensions are not updated automatically.'
|
|
150
|
+
)),
|
|
151
|
+
( localizeWithPath(
|
|
152
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
153
|
+
'extensions.autoUpdate.false',
|
|
154
|
+
'Extensions are not automatically updated.'
|
|
155
|
+
)),
|
|
156
|
+
],
|
|
157
|
+
description: ( localizeWithPath(
|
|
158
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
159
|
+
'extensions.autoUpdate',
|
|
160
|
+
"Controls the automatic update behavior of extensions. The updates are fetched from a Microsoft online service."
|
|
161
|
+
)),
|
|
162
|
+
default: true,
|
|
163
|
+
scope: 1 ,
|
|
164
|
+
tags: ['usesOnlineServices']
|
|
165
|
+
},
|
|
166
|
+
'extensions.autoCheckUpdates': {
|
|
167
|
+
type: 'boolean',
|
|
168
|
+
description: ( localizeWithPath(
|
|
169
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
170
|
+
'extensionsCheckUpdates',
|
|
171
|
+
"When enabled, automatically checks extensions for updates. If an extension has an update, it is marked as outdated in the Extensions view. The updates are fetched from a Microsoft online service."
|
|
172
|
+
)),
|
|
173
|
+
default: true,
|
|
174
|
+
scope: 1 ,
|
|
175
|
+
tags: ['usesOnlineServices']
|
|
176
|
+
},
|
|
177
|
+
'extensions.ignoreRecommendations': {
|
|
178
|
+
type: 'boolean',
|
|
179
|
+
description: ( localizeWithPath(
|
|
180
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
181
|
+
'extensionsIgnoreRecommendations',
|
|
182
|
+
"When enabled, the notifications for extension recommendations will not be shown."
|
|
183
|
+
)),
|
|
184
|
+
default: false
|
|
185
|
+
},
|
|
186
|
+
'extensions.showRecommendationsOnlyOnDemand': {
|
|
187
|
+
type: 'boolean',
|
|
188
|
+
deprecationMessage: ( localizeWithPath(
|
|
189
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
190
|
+
'extensionsShowRecommendationsOnlyOnDemand_Deprecated',
|
|
191
|
+
"This setting is deprecated. Use extensions.ignoreRecommendations setting to control recommendation notifications. Use Extensions view's visibility actions to hide Recommended view by default."
|
|
192
|
+
)),
|
|
193
|
+
default: false,
|
|
194
|
+
tags: ['usesOnlineServices']
|
|
195
|
+
},
|
|
196
|
+
'extensions.closeExtensionDetailsOnViewChange': {
|
|
197
|
+
type: 'boolean',
|
|
198
|
+
description: ( localizeWithPath(
|
|
199
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
200
|
+
'extensionsCloseExtensionDetailsOnViewChange',
|
|
201
|
+
"When enabled, editors with extension details will be automatically closed upon navigating away from the Extensions View."
|
|
202
|
+
)),
|
|
203
|
+
default: false
|
|
204
|
+
},
|
|
205
|
+
'extensions.confirmedUriHandlerExtensionIds': {
|
|
206
|
+
type: 'array',
|
|
207
|
+
items: {
|
|
208
|
+
type: 'string'
|
|
209
|
+
},
|
|
210
|
+
description: ( localizeWithPath(
|
|
211
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
212
|
+
'handleUriConfirmedExtensions',
|
|
213
|
+
"When an extension is listed here, a confirmation prompt will not be shown when that extension handles a URI."
|
|
214
|
+
)),
|
|
215
|
+
default: [],
|
|
216
|
+
scope: 1
|
|
217
|
+
},
|
|
218
|
+
'extensions.webWorker': {
|
|
219
|
+
type: ['boolean', 'string'],
|
|
220
|
+
enum: [true, false, 'auto'],
|
|
221
|
+
enumDescriptions: [
|
|
222
|
+
( localizeWithPath(
|
|
223
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
224
|
+
'extensionsWebWorker.true',
|
|
225
|
+
"The Web Worker Extension Host will always be launched."
|
|
226
|
+
)),
|
|
227
|
+
( localizeWithPath(
|
|
228
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
229
|
+
'extensionsWebWorker.false',
|
|
230
|
+
"The Web Worker Extension Host will never be launched."
|
|
231
|
+
)),
|
|
232
|
+
( localizeWithPath(
|
|
233
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
234
|
+
'extensionsWebWorker.auto',
|
|
235
|
+
"The Web Worker Extension Host will be launched when a web extension needs it."
|
|
236
|
+
)),
|
|
237
|
+
],
|
|
238
|
+
description: ( localizeWithPath(
|
|
239
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
240
|
+
'extensionsWebWorker',
|
|
241
|
+
"Enable web worker extension host."
|
|
242
|
+
)),
|
|
243
|
+
default: 'auto'
|
|
244
|
+
},
|
|
245
|
+
'extensions.supportVirtualWorkspaces': {
|
|
246
|
+
type: 'object',
|
|
247
|
+
markdownDescription: ( localizeWithPath(
|
|
248
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
249
|
+
'extensions.supportVirtualWorkspaces',
|
|
250
|
+
"Override the virtual workspaces support of an extension."
|
|
251
|
+
)),
|
|
252
|
+
patternProperties: {
|
|
253
|
+
'([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$': {
|
|
254
|
+
type: 'boolean',
|
|
255
|
+
default: false
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
additionalProperties: false,
|
|
259
|
+
default: {},
|
|
260
|
+
defaultSnippets: [{
|
|
261
|
+
'body': {
|
|
262
|
+
'pub.name': false
|
|
263
|
+
}
|
|
264
|
+
}]
|
|
265
|
+
},
|
|
266
|
+
'extensions.experimental.affinity': {
|
|
267
|
+
type: 'object',
|
|
268
|
+
markdownDescription: ( localizeWithPath(
|
|
269
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
270
|
+
'extensions.affinity',
|
|
271
|
+
"Configure an extension to execute in a different extension host process."
|
|
272
|
+
)),
|
|
273
|
+
patternProperties: {
|
|
274
|
+
'([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$': {
|
|
275
|
+
type: 'integer',
|
|
276
|
+
default: 1
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
additionalProperties: false,
|
|
280
|
+
default: {},
|
|
281
|
+
defaultSnippets: [{
|
|
282
|
+
'body': {
|
|
283
|
+
'pub.name': 1
|
|
284
|
+
}
|
|
285
|
+
}]
|
|
286
|
+
},
|
|
287
|
+
[WORKSPACE_TRUST_EXTENSION_SUPPORT]: {
|
|
288
|
+
type: 'object',
|
|
289
|
+
scope: 1 ,
|
|
290
|
+
markdownDescription: ( localizeWithPath(
|
|
291
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
292
|
+
'extensions.supportUntrustedWorkspaces',
|
|
293
|
+
"Override the untrusted workspace support of an extension. Extensions using `true` will always be enabled. Extensions using `limited` will always be enabled, and the extension will hide functionality that requires trust. Extensions using `false` will only be enabled only when the workspace is trusted."
|
|
294
|
+
)),
|
|
295
|
+
patternProperties: {
|
|
296
|
+
'([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$': {
|
|
297
|
+
type: 'object',
|
|
298
|
+
properties: {
|
|
299
|
+
'supported': {
|
|
300
|
+
type: ['boolean', 'string'],
|
|
301
|
+
enum: [true, false, 'limited'],
|
|
302
|
+
enumDescriptions: [
|
|
303
|
+
( localizeWithPath(
|
|
304
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
305
|
+
'extensions.supportUntrustedWorkspaces.true',
|
|
306
|
+
"Extension will always be enabled."
|
|
307
|
+
)),
|
|
308
|
+
( localizeWithPath(
|
|
309
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
310
|
+
'extensions.supportUntrustedWorkspaces.false',
|
|
311
|
+
"Extension will only be enabled only when the workspace is trusted."
|
|
312
|
+
)),
|
|
313
|
+
( localizeWithPath(
|
|
314
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
315
|
+
'extensions.supportUntrustedWorkspaces.limited',
|
|
316
|
+
"Extension will always be enabled, and the extension will hide functionality requiring trust."
|
|
317
|
+
)),
|
|
318
|
+
],
|
|
319
|
+
description: ( localizeWithPath(
|
|
320
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
321
|
+
'extensions.supportUntrustedWorkspaces.supported',
|
|
322
|
+
"Defines the untrusted workspace support setting for the extension."
|
|
323
|
+
)),
|
|
324
|
+
},
|
|
325
|
+
'version': {
|
|
326
|
+
type: 'string',
|
|
327
|
+
description: ( localizeWithPath(
|
|
328
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
329
|
+
'extensions.supportUntrustedWorkspaces.version',
|
|
330
|
+
"Defines the version of the extension for which the override should be applied. If not specified, the override will be applied independent of the extension version."
|
|
331
|
+
)),
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
'extensions.experimental.deferredStartupFinishedActivation': {
|
|
338
|
+
type: 'boolean',
|
|
339
|
+
description: ( localizeWithPath(
|
|
340
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
341
|
+
'extensionsDeferredStartupFinishedActivation',
|
|
342
|
+
"When enabled, extensions which declare the `onStartupFinished` activation event will be activated after a timeout."
|
|
343
|
+
)),
|
|
344
|
+
default: false
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
const jsonRegistry = ( Registry.as(JSONContributionRegistry.Extensions.JSONContribution));
|
|
349
|
+
jsonRegistry.registerSchema(ExtensionsConfigurationSchemaId, ExtensionsConfigurationSchema);
|
|
350
|
+
CommandsRegistry.registerCommand('_extensions.manage', (accessor, extensionId, tab, preserveFocus) => {
|
|
351
|
+
const extensionService = accessor.get(IExtensionsWorkbenchService);
|
|
352
|
+
const extension = extensionService.local.find(e => areSameExtensions(e.identifier, { id: extensionId }));
|
|
353
|
+
if (extension) {
|
|
354
|
+
extensionService.open(extension, { tab, preserveFocus });
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
throw new Error(localizeWithPath('vs/workbench/contrib/extensions/browser/extensions.contribution', 'notFound', "Extension '{0}' not found.", extensionId));
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
CommandsRegistry.registerCommand('extension.open', async (accessor, extensionId, tab, preserveFocus) => {
|
|
361
|
+
const extensionService = accessor.get(IExtensionsWorkbenchService);
|
|
362
|
+
const commandService = accessor.get(ICommandService);
|
|
363
|
+
const [extension] = await extensionService.getExtensions([{ id: extensionId }], CancellationToken.None);
|
|
364
|
+
if (extension) {
|
|
365
|
+
return extensionService.open(extension, { tab, preserveFocus });
|
|
366
|
+
}
|
|
367
|
+
return commandService.executeCommand('_extensions.manage', extensionId, tab, preserveFocus);
|
|
368
|
+
});
|
|
369
|
+
CommandsRegistry.registerCommand({
|
|
370
|
+
id: 'workbench.extensions.installExtension',
|
|
371
|
+
description: {
|
|
372
|
+
description: ( localizeWithPath(
|
|
373
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
374
|
+
'workbench.extensions.installExtension.description',
|
|
375
|
+
"Install the given extension"
|
|
376
|
+
)),
|
|
377
|
+
args: [
|
|
378
|
+
{
|
|
379
|
+
name: 'extensionIdOrVSIXUri',
|
|
380
|
+
description: ( localizeWithPath(
|
|
381
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
382
|
+
'workbench.extensions.installExtension.arg.decription',
|
|
383
|
+
"Extension id or VSIX resource uri"
|
|
384
|
+
)),
|
|
385
|
+
constraint: (value) => typeof value === 'string' || value instanceof URI,
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
name: 'options',
|
|
389
|
+
description: '(optional) Options for installing the extension. Object with the following properties: ' +
|
|
390
|
+
'`installOnlyNewlyAddedFromExtensionPackVSIX`: When enabled, VS Code installs only newly added extensions from the extension pack VSIX. This option is considered only when installing VSIX. ',
|
|
391
|
+
isOptional: true,
|
|
392
|
+
schema: {
|
|
393
|
+
'type': 'object',
|
|
394
|
+
'properties': {
|
|
395
|
+
'installOnlyNewlyAddedFromExtensionPackVSIX': {
|
|
396
|
+
'type': 'boolean',
|
|
397
|
+
'description': ( localizeWithPath(
|
|
398
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
399
|
+
'workbench.extensions.installExtension.option.installOnlyNewlyAddedFromExtensionPackVSIX',
|
|
400
|
+
"When enabled, VS Code installs only newly added extensions from the extension pack VSIX. This option is considered only while installing a VSIX."
|
|
401
|
+
)),
|
|
402
|
+
default: false
|
|
403
|
+
},
|
|
404
|
+
'installPreReleaseVersion': {
|
|
405
|
+
'type': 'boolean',
|
|
406
|
+
'description': ( localizeWithPath(
|
|
407
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
408
|
+
'workbench.extensions.installExtension.option.installPreReleaseVersion',
|
|
409
|
+
"When enabled, VS Code installs the pre-release version of the extension if available."
|
|
410
|
+
)),
|
|
411
|
+
default: false
|
|
412
|
+
},
|
|
413
|
+
'donotSync': {
|
|
414
|
+
'type': 'boolean',
|
|
415
|
+
'description': ( localizeWithPath(
|
|
416
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
417
|
+
'workbench.extensions.installExtension.option.donotSync',
|
|
418
|
+
"When enabled, VS Code do not sync this extension when Settings Sync is on."
|
|
419
|
+
)),
|
|
420
|
+
default: false
|
|
421
|
+
},
|
|
422
|
+
'context': {
|
|
423
|
+
'type': 'object',
|
|
424
|
+
'description': ( localizeWithPath(
|
|
425
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
426
|
+
'workbench.extensions.installExtension.option.context',
|
|
427
|
+
"Context for the installation. This is a JSON object that can be used to pass any information to the installation handlers. i.e. `{skipWalkthrough: true}` will skip opening the walkthrough upon install."
|
|
428
|
+
)),
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
]
|
|
434
|
+
},
|
|
435
|
+
handler: async (accessor, arg, options) => {
|
|
436
|
+
const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
437
|
+
const extensionManagementService = accessor.get(IWorkbenchExtensionManagementService);
|
|
438
|
+
try {
|
|
439
|
+
if (typeof arg === 'string') {
|
|
440
|
+
const [id, version] = getIdAndVersion(arg);
|
|
441
|
+
const [extension] = await extensionsWorkbenchService.getExtensions([{ id, preRelease: options?.installPreReleaseVersion }], CancellationToken.None);
|
|
442
|
+
if (extension) {
|
|
443
|
+
const installOptions = {
|
|
444
|
+
isMachineScoped: options?.donotSync ? true : undefined,
|
|
445
|
+
installPreReleaseVersion: options?.installPreReleaseVersion,
|
|
446
|
+
installGivenVersion: !!version,
|
|
447
|
+
context: options?.context
|
|
448
|
+
};
|
|
449
|
+
if (extension.gallery && extension.enablementState === 1 ) {
|
|
450
|
+
await extensionManagementService.installFromGallery(extension.gallery, installOptions);
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
if (version) {
|
|
454
|
+
await extensionsWorkbenchService.installVersion(extension, version, installOptions);
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
await extensionsWorkbenchService.install(extension, installOptions);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
throw new Error(localizeWithPath('vs/workbench/contrib/extensions/browser/extensions.contribution', 'notFound', "Extension '{0}' not found.", arg));
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
const vsix = URI.revive(arg);
|
|
466
|
+
await extensionsWorkbenchService.install(vsix, { installOnlyNewlyAddedFromExtensionPack: options?.installOnlyNewlyAddedFromExtensionPackVSIX });
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
catch (e) {
|
|
470
|
+
onUnexpectedError(e);
|
|
471
|
+
throw e;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
CommandsRegistry.registerCommand({
|
|
476
|
+
id: 'workbench.extensions.uninstallExtension',
|
|
477
|
+
description: {
|
|
478
|
+
description: ( localizeWithPath(
|
|
479
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
480
|
+
'workbench.extensions.uninstallExtension.description',
|
|
481
|
+
"Uninstall the given extension"
|
|
482
|
+
)),
|
|
483
|
+
args: [
|
|
484
|
+
{
|
|
485
|
+
name: ( localizeWithPath(
|
|
486
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
487
|
+
'workbench.extensions.uninstallExtension.arg.name',
|
|
488
|
+
"Id of the extension to uninstall"
|
|
489
|
+
)),
|
|
490
|
+
schema: {
|
|
491
|
+
'type': 'string'
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
handler: async (accessor, id) => {
|
|
497
|
+
if (!id) {
|
|
498
|
+
throw new Error(localizeWithPath('vs/workbench/contrib/extensions/browser/extensions.contribution', 'id required', "Extension id required."));
|
|
499
|
+
}
|
|
500
|
+
const extensionManagementService = accessor.get(IExtensionManagementService);
|
|
501
|
+
const installed = await extensionManagementService.getInstalled();
|
|
502
|
+
const [extensionToUninstall] = installed.filter(e => areSameExtensions(e.identifier, { id }));
|
|
503
|
+
if (!extensionToUninstall) {
|
|
504
|
+
throw new Error(localizeWithPath('vs/workbench/contrib/extensions/browser/extensions.contribution', 'notInstalled', "Extension '{0}' is not installed. Make sure you use the full extension ID, including the publisher, e.g.: ms-dotnettools.csharp.", id));
|
|
505
|
+
}
|
|
506
|
+
if (extensionToUninstall.isBuiltin) {
|
|
507
|
+
throw new Error(localizeWithPath('vs/workbench/contrib/extensions/browser/extensions.contribution', 'builtin', "Extension '{0}' is a Built-in extension and cannot be installed", id));
|
|
508
|
+
}
|
|
509
|
+
try {
|
|
510
|
+
await extensionManagementService.uninstall(extensionToUninstall);
|
|
511
|
+
}
|
|
512
|
+
catch (e) {
|
|
513
|
+
onUnexpectedError(e);
|
|
514
|
+
throw e;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
CommandsRegistry.registerCommand({
|
|
519
|
+
id: 'workbench.extensions.search',
|
|
520
|
+
description: {
|
|
521
|
+
description: ( localizeWithPath(
|
|
522
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
523
|
+
'workbench.extensions.search.description',
|
|
524
|
+
"Search for a specific extension"
|
|
525
|
+
)),
|
|
526
|
+
args: [
|
|
527
|
+
{
|
|
528
|
+
name: ( localizeWithPath(
|
|
529
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
530
|
+
'workbench.extensions.search.arg.name',
|
|
531
|
+
"Query to use in search"
|
|
532
|
+
)),
|
|
533
|
+
schema: { 'type': 'string' }
|
|
534
|
+
}
|
|
535
|
+
]
|
|
536
|
+
},
|
|
537
|
+
handler: async (accessor, query = '') => {
|
|
538
|
+
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
539
|
+
const viewlet = await paneCompositeService.openPaneComposite(VIEWLET_ID, 0 , true);
|
|
540
|
+
if (!viewlet) {
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
viewlet.getViewPaneContainer().search(query);
|
|
544
|
+
viewlet.focus();
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
function overrideActionForActiveExtensionEditorWebview(command, f) {
|
|
548
|
+
command?.addImplementation(105, 'extensions-editor', (accessor) => {
|
|
549
|
+
const editorService = accessor.get(IEditorService);
|
|
550
|
+
const editor = editorService.activeEditorPane;
|
|
551
|
+
if (editor instanceof ExtensionEditor) {
|
|
552
|
+
if (editor.activeWebview?.isFocused) {
|
|
553
|
+
f(editor.activeWebview);
|
|
554
|
+
return true;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
return false;
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
overrideActionForActiveExtensionEditorWebview(CopyAction, webview => webview.copy());
|
|
561
|
+
overrideActionForActiveExtensionEditorWebview(CutAction, webview => webview.cut());
|
|
562
|
+
overrideActionForActiveExtensionEditorWebview(PasteAction, webview => webview.paste());
|
|
563
|
+
const CONTEXT_HAS_LOCAL_SERVER = ( new RawContextKey('hasLocalServer', false));
|
|
564
|
+
const CONTEXT_HAS_REMOTE_SERVER = ( new RawContextKey('hasRemoteServer', false));
|
|
565
|
+
const CONTEXT_HAS_WEB_SERVER = ( new RawContextKey('hasWebServer', false));
|
|
566
|
+
async function runAction(action) {
|
|
567
|
+
try {
|
|
568
|
+
await action.run();
|
|
569
|
+
}
|
|
570
|
+
finally {
|
|
571
|
+
if (isDisposable(action)) {
|
|
572
|
+
action.dispose();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
let ExtensionsContributions = class ExtensionsContributions extends Disposable {
|
|
577
|
+
constructor(extensionManagementServerService, extensionGalleryService, contextKeyService, paneCompositeService, extensionsWorkbenchService, extensionEnablementService, instantiationService, dialogService, commandService) {
|
|
578
|
+
super();
|
|
579
|
+
this.extensionManagementServerService = extensionManagementServerService;
|
|
580
|
+
this.paneCompositeService = paneCompositeService;
|
|
581
|
+
this.extensionsWorkbenchService = extensionsWorkbenchService;
|
|
582
|
+
this.extensionEnablementService = extensionEnablementService;
|
|
583
|
+
this.instantiationService = instantiationService;
|
|
584
|
+
this.dialogService = dialogService;
|
|
585
|
+
this.commandService = commandService;
|
|
586
|
+
const hasGalleryContext = CONTEXT_HAS_GALLERY.bindTo(contextKeyService);
|
|
587
|
+
if (extensionGalleryService.isEnabled()) {
|
|
588
|
+
hasGalleryContext.set(true);
|
|
589
|
+
}
|
|
590
|
+
const hasLocalServerContext = CONTEXT_HAS_LOCAL_SERVER.bindTo(contextKeyService);
|
|
591
|
+
if (this.extensionManagementServerService.localExtensionManagementServer) {
|
|
592
|
+
hasLocalServerContext.set(true);
|
|
593
|
+
}
|
|
594
|
+
const hasRemoteServerContext = CONTEXT_HAS_REMOTE_SERVER.bindTo(contextKeyService);
|
|
595
|
+
if (this.extensionManagementServerService.remoteExtensionManagementServer) {
|
|
596
|
+
hasRemoteServerContext.set(true);
|
|
597
|
+
}
|
|
598
|
+
const hasWebServerContext = CONTEXT_HAS_WEB_SERVER.bindTo(contextKeyService);
|
|
599
|
+
if (this.extensionManagementServerService.webExtensionManagementServer) {
|
|
600
|
+
hasWebServerContext.set(true);
|
|
601
|
+
}
|
|
602
|
+
this.registerGlobalActions();
|
|
603
|
+
this.registerContextMenuActions();
|
|
604
|
+
this.registerQuickAccessProvider();
|
|
605
|
+
}
|
|
606
|
+
registerQuickAccessProvider() {
|
|
607
|
+
if (this.extensionManagementServerService.localExtensionManagementServer
|
|
608
|
+
|| this.extensionManagementServerService.remoteExtensionManagementServer
|
|
609
|
+
|| this.extensionManagementServerService.webExtensionManagementServer) {
|
|
610
|
+
( Registry.as(Extensions.Quickaccess)).registerQuickAccessProvider({
|
|
611
|
+
ctor: InstallExtensionQuickAccessProvider,
|
|
612
|
+
prefix: InstallExtensionQuickAccessProvider.PREFIX,
|
|
613
|
+
placeholder: ( localizeWithPath(
|
|
614
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
615
|
+
'installExtensionQuickAccessPlaceholder',
|
|
616
|
+
"Type the name of an extension to install or search."
|
|
617
|
+
)),
|
|
618
|
+
helpEntries: [{ description: ( localizeWithPath(
|
|
619
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
620
|
+
'installExtensionQuickAccessHelp',
|
|
621
|
+
"Install or Search Extensions"
|
|
622
|
+
)) }]
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
registerGlobalActions() {
|
|
627
|
+
this._register(MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
628
|
+
command: {
|
|
629
|
+
id: VIEWLET_ID,
|
|
630
|
+
title: ( localizeWithPath(
|
|
631
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
632
|
+
{ key: 'miPreferencesExtensions', comment: ['&& denotes a mnemonic'] },
|
|
633
|
+
"&&Extensions"
|
|
634
|
+
))
|
|
635
|
+
},
|
|
636
|
+
group: '2_configuration',
|
|
637
|
+
order: 3
|
|
638
|
+
}));
|
|
639
|
+
this._register(MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
640
|
+
command: {
|
|
641
|
+
id: VIEWLET_ID,
|
|
642
|
+
title: ( localizeWithPath(
|
|
643
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
644
|
+
'showExtensions',
|
|
645
|
+
"Extensions"
|
|
646
|
+
))
|
|
647
|
+
},
|
|
648
|
+
group: '2_configuration',
|
|
649
|
+
order: 3
|
|
650
|
+
}));
|
|
651
|
+
this.registerExtensionAction({
|
|
652
|
+
id: 'workbench.extensions.action.focusExtensionsView',
|
|
653
|
+
title: { value: ( localizeWithPath(
|
|
654
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
655
|
+
'focusExtensions',
|
|
656
|
+
"Focus on Extensions View"
|
|
657
|
+
)), original: 'Focus on Extensions View' },
|
|
658
|
+
category: ExtensionsLocalizedLabel,
|
|
659
|
+
f1: true,
|
|
660
|
+
run: async (accessor) => {
|
|
661
|
+
await accessor.get(IPaneCompositePartService).openPaneComposite(VIEWLET_ID, 0 , true);
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
this.registerExtensionAction({
|
|
665
|
+
id: 'workbench.extensions.action.installExtensions',
|
|
666
|
+
title: { value: ( localizeWithPath(
|
|
667
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
668
|
+
'installExtensions',
|
|
669
|
+
"Install Extensions"
|
|
670
|
+
)), original: 'Install Extensions' },
|
|
671
|
+
category: ExtensionsLocalizedLabel,
|
|
672
|
+
menu: {
|
|
673
|
+
id: MenuId.CommandPalette,
|
|
674
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.or(
|
|
675
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
676
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
677
|
+
CONTEXT_HAS_WEB_SERVER
|
|
678
|
+
))))
|
|
679
|
+
},
|
|
680
|
+
run: async (accessor) => {
|
|
681
|
+
accessor.get(IViewsService).openViewContainer(VIEWLET_ID, true);
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
this.registerExtensionAction({
|
|
685
|
+
id: 'workbench.extensions.action.showRecommendedKeymapExtensions',
|
|
686
|
+
title: { value: ( localizeWithPath(
|
|
687
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
688
|
+
'showRecommendedKeymapExtensionsShort',
|
|
689
|
+
"Keymaps"
|
|
690
|
+
)), original: 'Keymaps' },
|
|
691
|
+
category: PreferencesLocalizedLabel,
|
|
692
|
+
menu: [{
|
|
693
|
+
id: MenuId.CommandPalette,
|
|
694
|
+
when: CONTEXT_HAS_GALLERY
|
|
695
|
+
}, {
|
|
696
|
+
id: MenuId.EditorTitle,
|
|
697
|
+
when: ( ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_HAS_GALLERY)),
|
|
698
|
+
group: '2_keyboard_discover_actions'
|
|
699
|
+
}],
|
|
700
|
+
menuTitles: {
|
|
701
|
+
[MenuId.EditorTitle.id]: ( localizeWithPath(
|
|
702
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
703
|
+
'importKeyboardShortcutsFroms',
|
|
704
|
+
"Migrate Keyboard Shortcuts from..."
|
|
705
|
+
))
|
|
706
|
+
},
|
|
707
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@recommended:keymaps '))
|
|
708
|
+
});
|
|
709
|
+
this.registerExtensionAction({
|
|
710
|
+
id: 'workbench.extensions.action.showLanguageExtensions',
|
|
711
|
+
title: { value: ( localizeWithPath(
|
|
712
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
713
|
+
'showLanguageExtensionsShort',
|
|
714
|
+
"Language Extensions"
|
|
715
|
+
)), original: 'Language Extensions' },
|
|
716
|
+
category: PreferencesLocalizedLabel,
|
|
717
|
+
menu: {
|
|
718
|
+
id: MenuId.CommandPalette,
|
|
719
|
+
when: CONTEXT_HAS_GALLERY
|
|
720
|
+
},
|
|
721
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@recommended:languages '))
|
|
722
|
+
});
|
|
723
|
+
this.registerExtensionAction({
|
|
724
|
+
id: 'workbench.extensions.action.checkForUpdates',
|
|
725
|
+
title: { value: ( localizeWithPath(
|
|
726
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
727
|
+
'checkForUpdates',
|
|
728
|
+
"Check for Extension Updates"
|
|
729
|
+
)), original: 'Check for Extension Updates' },
|
|
730
|
+
category: ExtensionsLocalizedLabel,
|
|
731
|
+
menu: [{
|
|
732
|
+
id: MenuId.CommandPalette,
|
|
733
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.or(
|
|
734
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
735
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
736
|
+
CONTEXT_HAS_WEB_SERVER
|
|
737
|
+
))))
|
|
738
|
+
}, {
|
|
739
|
+
id: MenuId.ViewContainerTitle,
|
|
740
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), CONTEXT_HAS_GALLERY)),
|
|
741
|
+
group: '1_updates',
|
|
742
|
+
order: 1
|
|
743
|
+
}],
|
|
744
|
+
run: async () => {
|
|
745
|
+
await this.extensionsWorkbenchService.checkForUpdates();
|
|
746
|
+
const outdated = this.extensionsWorkbenchService.outdated;
|
|
747
|
+
if (outdated.length) {
|
|
748
|
+
return runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@outdated '));
|
|
749
|
+
}
|
|
750
|
+
else {
|
|
751
|
+
return this.dialogService.info(( localizeWithPath(
|
|
752
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
753
|
+
'noUpdatesAvailable',
|
|
754
|
+
"All extensions are up to date."
|
|
755
|
+
)));
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
const autoUpdateExtensionsSubMenu = ( new MenuId('autoUpdateExtensionsSubMenu'));
|
|
760
|
+
MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
761
|
+
submenu: autoUpdateExtensionsSubMenu,
|
|
762
|
+
title: ( localizeWithPath(
|
|
763
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
764
|
+
'configure auto updating extensions',
|
|
765
|
+
"Auto Update Extensions"
|
|
766
|
+
)),
|
|
767
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), CONTEXT_HAS_GALLERY)),
|
|
768
|
+
group: '1_updates',
|
|
769
|
+
order: 5,
|
|
770
|
+
});
|
|
771
|
+
this.registerExtensionAction({
|
|
772
|
+
id: 'configureExtensionsAutoUpdate.all',
|
|
773
|
+
title: ( localizeWithPath(
|
|
774
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
775
|
+
'configureExtensionsAutoUpdate.all',
|
|
776
|
+
"All Extensions"
|
|
777
|
+
)),
|
|
778
|
+
toggled: ( ContextKeyExpr.and(( ContextKeyExpr.has(`config.${AutoUpdateConfigurationKey}`)), ( ContextKeyExpr.notEquals(`config.${AutoUpdateConfigurationKey}`, 'onlyEnabledExtensions')))),
|
|
779
|
+
menu: [{
|
|
780
|
+
id: autoUpdateExtensionsSubMenu,
|
|
781
|
+
order: 1,
|
|
782
|
+
}],
|
|
783
|
+
run: (accessor) => accessor.get(IConfigurationService).updateValue(AutoUpdateConfigurationKey, true)
|
|
784
|
+
});
|
|
785
|
+
this.registerExtensionAction({
|
|
786
|
+
id: 'configureExtensionsAutoUpdate.enabled',
|
|
787
|
+
title: ( localizeWithPath(
|
|
788
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
789
|
+
'configureExtensionsAutoUpdate.enabled',
|
|
790
|
+
"Only Enabled Extensions"
|
|
791
|
+
)),
|
|
792
|
+
toggled: ( ContextKeyExpr.equals(`config.${AutoUpdateConfigurationKey}`, 'onlyEnabledExtensions')),
|
|
793
|
+
menu: [{
|
|
794
|
+
id: autoUpdateExtensionsSubMenu,
|
|
795
|
+
order: 2,
|
|
796
|
+
}],
|
|
797
|
+
run: (accessor) => accessor.get(IConfigurationService).updateValue(AutoUpdateConfigurationKey, 'onlyEnabledExtensions')
|
|
798
|
+
});
|
|
799
|
+
this.registerExtensionAction({
|
|
800
|
+
id: 'configureExtensionsAutoUpdate.none',
|
|
801
|
+
title: ( localizeWithPath(
|
|
802
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
803
|
+
'configureExtensionsAutoUpdate.none',
|
|
804
|
+
"None"
|
|
805
|
+
)),
|
|
806
|
+
toggled: ( ContextKeyExpr.equals(`config.${AutoUpdateConfigurationKey}`, false)),
|
|
807
|
+
menu: [{
|
|
808
|
+
id: autoUpdateExtensionsSubMenu,
|
|
809
|
+
order: 3,
|
|
810
|
+
}],
|
|
811
|
+
run: (accessor) => accessor.get(IConfigurationService).updateValue(AutoUpdateConfigurationKey, false)
|
|
812
|
+
});
|
|
813
|
+
this.registerExtensionAction({
|
|
814
|
+
id: 'workbench.extensions.action.updateAllExtensions',
|
|
815
|
+
title: { value: ( localizeWithPath(
|
|
816
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
817
|
+
'updateAll',
|
|
818
|
+
"Update All Extensions"
|
|
819
|
+
)), original: 'Update All Extensions' },
|
|
820
|
+
category: ExtensionsLocalizedLabel,
|
|
821
|
+
precondition: HasOutdatedExtensionsContext,
|
|
822
|
+
menu: [
|
|
823
|
+
{
|
|
824
|
+
id: MenuId.CommandPalette,
|
|
825
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.or(
|
|
826
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
827
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
828
|
+
CONTEXT_HAS_WEB_SERVER
|
|
829
|
+
))))
|
|
830
|
+
}, {
|
|
831
|
+
id: MenuId.ViewContainerTitle,
|
|
832
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( ContextKeyExpr.or(( ( ContextKeyExpr.has(`config.${AutoUpdateConfigurationKey}`)).negate()), ( ContextKeyExpr.equals(`config.${AutoUpdateConfigurationKey}`, 'onlyEnabledExtensions')))))),
|
|
833
|
+
group: '1_updates',
|
|
834
|
+
order: 2
|
|
835
|
+
}, {
|
|
836
|
+
id: MenuId.ViewTitle,
|
|
837
|
+
when: ( ContextKeyExpr.equals('view', OUTDATED_EXTENSIONS_VIEW_ID)),
|
|
838
|
+
group: 'navigation',
|
|
839
|
+
order: 1
|
|
840
|
+
}
|
|
841
|
+
],
|
|
842
|
+
icon: installWorkspaceRecommendedIcon,
|
|
843
|
+
run: () => {
|
|
844
|
+
return Promise.all(( this.extensionsWorkbenchService.outdated.map(async (extension) => {
|
|
845
|
+
try {
|
|
846
|
+
await this.extensionsWorkbenchService.install(extension, extension.local?.preRelease ? { installPreReleaseVersion: true } : undefined);
|
|
847
|
+
}
|
|
848
|
+
catch (err) {
|
|
849
|
+
runAction(this.instantiationService.createInstance(PromptExtensionInstallFailureAction, extension, extension.latestVersion, 3 , err));
|
|
850
|
+
}
|
|
851
|
+
})));
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
this.registerExtensionAction({
|
|
855
|
+
id: 'workbench.extensions.action.disableAutoUpdate',
|
|
856
|
+
title: { value: ( localizeWithPath(
|
|
857
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
858
|
+
'disableAutoUpdate',
|
|
859
|
+
"Disable Auto Update for All Extensions"
|
|
860
|
+
)), original: 'Disable Auto Update for All Extensions' },
|
|
861
|
+
category: ExtensionsLocalizedLabel,
|
|
862
|
+
f1: true,
|
|
863
|
+
precondition: CONTEXT_HAS_GALLERY,
|
|
864
|
+
run: (accessor) => accessor.get(IConfigurationService).updateValue(AutoUpdateConfigurationKey, false)
|
|
865
|
+
});
|
|
866
|
+
this.registerExtensionAction({
|
|
867
|
+
id: 'workbench.extensions.action.enableAutoUpdate',
|
|
868
|
+
title: { value: ( localizeWithPath(
|
|
869
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
870
|
+
'enableAutoUpdate',
|
|
871
|
+
"Enable Auto Update for All Extensions"
|
|
872
|
+
)), original: 'Enable Auto Update for All Extensions' },
|
|
873
|
+
category: ExtensionsLocalizedLabel,
|
|
874
|
+
f1: true,
|
|
875
|
+
precondition: CONTEXT_HAS_GALLERY,
|
|
876
|
+
run: (accessor) => accessor.get(IConfigurationService).updateValue(AutoUpdateConfigurationKey, true)
|
|
877
|
+
});
|
|
878
|
+
this.registerExtensionAction({
|
|
879
|
+
id: 'workbench.extensions.action.enableAll',
|
|
880
|
+
title: { value: ( localizeWithPath(
|
|
881
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
882
|
+
'enableAll',
|
|
883
|
+
"Enable All Extensions"
|
|
884
|
+
)), original: 'Enable All Extensions' },
|
|
885
|
+
category: ExtensionsLocalizedLabel,
|
|
886
|
+
menu: [{
|
|
887
|
+
id: MenuId.CommandPalette,
|
|
888
|
+
when: ( ContextKeyExpr.or(
|
|
889
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
890
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
891
|
+
CONTEXT_HAS_WEB_SERVER
|
|
892
|
+
))
|
|
893
|
+
}, {
|
|
894
|
+
id: MenuId.ViewContainerTitle,
|
|
895
|
+
when: ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)),
|
|
896
|
+
group: '2_enablement',
|
|
897
|
+
order: 1
|
|
898
|
+
}],
|
|
899
|
+
run: async () => {
|
|
900
|
+
const extensionsToEnable = this.extensionsWorkbenchService.local.filter(e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && !this.extensionEnablementService.isEnabled(e.local));
|
|
901
|
+
if (extensionsToEnable.length) {
|
|
902
|
+
await this.extensionsWorkbenchService.setEnablement(extensionsToEnable, 8 );
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
this.registerExtensionAction({
|
|
907
|
+
id: 'workbench.extensions.action.enableAllWorkspace',
|
|
908
|
+
title: { value: ( localizeWithPath(
|
|
909
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
910
|
+
'enableAllWorkspace',
|
|
911
|
+
"Enable All Extensions for this Workspace"
|
|
912
|
+
)), original: 'Enable All Extensions for this Workspace' },
|
|
913
|
+
category: ExtensionsLocalizedLabel,
|
|
914
|
+
menu: {
|
|
915
|
+
id: MenuId.CommandPalette,
|
|
916
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo('empty')), ( ContextKeyExpr.or(
|
|
917
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
918
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
919
|
+
CONTEXT_HAS_WEB_SERVER
|
|
920
|
+
))))
|
|
921
|
+
},
|
|
922
|
+
run: async () => {
|
|
923
|
+
const extensionsToEnable = this.extensionsWorkbenchService.local.filter(e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && !this.extensionEnablementService.isEnabled(e.local));
|
|
924
|
+
if (extensionsToEnable.length) {
|
|
925
|
+
await this.extensionsWorkbenchService.setEnablement(extensionsToEnable, 9 );
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
});
|
|
929
|
+
this.registerExtensionAction({
|
|
930
|
+
id: 'workbench.extensions.action.disableAll',
|
|
931
|
+
title: { value: ( localizeWithPath(
|
|
932
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
933
|
+
'disableAll',
|
|
934
|
+
"Disable All Installed Extensions"
|
|
935
|
+
)), original: 'Disable All Installed Extensions' },
|
|
936
|
+
category: ExtensionsLocalizedLabel,
|
|
937
|
+
menu: [{
|
|
938
|
+
id: MenuId.CommandPalette,
|
|
939
|
+
when: ( ContextKeyExpr.or(
|
|
940
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
941
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
942
|
+
CONTEXT_HAS_WEB_SERVER
|
|
943
|
+
))
|
|
944
|
+
}, {
|
|
945
|
+
id: MenuId.ViewContainerTitle,
|
|
946
|
+
when: ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)),
|
|
947
|
+
group: '2_enablement',
|
|
948
|
+
order: 2
|
|
949
|
+
}],
|
|
950
|
+
run: async () => {
|
|
951
|
+
const extensionsToDisable = this.extensionsWorkbenchService.local.filter(e => !e.isBuiltin && !!e.local && this.extensionEnablementService.isEnabled(e.local) && this.extensionEnablementService.canChangeEnablement(e.local));
|
|
952
|
+
if (extensionsToDisable.length) {
|
|
953
|
+
await this.extensionsWorkbenchService.setEnablement(extensionsToDisable, 6 );
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
this.registerExtensionAction({
|
|
958
|
+
id: 'workbench.extensions.action.disableAllWorkspace',
|
|
959
|
+
title: { value: ( localizeWithPath(
|
|
960
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
961
|
+
'disableAllWorkspace',
|
|
962
|
+
"Disable All Installed Extensions for this Workspace"
|
|
963
|
+
)), original: 'Disable All Installed Extensions for this Workspace' },
|
|
964
|
+
category: ExtensionsLocalizedLabel,
|
|
965
|
+
menu: {
|
|
966
|
+
id: MenuId.CommandPalette,
|
|
967
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo('empty')), ( ContextKeyExpr.or(
|
|
968
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
969
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
970
|
+
CONTEXT_HAS_WEB_SERVER
|
|
971
|
+
))))
|
|
972
|
+
},
|
|
973
|
+
run: async () => {
|
|
974
|
+
const extensionsToDisable = this.extensionsWorkbenchService.local.filter(e => !e.isBuiltin && !!e.local && this.extensionEnablementService.isEnabled(e.local) && this.extensionEnablementService.canChangeEnablement(e.local));
|
|
975
|
+
if (extensionsToDisable.length) {
|
|
976
|
+
await this.extensionsWorkbenchService.setEnablement(extensionsToDisable, 7 );
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
});
|
|
980
|
+
this.registerExtensionAction({
|
|
981
|
+
id: SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID,
|
|
982
|
+
title: { value: ( localizeWithPath(
|
|
983
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
984
|
+
'InstallFromVSIX',
|
|
985
|
+
"Install from VSIX..."
|
|
986
|
+
)), original: 'Install from VSIX...' },
|
|
987
|
+
category: ExtensionsLocalizedLabel,
|
|
988
|
+
menu: [{
|
|
989
|
+
id: MenuId.CommandPalette,
|
|
990
|
+
when: ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER))
|
|
991
|
+
}, {
|
|
992
|
+
id: MenuId.ViewContainerTitle,
|
|
993
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER)))),
|
|
994
|
+
group: '3_install',
|
|
995
|
+
order: 1
|
|
996
|
+
}],
|
|
997
|
+
run: async (accessor) => {
|
|
998
|
+
const fileDialogService = accessor.get(IFileDialogService);
|
|
999
|
+
const commandService = accessor.get(ICommandService);
|
|
1000
|
+
const vsixPaths = await fileDialogService.showOpenDialog({
|
|
1001
|
+
title: ( localizeWithPath(
|
|
1002
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1003
|
+
'installFromVSIX',
|
|
1004
|
+
"Install from VSIX"
|
|
1005
|
+
)),
|
|
1006
|
+
filters: [{ name: 'VSIX Extensions', extensions: ['vsix'] }],
|
|
1007
|
+
canSelectFiles: true,
|
|
1008
|
+
canSelectMany: true,
|
|
1009
|
+
openLabel: mnemonicButtonLabel(( localizeWithPath(
|
|
1010
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1011
|
+
{ key: 'installButton', comment: ['&& denotes a mnemonic'] },
|
|
1012
|
+
"&&Install"
|
|
1013
|
+
)))
|
|
1014
|
+
});
|
|
1015
|
+
if (vsixPaths) {
|
|
1016
|
+
await commandService.executeCommand(INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID, vsixPaths);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
this.registerExtensionAction({
|
|
1021
|
+
id: INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID,
|
|
1022
|
+
title: ( localizeWithPath(
|
|
1023
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1024
|
+
'installVSIX',
|
|
1025
|
+
"Install Extension VSIX"
|
|
1026
|
+
)),
|
|
1027
|
+
menu: [{
|
|
1028
|
+
id: MenuId.ExplorerContext,
|
|
1029
|
+
group: 'extensions',
|
|
1030
|
+
when: ( ContextKeyExpr.and(( ResourceContextKey.Extension.isEqualTo('.vsix')), ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER)))),
|
|
1031
|
+
}],
|
|
1032
|
+
run: async (accessor, resources) => {
|
|
1033
|
+
const extensionService = accessor.get(IExtensionService);
|
|
1034
|
+
const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1035
|
+
const hostService = accessor.get(IHostService);
|
|
1036
|
+
const notificationService = accessor.get(INotificationService);
|
|
1037
|
+
const extensions = Array.isArray(resources) ? resources : [resources];
|
|
1038
|
+
await Promises.settled(( extensions.map(async (vsix) => await extensionsWorkbenchService.install(vsix))))
|
|
1039
|
+
.then(async (extensions) => {
|
|
1040
|
+
for (const extension of extensions) {
|
|
1041
|
+
const requireReload = !(extension.local && extensionService.canAddExtension(toExtensionDescription(extension.local)));
|
|
1042
|
+
const message = requireReload ? ( localizeWithPath(
|
|
1043
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1044
|
+
'InstallVSIXAction.successReload',
|
|
1045
|
+
"Completed installing {0} extension from VSIX. Please reload Visual Studio Code to enable it.",
|
|
1046
|
+
extension.displayName || extension.name
|
|
1047
|
+
))
|
|
1048
|
+
: ( localizeWithPath(
|
|
1049
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1050
|
+
'InstallVSIXAction.success',
|
|
1051
|
+
"Completed installing {0} extension from VSIX.",
|
|
1052
|
+
extension.displayName || extension.name
|
|
1053
|
+
));
|
|
1054
|
+
const actions = requireReload ? [{
|
|
1055
|
+
label: ( localizeWithPath(
|
|
1056
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1057
|
+
'InstallVSIXAction.reloadNow',
|
|
1058
|
+
"Reload Now"
|
|
1059
|
+
)),
|
|
1060
|
+
run: () => hostService.reload()
|
|
1061
|
+
}] : [];
|
|
1062
|
+
notificationService.prompt(Severity.Info, message, actions);
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
this.registerExtensionAction({
|
|
1068
|
+
id: 'workbench.extensions.action.installExtensionFromLocation',
|
|
1069
|
+
title: { value: ( localizeWithPath(
|
|
1070
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1071
|
+
'installExtensionFromLocation',
|
|
1072
|
+
"Install Extension from Location..."
|
|
1073
|
+
)), original: 'Install Extension from Location...' },
|
|
1074
|
+
category: Categories.Developer,
|
|
1075
|
+
menu: [{
|
|
1076
|
+
id: MenuId.CommandPalette,
|
|
1077
|
+
when: ( ContextKeyExpr.or(CONTEXT_HAS_WEB_SERVER, CONTEXT_HAS_LOCAL_SERVER))
|
|
1078
|
+
}],
|
|
1079
|
+
run: async (accessor) => {
|
|
1080
|
+
const extensionManagementService = accessor.get(IWorkbenchExtensionManagementService);
|
|
1081
|
+
if (isWeb) {
|
|
1082
|
+
const quickInputService = accessor.get(IQuickInputService);
|
|
1083
|
+
const disposables = ( new DisposableStore());
|
|
1084
|
+
const quickPick = disposables.add(quickInputService.createQuickPick());
|
|
1085
|
+
quickPick.title = ( localizeWithPath(
|
|
1086
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1087
|
+
'installFromLocation',
|
|
1088
|
+
"Install Extension from Location"
|
|
1089
|
+
));
|
|
1090
|
+
quickPick.customButton = true;
|
|
1091
|
+
quickPick.customLabel = ( localizeWithPath(
|
|
1092
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1093
|
+
'install button',
|
|
1094
|
+
"Install"
|
|
1095
|
+
));
|
|
1096
|
+
quickPick.placeholder = ( localizeWithPath(
|
|
1097
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1098
|
+
'installFromLocationPlaceHolder',
|
|
1099
|
+
"Location of the web extension"
|
|
1100
|
+
));
|
|
1101
|
+
quickPick.ignoreFocusOut = true;
|
|
1102
|
+
disposables.add(Event.any(quickPick.onDidAccept, quickPick.onDidCustom)(() => {
|
|
1103
|
+
quickPick.hide();
|
|
1104
|
+
if (quickPick.value) {
|
|
1105
|
+
extensionManagementService.installFromLocation(( URI.parse(quickPick.value)));
|
|
1106
|
+
}
|
|
1107
|
+
}));
|
|
1108
|
+
disposables.add(quickPick.onDidHide(() => disposables.dispose()));
|
|
1109
|
+
quickPick.show();
|
|
1110
|
+
}
|
|
1111
|
+
else {
|
|
1112
|
+
const fileDialogService = accessor.get(IFileDialogService);
|
|
1113
|
+
const extensionLocation = await fileDialogService.showOpenDialog({
|
|
1114
|
+
canSelectFolders: true,
|
|
1115
|
+
canSelectFiles: false,
|
|
1116
|
+
canSelectMany: false,
|
|
1117
|
+
title: ( localizeWithPath(
|
|
1118
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1119
|
+
'installFromLocation',
|
|
1120
|
+
"Install Extension from Location"
|
|
1121
|
+
)),
|
|
1122
|
+
});
|
|
1123
|
+
if (extensionLocation?.[0]) {
|
|
1124
|
+
extensionManagementService.installFromLocation(extensionLocation[0]);
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
});
|
|
1129
|
+
const extensionsFilterSubMenu = ( new MenuId('extensionsFilterSubMenu'));
|
|
1130
|
+
MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
1131
|
+
submenu: extensionsFilterSubMenu,
|
|
1132
|
+
title: ( localizeWithPath(
|
|
1133
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1134
|
+
'filterExtensions',
|
|
1135
|
+
"Filter Extensions..."
|
|
1136
|
+
)),
|
|
1137
|
+
when: ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)),
|
|
1138
|
+
group: 'navigation',
|
|
1139
|
+
order: 1,
|
|
1140
|
+
icon: filterIcon,
|
|
1141
|
+
});
|
|
1142
|
+
const showFeaturedExtensionsId = 'extensions.filter.featured';
|
|
1143
|
+
this.registerExtensionAction({
|
|
1144
|
+
id: showFeaturedExtensionsId,
|
|
1145
|
+
title: { value: ( localizeWithPath(
|
|
1146
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1147
|
+
'showFeaturedExtensions',
|
|
1148
|
+
"Show Featured Extensions"
|
|
1149
|
+
)), original: 'Show Featured Extensions' },
|
|
1150
|
+
category: ExtensionsLocalizedLabel,
|
|
1151
|
+
menu: [{
|
|
1152
|
+
id: MenuId.CommandPalette,
|
|
1153
|
+
when: CONTEXT_HAS_GALLERY
|
|
1154
|
+
}, {
|
|
1155
|
+
id: extensionsFilterSubMenu,
|
|
1156
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1157
|
+
group: '1_predefined',
|
|
1158
|
+
order: 1,
|
|
1159
|
+
}],
|
|
1160
|
+
menuTitles: {
|
|
1161
|
+
[extensionsFilterSubMenu.id]: ( localizeWithPath(
|
|
1162
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1163
|
+
'featured filter',
|
|
1164
|
+
"Featured"
|
|
1165
|
+
))
|
|
1166
|
+
},
|
|
1167
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@featured '))
|
|
1168
|
+
});
|
|
1169
|
+
this.registerExtensionAction({
|
|
1170
|
+
id: 'workbench.extensions.action.showPopularExtensions',
|
|
1171
|
+
title: { value: ( localizeWithPath(
|
|
1172
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1173
|
+
'showPopularExtensions',
|
|
1174
|
+
"Show Popular Extensions"
|
|
1175
|
+
)), original: 'Show Popular Extensions' },
|
|
1176
|
+
category: ExtensionsLocalizedLabel,
|
|
1177
|
+
menu: [{
|
|
1178
|
+
id: MenuId.CommandPalette,
|
|
1179
|
+
when: CONTEXT_HAS_GALLERY
|
|
1180
|
+
}, {
|
|
1181
|
+
id: extensionsFilterSubMenu,
|
|
1182
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1183
|
+
group: '1_predefined',
|
|
1184
|
+
order: 2,
|
|
1185
|
+
}],
|
|
1186
|
+
menuTitles: {
|
|
1187
|
+
[extensionsFilterSubMenu.id]: ( localizeWithPath(
|
|
1188
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1189
|
+
'most popular filter',
|
|
1190
|
+
"Most Popular"
|
|
1191
|
+
))
|
|
1192
|
+
},
|
|
1193
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@popular '))
|
|
1194
|
+
});
|
|
1195
|
+
this.registerExtensionAction({
|
|
1196
|
+
id: 'workbench.extensions.action.showRecommendedExtensions',
|
|
1197
|
+
title: { value: ( localizeWithPath(
|
|
1198
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1199
|
+
'showRecommendedExtensions',
|
|
1200
|
+
"Show Recommended Extensions"
|
|
1201
|
+
)), original: 'Show Recommended Extensions' },
|
|
1202
|
+
category: ExtensionsLocalizedLabel,
|
|
1203
|
+
menu: [{
|
|
1204
|
+
id: MenuId.CommandPalette,
|
|
1205
|
+
when: CONTEXT_HAS_GALLERY
|
|
1206
|
+
}, {
|
|
1207
|
+
id: extensionsFilterSubMenu,
|
|
1208
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1209
|
+
group: '1_predefined',
|
|
1210
|
+
order: 2,
|
|
1211
|
+
}],
|
|
1212
|
+
menuTitles: {
|
|
1213
|
+
[extensionsFilterSubMenu.id]: ( localizeWithPath(
|
|
1214
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1215
|
+
'most popular recommended',
|
|
1216
|
+
"Recommended"
|
|
1217
|
+
))
|
|
1218
|
+
},
|
|
1219
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@recommended '))
|
|
1220
|
+
});
|
|
1221
|
+
this.registerExtensionAction({
|
|
1222
|
+
id: 'workbench.extensions.action.recentlyPublishedExtensions',
|
|
1223
|
+
title: { value: ( localizeWithPath(
|
|
1224
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1225
|
+
'recentlyPublishedExtensions',
|
|
1226
|
+
"Show Recently Published Extensions"
|
|
1227
|
+
)), original: 'Show Recently Published Extensions' },
|
|
1228
|
+
category: ExtensionsLocalizedLabel,
|
|
1229
|
+
menu: [{
|
|
1230
|
+
id: MenuId.CommandPalette,
|
|
1231
|
+
when: CONTEXT_HAS_GALLERY
|
|
1232
|
+
}, {
|
|
1233
|
+
id: extensionsFilterSubMenu,
|
|
1234
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1235
|
+
group: '1_predefined',
|
|
1236
|
+
order: 2,
|
|
1237
|
+
}],
|
|
1238
|
+
menuTitles: {
|
|
1239
|
+
[extensionsFilterSubMenu.id]: ( localizeWithPath(
|
|
1240
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1241
|
+
'recently published filter',
|
|
1242
|
+
"Recently Published"
|
|
1243
|
+
))
|
|
1244
|
+
},
|
|
1245
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@recentlyPublished '))
|
|
1246
|
+
});
|
|
1247
|
+
const extensionsCategoryFilterSubMenu = ( new MenuId('extensionsCategoryFilterSubMenu'));
|
|
1248
|
+
MenuRegistry.appendMenuItem(extensionsFilterSubMenu, {
|
|
1249
|
+
submenu: extensionsCategoryFilterSubMenu,
|
|
1250
|
+
title: ( localizeWithPath(
|
|
1251
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1252
|
+
'filter by category',
|
|
1253
|
+
"Category"
|
|
1254
|
+
)),
|
|
1255
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1256
|
+
group: '2_categories',
|
|
1257
|
+
order: 1,
|
|
1258
|
+
});
|
|
1259
|
+
this.registerExtensionAction({
|
|
1260
|
+
id: 'workbench.extensions.action.listBuiltInExtensions',
|
|
1261
|
+
title: { value: ( localizeWithPath(
|
|
1262
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1263
|
+
'showBuiltInExtensions',
|
|
1264
|
+
"Show Built-in Extensions"
|
|
1265
|
+
)), original: 'Show Built-in Extensions' },
|
|
1266
|
+
category: ExtensionsLocalizedLabel,
|
|
1267
|
+
menu: [{
|
|
1268
|
+
id: MenuId.CommandPalette,
|
|
1269
|
+
when: ( ContextKeyExpr.or(
|
|
1270
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
1271
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
1272
|
+
CONTEXT_HAS_WEB_SERVER
|
|
1273
|
+
))
|
|
1274
|
+
}, {
|
|
1275
|
+
id: extensionsFilterSubMenu,
|
|
1276
|
+
group: '3_installed',
|
|
1277
|
+
order: 2,
|
|
1278
|
+
}],
|
|
1279
|
+
menuTitles: {
|
|
1280
|
+
[extensionsFilterSubMenu.id]: ( localizeWithPath(
|
|
1281
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1282
|
+
'builtin filter',
|
|
1283
|
+
"Built-in"
|
|
1284
|
+
))
|
|
1285
|
+
},
|
|
1286
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@builtin '))
|
|
1287
|
+
});
|
|
1288
|
+
this.registerExtensionAction({
|
|
1289
|
+
id: 'workbench.extensions.action.extensionUpdates',
|
|
1290
|
+
title: { value: ( localizeWithPath(
|
|
1291
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1292
|
+
'extensionUpdates',
|
|
1293
|
+
"Show Extension Updates"
|
|
1294
|
+
)), original: 'Show Extension Updates' },
|
|
1295
|
+
category: ExtensionsLocalizedLabel,
|
|
1296
|
+
precondition: CONTEXT_HAS_GALLERY,
|
|
1297
|
+
f1: true,
|
|
1298
|
+
menu: [{
|
|
1299
|
+
id: extensionsFilterSubMenu,
|
|
1300
|
+
group: '3_installed',
|
|
1301
|
+
when: CONTEXT_HAS_GALLERY,
|
|
1302
|
+
order: 1,
|
|
1303
|
+
}],
|
|
1304
|
+
menuTitles: {
|
|
1305
|
+
[extensionsFilterSubMenu.id]: ( localizeWithPath(
|
|
1306
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1307
|
+
'extension updates filter',
|
|
1308
|
+
"Updates"
|
|
1309
|
+
))
|
|
1310
|
+
},
|
|
1311
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@updates'))
|
|
1312
|
+
});
|
|
1313
|
+
this.registerExtensionAction({
|
|
1314
|
+
id: LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID,
|
|
1315
|
+
title: { value: ( localizeWithPath(
|
|
1316
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1317
|
+
'showWorkspaceUnsupportedExtensions',
|
|
1318
|
+
"Show Extensions Unsupported By Workspace"
|
|
1319
|
+
)), original: 'Show Extensions Unsupported By Workspace' },
|
|
1320
|
+
category: ExtensionsLocalizedLabel,
|
|
1321
|
+
menu: [{
|
|
1322
|
+
id: MenuId.CommandPalette,
|
|
1323
|
+
when: ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER)),
|
|
1324
|
+
}, {
|
|
1325
|
+
id: extensionsFilterSubMenu,
|
|
1326
|
+
group: '3_installed',
|
|
1327
|
+
order: 5,
|
|
1328
|
+
when: ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER)),
|
|
1329
|
+
}],
|
|
1330
|
+
menuTitles: {
|
|
1331
|
+
[extensionsFilterSubMenu.id]: ( localizeWithPath(
|
|
1332
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1333
|
+
'workspace unsupported filter',
|
|
1334
|
+
"Workspace Unsupported"
|
|
1335
|
+
))
|
|
1336
|
+
},
|
|
1337
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@workspaceUnsupported'))
|
|
1338
|
+
});
|
|
1339
|
+
this.registerExtensionAction({
|
|
1340
|
+
id: 'workbench.extensions.action.showEnabledExtensions',
|
|
1341
|
+
title: { value: ( localizeWithPath(
|
|
1342
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1343
|
+
'showEnabledExtensions',
|
|
1344
|
+
"Show Enabled Extensions"
|
|
1345
|
+
)), original: 'Show Enabled Extensions' },
|
|
1346
|
+
category: ExtensionsLocalizedLabel,
|
|
1347
|
+
menu: [{
|
|
1348
|
+
id: MenuId.CommandPalette,
|
|
1349
|
+
when: ( ContextKeyExpr.or(
|
|
1350
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
1351
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
1352
|
+
CONTEXT_HAS_WEB_SERVER
|
|
1353
|
+
))
|
|
1354
|
+
}, {
|
|
1355
|
+
id: extensionsFilterSubMenu,
|
|
1356
|
+
group: '3_installed',
|
|
1357
|
+
order: 3,
|
|
1358
|
+
}],
|
|
1359
|
+
menuTitles: {
|
|
1360
|
+
[extensionsFilterSubMenu.id]: ( localizeWithPath(
|
|
1361
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1362
|
+
'enabled filter',
|
|
1363
|
+
"Enabled"
|
|
1364
|
+
))
|
|
1365
|
+
},
|
|
1366
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@enabled '))
|
|
1367
|
+
});
|
|
1368
|
+
this.registerExtensionAction({
|
|
1369
|
+
id: 'workbench.extensions.action.showDisabledExtensions',
|
|
1370
|
+
title: { value: ( localizeWithPath(
|
|
1371
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1372
|
+
'showDisabledExtensions',
|
|
1373
|
+
"Show Disabled Extensions"
|
|
1374
|
+
)), original: 'Show Disabled Extensions' },
|
|
1375
|
+
category: ExtensionsLocalizedLabel,
|
|
1376
|
+
menu: [{
|
|
1377
|
+
id: MenuId.CommandPalette,
|
|
1378
|
+
when: ( ContextKeyExpr.or(
|
|
1379
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
1380
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
1381
|
+
CONTEXT_HAS_WEB_SERVER
|
|
1382
|
+
))
|
|
1383
|
+
}, {
|
|
1384
|
+
id: extensionsFilterSubMenu,
|
|
1385
|
+
group: '3_installed',
|
|
1386
|
+
order: 4,
|
|
1387
|
+
}],
|
|
1388
|
+
menuTitles: {
|
|
1389
|
+
[extensionsFilterSubMenu.id]: ( localizeWithPath(
|
|
1390
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1391
|
+
'disabled filter',
|
|
1392
|
+
"Disabled"
|
|
1393
|
+
))
|
|
1394
|
+
},
|
|
1395
|
+
run: () => runAction(this.instantiationService.createInstance(SearchExtensionsAction, '@disabled '))
|
|
1396
|
+
});
|
|
1397
|
+
const extensionsSortSubMenu = ( new MenuId('extensionsSortSubMenu'));
|
|
1398
|
+
MenuRegistry.appendMenuItem(extensionsFilterSubMenu, {
|
|
1399
|
+
submenu: extensionsSortSubMenu,
|
|
1400
|
+
title: ( localizeWithPath(
|
|
1401
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1402
|
+
'sorty by',
|
|
1403
|
+
"Sort By"
|
|
1404
|
+
)),
|
|
1405
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(CONTEXT_HAS_GALLERY, DefaultViewsContext)))),
|
|
1406
|
+
group: '4_sort',
|
|
1407
|
+
order: 1,
|
|
1408
|
+
});
|
|
1409
|
+
this.registerExtensionAction({
|
|
1410
|
+
id: 'workbench.extensions.action.clearExtensionsSearchResults',
|
|
1411
|
+
title: { value: ( localizeWithPath(
|
|
1412
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1413
|
+
'clearExtensionsSearchResults',
|
|
1414
|
+
"Clear Extensions Search Results"
|
|
1415
|
+
)), original: 'Clear Extensions Search Results' },
|
|
1416
|
+
category: ExtensionsLocalizedLabel,
|
|
1417
|
+
icon: clearSearchResultsIcon,
|
|
1418
|
+
f1: true,
|
|
1419
|
+
precondition: SearchHasTextContext,
|
|
1420
|
+
menu: {
|
|
1421
|
+
id: MenuId.ViewContainerTitle,
|
|
1422
|
+
when: ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)),
|
|
1423
|
+
group: 'navigation',
|
|
1424
|
+
order: 3,
|
|
1425
|
+
},
|
|
1426
|
+
run: async (accessor) => {
|
|
1427
|
+
const viewPaneContainer = accessor.get(IViewsService).getActiveViewPaneContainerWithId(VIEWLET_ID);
|
|
1428
|
+
if (viewPaneContainer) {
|
|
1429
|
+
const extensionsViewPaneContainer = viewPaneContainer;
|
|
1430
|
+
extensionsViewPaneContainer.search('');
|
|
1431
|
+
extensionsViewPaneContainer.focus();
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
});
|
|
1435
|
+
this.registerExtensionAction({
|
|
1436
|
+
id: 'workbench.extensions.action.refreshExtension',
|
|
1437
|
+
title: { value: ( localizeWithPath(
|
|
1438
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1439
|
+
'refreshExtension',
|
|
1440
|
+
"Refresh"
|
|
1441
|
+
)), original: 'Refresh' },
|
|
1442
|
+
category: ExtensionsLocalizedLabel,
|
|
1443
|
+
icon: refreshIcon,
|
|
1444
|
+
f1: true,
|
|
1445
|
+
menu: {
|
|
1446
|
+
id: MenuId.ViewContainerTitle,
|
|
1447
|
+
when: ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)),
|
|
1448
|
+
group: 'navigation',
|
|
1449
|
+
order: 2
|
|
1450
|
+
},
|
|
1451
|
+
run: async (accessor) => {
|
|
1452
|
+
const viewPaneContainer = accessor.get(IViewsService).getActiveViewPaneContainerWithId(VIEWLET_ID);
|
|
1453
|
+
if (viewPaneContainer) {
|
|
1454
|
+
await viewPaneContainer.refresh();
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
});
|
|
1458
|
+
this.registerExtensionAction({
|
|
1459
|
+
id: 'workbench.extensions.action.installWorkspaceRecommendedExtensions',
|
|
1460
|
+
title: ( localizeWithPath(
|
|
1461
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1462
|
+
'installWorkspaceRecommendedExtensions',
|
|
1463
|
+
"Install Workspace Recommended Extensions"
|
|
1464
|
+
)),
|
|
1465
|
+
icon: installWorkspaceRecommendedIcon,
|
|
1466
|
+
menu: {
|
|
1467
|
+
id: MenuId.ViewTitle,
|
|
1468
|
+
when: ( ContextKeyExpr.equals('view', WORKSPACE_RECOMMENDATIONS_VIEW_ID)),
|
|
1469
|
+
group: 'navigation',
|
|
1470
|
+
order: 1
|
|
1471
|
+
},
|
|
1472
|
+
run: async (accessor) => {
|
|
1473
|
+
const view = accessor.get(IViewsService).getActiveViewWithId(WORKSPACE_RECOMMENDATIONS_VIEW_ID);
|
|
1474
|
+
return view.installWorkspaceRecommendations();
|
|
1475
|
+
}
|
|
1476
|
+
});
|
|
1477
|
+
this.registerExtensionAction({
|
|
1478
|
+
id: ConfigureWorkspaceFolderRecommendedExtensionsAction.ID,
|
|
1479
|
+
title: ConfigureWorkspaceFolderRecommendedExtensionsAction.LABEL,
|
|
1480
|
+
icon: configureRecommendedIcon,
|
|
1481
|
+
menu: [{
|
|
1482
|
+
id: MenuId.CommandPalette,
|
|
1483
|
+
when: ( WorkbenchStateContext.notEqualsTo('empty')),
|
|
1484
|
+
}, {
|
|
1485
|
+
id: MenuId.ViewTitle,
|
|
1486
|
+
when: ( ContextKeyExpr.equals('view', WORKSPACE_RECOMMENDATIONS_VIEW_ID)),
|
|
1487
|
+
group: 'navigation',
|
|
1488
|
+
order: 2
|
|
1489
|
+
}],
|
|
1490
|
+
run: () => runAction(this.instantiationService.createInstance(ConfigureWorkspaceFolderRecommendedExtensionsAction, ConfigureWorkspaceFolderRecommendedExtensionsAction.ID, ConfigureWorkspaceFolderRecommendedExtensionsAction.LABEL))
|
|
1491
|
+
});
|
|
1492
|
+
this.registerExtensionAction({
|
|
1493
|
+
id: InstallSpecificVersionOfExtensionAction.ID,
|
|
1494
|
+
title: { value: InstallSpecificVersionOfExtensionAction.LABEL, original: 'Install Specific Version of Extension...' },
|
|
1495
|
+
category: ExtensionsLocalizedLabel,
|
|
1496
|
+
menu: {
|
|
1497
|
+
id: MenuId.CommandPalette,
|
|
1498
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.or(
|
|
1499
|
+
CONTEXT_HAS_LOCAL_SERVER,
|
|
1500
|
+
CONTEXT_HAS_REMOTE_SERVER,
|
|
1501
|
+
CONTEXT_HAS_WEB_SERVER
|
|
1502
|
+
))))
|
|
1503
|
+
},
|
|
1504
|
+
run: () => runAction(this.instantiationService.createInstance(InstallSpecificVersionOfExtensionAction, InstallSpecificVersionOfExtensionAction.ID, InstallSpecificVersionOfExtensionAction.LABEL))
|
|
1505
|
+
});
|
|
1506
|
+
this.registerExtensionAction({
|
|
1507
|
+
id: ReinstallAction.ID,
|
|
1508
|
+
title: { value: ReinstallAction.LABEL, original: 'Reinstall Extension...' },
|
|
1509
|
+
category: Categories.Developer,
|
|
1510
|
+
menu: {
|
|
1511
|
+
id: MenuId.CommandPalette,
|
|
1512
|
+
when: ( ContextKeyExpr.and(CONTEXT_HAS_GALLERY, ( ContextKeyExpr.or(CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER))))
|
|
1513
|
+
},
|
|
1514
|
+
run: () => runAction(this.instantiationService.createInstance(ReinstallAction, ReinstallAction.ID, ReinstallAction.LABEL))
|
|
1515
|
+
});
|
|
1516
|
+
}
|
|
1517
|
+
registerContextMenuActions() {
|
|
1518
|
+
this.registerExtensionAction({
|
|
1519
|
+
id: SetColorThemeAction.ID,
|
|
1520
|
+
title: SetColorThemeAction.TITLE,
|
|
1521
|
+
menu: {
|
|
1522
|
+
id: MenuId.ExtensionContext,
|
|
1523
|
+
group: THEME_ACTIONS_GROUP,
|
|
1524
|
+
order: 0,
|
|
1525
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not('inExtensionEditor'), ( ContextKeyExpr.equals('extensionStatus', 'installed')), ( ContextKeyExpr.has('extensionHasColorThemes'))))
|
|
1526
|
+
},
|
|
1527
|
+
run: async (accessor, extensionId) => {
|
|
1528
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1529
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1530
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, { id: extensionId }));
|
|
1531
|
+
if (extension) {
|
|
1532
|
+
const action = instantiationService.createInstance(SetColorThemeAction);
|
|
1533
|
+
action.extension = extension;
|
|
1534
|
+
return action.run();
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
});
|
|
1538
|
+
this.registerExtensionAction({
|
|
1539
|
+
id: SetFileIconThemeAction.ID,
|
|
1540
|
+
title: SetFileIconThemeAction.TITLE,
|
|
1541
|
+
menu: {
|
|
1542
|
+
id: MenuId.ExtensionContext,
|
|
1543
|
+
group: THEME_ACTIONS_GROUP,
|
|
1544
|
+
order: 0,
|
|
1545
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not('inExtensionEditor'), ( ContextKeyExpr.equals('extensionStatus', 'installed')), ( ContextKeyExpr.has('extensionHasFileIconThemes'))))
|
|
1546
|
+
},
|
|
1547
|
+
run: async (accessor, extensionId) => {
|
|
1548
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1549
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1550
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, { id: extensionId }));
|
|
1551
|
+
if (extension) {
|
|
1552
|
+
const action = instantiationService.createInstance(SetFileIconThemeAction);
|
|
1553
|
+
action.extension = extension;
|
|
1554
|
+
return action.run();
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
});
|
|
1558
|
+
this.registerExtensionAction({
|
|
1559
|
+
id: SetProductIconThemeAction.ID,
|
|
1560
|
+
title: SetProductIconThemeAction.TITLE,
|
|
1561
|
+
menu: {
|
|
1562
|
+
id: MenuId.ExtensionContext,
|
|
1563
|
+
group: THEME_ACTIONS_GROUP,
|
|
1564
|
+
order: 0,
|
|
1565
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not('inExtensionEditor'), ( ContextKeyExpr.equals('extensionStatus', 'installed')), ( ContextKeyExpr.has('extensionHasProductIconThemes'))))
|
|
1566
|
+
},
|
|
1567
|
+
run: async (accessor, extensionId) => {
|
|
1568
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1569
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1570
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, { id: extensionId }));
|
|
1571
|
+
if (extension) {
|
|
1572
|
+
const action = instantiationService.createInstance(SetProductIconThemeAction);
|
|
1573
|
+
action.extension = extension;
|
|
1574
|
+
return action.run();
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
});
|
|
1578
|
+
this.registerExtensionAction({
|
|
1579
|
+
id: 'workbench.extensions.action.showPreReleaseVersion',
|
|
1580
|
+
title: { value: ( localizeWithPath(
|
|
1581
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1582
|
+
'show pre-release version',
|
|
1583
|
+
"Show Pre-Release Version"
|
|
1584
|
+
)), original: 'Show Pre-Release Version' },
|
|
1585
|
+
menu: {
|
|
1586
|
+
id: MenuId.ExtensionContext,
|
|
1587
|
+
group: INSTALL_ACTIONS_GROUP,
|
|
1588
|
+
order: 0,
|
|
1589
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.has('inExtensionEditor')), ( ContextKeyExpr.has('extensionHasPreReleaseVersion')), ContextKeyExpr.not('showPreReleaseVersion'), ContextKeyExpr.not('isBuiltinExtension')))
|
|
1590
|
+
},
|
|
1591
|
+
run: async (accessor, extensionId) => {
|
|
1592
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1593
|
+
const extension = (await extensionWorkbenchService.getExtensions([{ id: extensionId }], CancellationToken.None))[0];
|
|
1594
|
+
extensionWorkbenchService.open(extension, { showPreReleaseVersion: true });
|
|
1595
|
+
}
|
|
1596
|
+
});
|
|
1597
|
+
this.registerExtensionAction({
|
|
1598
|
+
id: 'workbench.extensions.action.showReleasedVersion',
|
|
1599
|
+
title: { value: ( localizeWithPath(
|
|
1600
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1601
|
+
'show released version',
|
|
1602
|
+
"Show Release Version"
|
|
1603
|
+
)), original: 'Show Release Version' },
|
|
1604
|
+
menu: {
|
|
1605
|
+
id: MenuId.ExtensionContext,
|
|
1606
|
+
group: INSTALL_ACTIONS_GROUP,
|
|
1607
|
+
order: 1,
|
|
1608
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.has('inExtensionEditor')), ( ContextKeyExpr.has('extensionHasPreReleaseVersion')), ( ContextKeyExpr.has('extensionHasReleaseVersion')), ( ContextKeyExpr.has('showPreReleaseVersion')), ContextKeyExpr.not('isBuiltinExtension')))
|
|
1609
|
+
},
|
|
1610
|
+
run: async (accessor, extensionId) => {
|
|
1611
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1612
|
+
const extension = (await extensionWorkbenchService.getExtensions([{ id: extensionId }], CancellationToken.None))[0];
|
|
1613
|
+
extensionWorkbenchService.open(extension, { showPreReleaseVersion: false });
|
|
1614
|
+
}
|
|
1615
|
+
});
|
|
1616
|
+
this.registerExtensionAction({
|
|
1617
|
+
id: SwitchToPreReleaseVersionAction.ID,
|
|
1618
|
+
title: SwitchToPreReleaseVersionAction.TITLE,
|
|
1619
|
+
menu: {
|
|
1620
|
+
id: MenuId.ExtensionContext,
|
|
1621
|
+
group: INSTALL_ACTIONS_GROUP,
|
|
1622
|
+
order: 2,
|
|
1623
|
+
when: ( ContextKeyExpr.and(
|
|
1624
|
+
ContextKeyExpr.not('installedExtensionIsPreReleaseVersion'),
|
|
1625
|
+
ContextKeyExpr.not('installedExtensionIsOptedTpPreRelease'),
|
|
1626
|
+
( ContextKeyExpr.has('extensionHasPreReleaseVersion')),
|
|
1627
|
+
ContextKeyExpr.not('inExtensionEditor'),
|
|
1628
|
+
( ContextKeyExpr.equals('extensionStatus', 'installed')),
|
|
1629
|
+
ContextKeyExpr.not('isBuiltinExtension')
|
|
1630
|
+
))
|
|
1631
|
+
},
|
|
1632
|
+
run: async (accessor, id) => {
|
|
1633
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1634
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, { id }));
|
|
1635
|
+
if (extension) {
|
|
1636
|
+
extensionWorkbenchService.open(extension, { showPreReleaseVersion: true });
|
|
1637
|
+
await extensionWorkbenchService.install(extension, { installPreReleaseVersion: true });
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
});
|
|
1641
|
+
this.registerExtensionAction({
|
|
1642
|
+
id: SwitchToReleasedVersionAction.ID,
|
|
1643
|
+
title: SwitchToReleasedVersionAction.TITLE,
|
|
1644
|
+
menu: {
|
|
1645
|
+
id: MenuId.ExtensionContext,
|
|
1646
|
+
group: INSTALL_ACTIONS_GROUP,
|
|
1647
|
+
order: 3,
|
|
1648
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.has('installedExtensionIsPreReleaseVersion')), ( ContextKeyExpr.has('extensionHasPreReleaseVersion')), ( ContextKeyExpr.has('extensionHasReleaseVersion')), ContextKeyExpr.not('inExtensionEditor'), ( ContextKeyExpr.equals('extensionStatus', 'installed')), ContextKeyExpr.not('isBuiltinExtension')))
|
|
1649
|
+
},
|
|
1650
|
+
run: async (accessor, id) => {
|
|
1651
|
+
const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1652
|
+
const extension = extensionWorkbenchService.local.find(e => areSameExtensions(e.identifier, { id }));
|
|
1653
|
+
if (extension) {
|
|
1654
|
+
extensionWorkbenchService.open(extension, { showPreReleaseVersion: false });
|
|
1655
|
+
await extensionWorkbenchService.install(extension, { installPreReleaseVersion: false });
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1659
|
+
this.registerExtensionAction({
|
|
1660
|
+
id: ClearLanguageAction.ID,
|
|
1661
|
+
title: ClearLanguageAction.TITLE,
|
|
1662
|
+
menu: {
|
|
1663
|
+
id: MenuId.ExtensionContext,
|
|
1664
|
+
group: INSTALL_ACTIONS_GROUP,
|
|
1665
|
+
order: 0,
|
|
1666
|
+
when: ( ContextKeyExpr.and(ContextKeyExpr.not('inExtensionEditor'), ( ContextKeyExpr.has('canSetLanguage')), ( ContextKeyExpr.has('isActiveLanguagePackExtension'))))
|
|
1667
|
+
},
|
|
1668
|
+
run: async (accessor, extensionId) => {
|
|
1669
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
1670
|
+
const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService);
|
|
1671
|
+
const extension = (await extensionsWorkbenchService.getExtensions([{ id: extensionId }], CancellationToken.None))[0];
|
|
1672
|
+
const action = instantiationService.createInstance(ClearLanguageAction);
|
|
1673
|
+
action.extension = extension;
|
|
1674
|
+
return action.run();
|
|
1675
|
+
}
|
|
1676
|
+
});
|
|
1677
|
+
this.registerExtensionAction({
|
|
1678
|
+
id: 'workbench.extensions.action.copyExtension',
|
|
1679
|
+
title: { value: ( localizeWithPath(
|
|
1680
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1681
|
+
'workbench.extensions.action.copyExtension',
|
|
1682
|
+
"Copy"
|
|
1683
|
+
)), original: 'Copy' },
|
|
1684
|
+
menu: {
|
|
1685
|
+
id: MenuId.ExtensionContext,
|
|
1686
|
+
group: '1_copy'
|
|
1687
|
+
},
|
|
1688
|
+
run: async (accessor, extensionId) => {
|
|
1689
|
+
const clipboardService = accessor.get(IClipboardService);
|
|
1690
|
+
const extension = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, { id: extensionId }))[0]
|
|
1691
|
+
|| (await this.extensionsWorkbenchService.getExtensions([{ id: extensionId }], CancellationToken.None))[0];
|
|
1692
|
+
if (extension) {
|
|
1693
|
+
const name = ( localizeWithPath(
|
|
1694
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1695
|
+
'extensionInfoName',
|
|
1696
|
+
'Name: {0}',
|
|
1697
|
+
extension.displayName
|
|
1698
|
+
));
|
|
1699
|
+
const id = ( localizeWithPath(
|
|
1700
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1701
|
+
'extensionInfoId',
|
|
1702
|
+
'Id: {0}',
|
|
1703
|
+
extensionId
|
|
1704
|
+
));
|
|
1705
|
+
const description = ( localizeWithPath(
|
|
1706
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1707
|
+
'extensionInfoDescription',
|
|
1708
|
+
'Description: {0}',
|
|
1709
|
+
extension.description
|
|
1710
|
+
));
|
|
1711
|
+
const verision = ( localizeWithPath(
|
|
1712
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1713
|
+
'extensionInfoVersion',
|
|
1714
|
+
'Version: {0}',
|
|
1715
|
+
extension.version
|
|
1716
|
+
));
|
|
1717
|
+
const publisher = ( localizeWithPath(
|
|
1718
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1719
|
+
'extensionInfoPublisher',
|
|
1720
|
+
'Publisher: {0}',
|
|
1721
|
+
extension.publisherDisplayName
|
|
1722
|
+
));
|
|
1723
|
+
const link = extension.url ? ( localizeWithPath(
|
|
1724
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1725
|
+
'extensionInfoVSMarketplaceLink',
|
|
1726
|
+
'VS Marketplace Link: {0}',
|
|
1727
|
+
`${extension.url}`
|
|
1728
|
+
)) : null;
|
|
1729
|
+
const clipboardStr = `${name}\n${id}\n${description}\n${verision}\n${publisher}${link ? '\n' + link : ''}`;
|
|
1730
|
+
await clipboardService.writeText(clipboardStr);
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
});
|
|
1734
|
+
this.registerExtensionAction({
|
|
1735
|
+
id: 'workbench.extensions.action.copyExtensionId',
|
|
1736
|
+
title: { value: ( localizeWithPath(
|
|
1737
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1738
|
+
'workbench.extensions.action.copyExtensionId',
|
|
1739
|
+
"Copy Extension ID"
|
|
1740
|
+
)), original: 'Copy Extension ID' },
|
|
1741
|
+
menu: {
|
|
1742
|
+
id: MenuId.ExtensionContext,
|
|
1743
|
+
group: '1_copy'
|
|
1744
|
+
},
|
|
1745
|
+
run: async (accessor, id) => accessor.get(IClipboardService).writeText(id)
|
|
1746
|
+
});
|
|
1747
|
+
this.registerExtensionAction({
|
|
1748
|
+
id: 'workbench.extensions.action.configure',
|
|
1749
|
+
title: { value: ( localizeWithPath(
|
|
1750
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1751
|
+
'workbench.extensions.action.configure',
|
|
1752
|
+
"Extension Settings"
|
|
1753
|
+
)), original: 'Extension Settings' },
|
|
1754
|
+
menu: {
|
|
1755
|
+
id: MenuId.ExtensionContext,
|
|
1756
|
+
group: '2_configure',
|
|
1757
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('extensionStatus', 'installed')), ( ContextKeyExpr.has('extensionHasConfiguration')))),
|
|
1758
|
+
order: 1
|
|
1759
|
+
},
|
|
1760
|
+
run: async (accessor, id) => accessor.get(IPreferencesService).openSettings({ jsonEditor: false, query: `@ext:${id}` })
|
|
1761
|
+
});
|
|
1762
|
+
this.registerExtensionAction({
|
|
1763
|
+
id: 'workbench.extensions.action.configureKeybindings',
|
|
1764
|
+
title: { value: ( localizeWithPath(
|
|
1765
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1766
|
+
'workbench.extensions.action.configureKeybindings',
|
|
1767
|
+
"Extension Keyboard Shortcuts"
|
|
1768
|
+
)), original: 'Extension Keyboard Shortcuts' },
|
|
1769
|
+
menu: {
|
|
1770
|
+
id: MenuId.ExtensionContext,
|
|
1771
|
+
group: '2_configure',
|
|
1772
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('extensionStatus', 'installed')), ( ContextKeyExpr.has('extensionHasKeybindings')))),
|
|
1773
|
+
order: 2
|
|
1774
|
+
},
|
|
1775
|
+
run: async (accessor, id) => accessor.get(IPreferencesService).openGlobalKeybindingSettings(false, { query: `@ext:${id}` })
|
|
1776
|
+
});
|
|
1777
|
+
this.registerExtensionAction({
|
|
1778
|
+
id: 'workbench.extensions.action.toggleApplyToAllProfiles',
|
|
1779
|
+
title: { value: ( localizeWithPath(
|
|
1780
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1781
|
+
'workbench.extensions.action.toggleApplyToAllProfiles',
|
|
1782
|
+
"Apply Extension to all Profiles"
|
|
1783
|
+
)), original: `Apply Extension to all Profiles` },
|
|
1784
|
+
toggled: ( ContextKeyExpr.has('isApplicationScopedExtension')),
|
|
1785
|
+
menu: {
|
|
1786
|
+
id: MenuId.ExtensionContext,
|
|
1787
|
+
group: '2_configure',
|
|
1788
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('extensionStatus', 'installed')), ( ( ContextKeyExpr.has('isDefaultApplicationScopedExtension')).negate()), ( ( ContextKeyExpr.has('isBuiltinExtension')).negate()))),
|
|
1789
|
+
order: 3
|
|
1790
|
+
},
|
|
1791
|
+
run: async (accessor, id) => {
|
|
1792
|
+
const extension = this.extensionsWorkbenchService.local.find(e => areSameExtensions({ id }, e.identifier));
|
|
1793
|
+
if (extension) {
|
|
1794
|
+
return this.extensionsWorkbenchService.toggleApplyExtensionToAllProfiles(extension);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
});
|
|
1798
|
+
this.registerExtensionAction({
|
|
1799
|
+
id: TOGGLE_IGNORE_EXTENSION_ACTION_ID,
|
|
1800
|
+
title: { value: ( localizeWithPath(
|
|
1801
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1802
|
+
'workbench.extensions.action.toggleIgnoreExtension',
|
|
1803
|
+
"Sync This Extension"
|
|
1804
|
+
)), original: `Sync This Extension` },
|
|
1805
|
+
menu: {
|
|
1806
|
+
id: MenuId.ExtensionContext,
|
|
1807
|
+
group: '2_configure',
|
|
1808
|
+
when: ( ContextKeyExpr.and(CONTEXT_SYNC_ENABLEMENT, ( ( ContextKeyExpr.has('inExtensionEditor')).negate()))),
|
|
1809
|
+
order: 4
|
|
1810
|
+
},
|
|
1811
|
+
run: async (accessor, id) => {
|
|
1812
|
+
const extension = this.extensionsWorkbenchService.local.find(e => areSameExtensions({ id }, e.identifier));
|
|
1813
|
+
if (extension) {
|
|
1814
|
+
return this.extensionsWorkbenchService.toggleExtensionIgnoredToSync(extension);
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
});
|
|
1818
|
+
this.registerExtensionAction({
|
|
1819
|
+
id: 'workbench.extensions.action.ignoreRecommendation',
|
|
1820
|
+
title: { value: ( localizeWithPath(
|
|
1821
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1822
|
+
'workbench.extensions.action.ignoreRecommendation',
|
|
1823
|
+
"Ignore Recommendation"
|
|
1824
|
+
)), original: `Ignore Recommendation` },
|
|
1825
|
+
menu: {
|
|
1826
|
+
id: MenuId.ExtensionContext,
|
|
1827
|
+
group: '3_recommendations',
|
|
1828
|
+
when: ( ContextKeyExpr.has('isExtensionRecommended')),
|
|
1829
|
+
order: 1
|
|
1830
|
+
},
|
|
1831
|
+
run: async (accessor, id) => accessor.get(IExtensionIgnoredRecommendationsService).toggleGlobalIgnoredRecommendation(id, true)
|
|
1832
|
+
});
|
|
1833
|
+
this.registerExtensionAction({
|
|
1834
|
+
id: 'workbench.extensions.action.undoIgnoredRecommendation',
|
|
1835
|
+
title: { value: ( localizeWithPath(
|
|
1836
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1837
|
+
'workbench.extensions.action.undoIgnoredRecommendation',
|
|
1838
|
+
"Undo Ignored Recommendation"
|
|
1839
|
+
)), original: `Undo Ignored Recommendation` },
|
|
1840
|
+
menu: {
|
|
1841
|
+
id: MenuId.ExtensionContext,
|
|
1842
|
+
group: '3_recommendations',
|
|
1843
|
+
when: ( ContextKeyExpr.has('isUserIgnoredRecommendation')),
|
|
1844
|
+
order: 1
|
|
1845
|
+
},
|
|
1846
|
+
run: async (accessor, id) => accessor.get(IExtensionIgnoredRecommendationsService).toggleGlobalIgnoredRecommendation(id, false)
|
|
1847
|
+
});
|
|
1848
|
+
this.registerExtensionAction({
|
|
1849
|
+
id: 'workbench.extensions.action.addExtensionToWorkspaceRecommendations',
|
|
1850
|
+
title: { value: ( localizeWithPath(
|
|
1851
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1852
|
+
'workbench.extensions.action.addExtensionToWorkspaceRecommendations',
|
|
1853
|
+
"Add to Workspace Recommendations"
|
|
1854
|
+
)), original: `Add to Workspace Recommendations` },
|
|
1855
|
+
menu: {
|
|
1856
|
+
id: MenuId.ExtensionContext,
|
|
1857
|
+
group: '3_recommendations',
|
|
1858
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo('empty')), ( ( ContextKeyExpr.has('isBuiltinExtension')).negate()), ( ( ContextKeyExpr.has('isExtensionWorkspaceRecommended')).negate()), ( ( ContextKeyExpr.has('isUserIgnoredRecommendation')).negate()))),
|
|
1859
|
+
order: 2
|
|
1860
|
+
},
|
|
1861
|
+
run: (accessor, id) => accessor.get(IWorkspaceExtensionsConfigService).toggleRecommendation(id)
|
|
1862
|
+
});
|
|
1863
|
+
this.registerExtensionAction({
|
|
1864
|
+
id: 'workbench.extensions.action.removeExtensionFromWorkspaceRecommendations',
|
|
1865
|
+
title: { value: ( localizeWithPath(
|
|
1866
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1867
|
+
'workbench.extensions.action.removeExtensionFromWorkspaceRecommendations',
|
|
1868
|
+
"Remove from Workspace Recommendations"
|
|
1869
|
+
)), original: `Remove from Workspace Recommendations` },
|
|
1870
|
+
menu: {
|
|
1871
|
+
id: MenuId.ExtensionContext,
|
|
1872
|
+
group: '3_recommendations',
|
|
1873
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo('empty')), ( ( ContextKeyExpr.has('isBuiltinExtension')).negate()), ( ContextKeyExpr.has('isExtensionWorkspaceRecommended')))),
|
|
1874
|
+
order: 2
|
|
1875
|
+
},
|
|
1876
|
+
run: (accessor, id) => accessor.get(IWorkspaceExtensionsConfigService).toggleRecommendation(id)
|
|
1877
|
+
});
|
|
1878
|
+
this.registerExtensionAction({
|
|
1879
|
+
id: 'workbench.extensions.action.addToWorkspaceRecommendations',
|
|
1880
|
+
title: { value: ( localizeWithPath(
|
|
1881
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1882
|
+
'workbench.extensions.action.addToWorkspaceRecommendations',
|
|
1883
|
+
"Add Extension to Workspace Recommendations"
|
|
1884
|
+
)), original: `Add Extension to Workspace Recommendations` },
|
|
1885
|
+
category: ( localizeWithPath(
|
|
1886
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1887
|
+
'extensions',
|
|
1888
|
+
"Extensions"
|
|
1889
|
+
)),
|
|
1890
|
+
menu: {
|
|
1891
|
+
id: MenuId.CommandPalette,
|
|
1892
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.isEqualTo('workspace')), ( ContextKeyExpr.equals('resourceScheme', Schemas.extension)))),
|
|
1893
|
+
},
|
|
1894
|
+
async run(accessor) {
|
|
1895
|
+
const editorService = accessor.get(IEditorService);
|
|
1896
|
+
const workspaceExtensionsConfigService = accessor.get(IWorkspaceExtensionsConfigService);
|
|
1897
|
+
if (!(editorService.activeEditor instanceof ExtensionsInput)) {
|
|
1898
|
+
return;
|
|
1899
|
+
}
|
|
1900
|
+
const extensionId = editorService.activeEditor.extension.identifier.id.toLowerCase();
|
|
1901
|
+
const recommendations = await workspaceExtensionsConfigService.getRecommendations();
|
|
1902
|
+
if (recommendations.includes(extensionId)) {
|
|
1903
|
+
return;
|
|
1904
|
+
}
|
|
1905
|
+
await workspaceExtensionsConfigService.toggleRecommendation(extensionId);
|
|
1906
|
+
}
|
|
1907
|
+
});
|
|
1908
|
+
this.registerExtensionAction({
|
|
1909
|
+
id: 'workbench.extensions.action.addToWorkspaceFolderRecommendations',
|
|
1910
|
+
title: { value: ( localizeWithPath(
|
|
1911
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1912
|
+
'workbench.extensions.action.addToWorkspaceFolderRecommendations',
|
|
1913
|
+
"Add Extension to Workspace Folder Recommendations"
|
|
1914
|
+
)), original: `Add Extension to Workspace Folder Recommendations` },
|
|
1915
|
+
category: ( localizeWithPath(
|
|
1916
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1917
|
+
'extensions',
|
|
1918
|
+
"Extensions"
|
|
1919
|
+
)),
|
|
1920
|
+
menu: {
|
|
1921
|
+
id: MenuId.CommandPalette,
|
|
1922
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.isEqualTo('folder')), ( ContextKeyExpr.equals('resourceScheme', Schemas.extension)))),
|
|
1923
|
+
},
|
|
1924
|
+
run: () => this.commandService.executeCommand('workbench.extensions.action.addToWorkspaceRecommendations')
|
|
1925
|
+
});
|
|
1926
|
+
this.registerExtensionAction({
|
|
1927
|
+
id: 'workbench.extensions.action.addToWorkspaceIgnoredRecommendations',
|
|
1928
|
+
title: { value: ( localizeWithPath(
|
|
1929
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1930
|
+
'workbench.extensions.action.addToWorkspaceIgnoredRecommendations',
|
|
1931
|
+
"Add Extension to Workspace Ignored Recommendations"
|
|
1932
|
+
)), original: `Add Extension to Workspace Ignored Recommendations` },
|
|
1933
|
+
category: ( localizeWithPath(
|
|
1934
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1935
|
+
'extensions',
|
|
1936
|
+
"Extensions"
|
|
1937
|
+
)),
|
|
1938
|
+
menu: {
|
|
1939
|
+
id: MenuId.CommandPalette,
|
|
1940
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.isEqualTo('workspace')), ( ContextKeyExpr.equals('resourceScheme', Schemas.extension)))),
|
|
1941
|
+
},
|
|
1942
|
+
async run(accessor) {
|
|
1943
|
+
const editorService = accessor.get(IEditorService);
|
|
1944
|
+
const workspaceExtensionsConfigService = accessor.get(IWorkspaceExtensionsConfigService);
|
|
1945
|
+
if (!(editorService.activeEditor instanceof ExtensionsInput)) {
|
|
1946
|
+
return;
|
|
1947
|
+
}
|
|
1948
|
+
const extensionId = editorService.activeEditor.extension.identifier.id.toLowerCase();
|
|
1949
|
+
const unwantedRecommendations = await workspaceExtensionsConfigService.getUnwantedRecommendations();
|
|
1950
|
+
if (unwantedRecommendations.includes(extensionId)) {
|
|
1951
|
+
return;
|
|
1952
|
+
}
|
|
1953
|
+
await workspaceExtensionsConfigService.toggleUnwantedRecommendation(extensionId);
|
|
1954
|
+
}
|
|
1955
|
+
});
|
|
1956
|
+
this.registerExtensionAction({
|
|
1957
|
+
id: 'workbench.extensions.action.addToWorkspaceFolderIgnoredRecommendations',
|
|
1958
|
+
title: { value: ( localizeWithPath(
|
|
1959
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1960
|
+
'workbench.extensions.action.addToWorkspaceFolderIgnoredRecommendations',
|
|
1961
|
+
"Add Extension to Workspace Folder Ignored Recommendations"
|
|
1962
|
+
)), original: `Add Extension to Workspace Folder Ignored Recommendations` },
|
|
1963
|
+
category: ( localizeWithPath(
|
|
1964
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1965
|
+
'extensions',
|
|
1966
|
+
"Extensions"
|
|
1967
|
+
)),
|
|
1968
|
+
menu: {
|
|
1969
|
+
id: MenuId.CommandPalette,
|
|
1970
|
+
when: ( ContextKeyExpr.and(( WorkbenchStateContext.isEqualTo('folder')), ( ContextKeyExpr.equals('resourceScheme', Schemas.extension)))),
|
|
1971
|
+
},
|
|
1972
|
+
run: () => this.commandService.executeCommand('workbench.extensions.action.addToWorkspaceIgnoredRecommendations')
|
|
1973
|
+
});
|
|
1974
|
+
this.registerExtensionAction({
|
|
1975
|
+
id: ConfigureWorkspaceRecommendedExtensionsAction.ID,
|
|
1976
|
+
title: { value: ConfigureWorkspaceRecommendedExtensionsAction.LABEL, original: 'Configure Recommended Extensions (Workspace)' },
|
|
1977
|
+
category: ( localizeWithPath(
|
|
1978
|
+
'vs/workbench/contrib/extensions/browser/extensions.contribution',
|
|
1979
|
+
'extensions',
|
|
1980
|
+
"Extensions"
|
|
1981
|
+
)),
|
|
1982
|
+
menu: {
|
|
1983
|
+
id: MenuId.CommandPalette,
|
|
1984
|
+
when: ( WorkbenchStateContext.isEqualTo('workspace')),
|
|
1985
|
+
},
|
|
1986
|
+
run: () => runAction(this.instantiationService.createInstance(ConfigureWorkspaceRecommendedExtensionsAction, ConfigureWorkspaceRecommendedExtensionsAction.ID, ConfigureWorkspaceRecommendedExtensionsAction.LABEL))
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
registerExtensionAction(extensionActionOptions) {
|
|
1990
|
+
const menus = extensionActionOptions.menu ? Array.isArray(extensionActionOptions.menu) ? extensionActionOptions.menu : [extensionActionOptions.menu] : [];
|
|
1991
|
+
let menusWithOutTitles = [];
|
|
1992
|
+
const menusWithTitles = [];
|
|
1993
|
+
if (extensionActionOptions.menuTitles) {
|
|
1994
|
+
for (let index = 0; index < menus.length; index++) {
|
|
1995
|
+
const menu = menus[index];
|
|
1996
|
+
const menuTitle = extensionActionOptions.menuTitles[menu.id.id];
|
|
1997
|
+
if (menuTitle) {
|
|
1998
|
+
menusWithTitles.push({ id: menu.id, item: { ...menu, command: { id: extensionActionOptions.id, title: menuTitle } } });
|
|
1999
|
+
}
|
|
2000
|
+
else {
|
|
2001
|
+
menusWithOutTitles.push(menu);
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
else {
|
|
2006
|
+
menusWithOutTitles = menus;
|
|
2007
|
+
}
|
|
2008
|
+
const disposables = ( new DisposableStore());
|
|
2009
|
+
disposables.add(registerAction2(class extends Action2 {
|
|
2010
|
+
constructor() {
|
|
2011
|
+
super({
|
|
2012
|
+
...extensionActionOptions,
|
|
2013
|
+
menu: menusWithOutTitles
|
|
2014
|
+
});
|
|
2015
|
+
}
|
|
2016
|
+
run(accessor, ...args) {
|
|
2017
|
+
return extensionActionOptions.run(accessor, ...args);
|
|
2018
|
+
}
|
|
2019
|
+
}));
|
|
2020
|
+
if (menusWithTitles.length) {
|
|
2021
|
+
disposables.add(MenuRegistry.appendMenuItems(menusWithTitles));
|
|
2022
|
+
}
|
|
2023
|
+
return disposables;
|
|
2024
|
+
}
|
|
2025
|
+
};
|
|
2026
|
+
ExtensionsContributions = ( __decorate([
|
|
2027
|
+
( __param(0, IExtensionManagementServerService)),
|
|
2028
|
+
( __param(1, IExtensionGalleryService)),
|
|
2029
|
+
( __param(2, IContextKeyService)),
|
|
2030
|
+
( __param(3, IPaneCompositePartService)),
|
|
2031
|
+
( __param(4, IExtensionsWorkbenchService)),
|
|
2032
|
+
( __param(5, IWorkbenchExtensionEnablementService)),
|
|
2033
|
+
( __param(6, IInstantiationService)),
|
|
2034
|
+
( __param(7, IDialogService)),
|
|
2035
|
+
( __param(8, ICommandService))
|
|
2036
|
+
], ExtensionsContributions));
|
|
2037
|
+
let ExtensionStorageCleaner = class ExtensionStorageCleaner {
|
|
2038
|
+
constructor(extensionManagementService, storageService) {
|
|
2039
|
+
ExtensionStorageService.removeOutdatedExtensionVersions(extensionManagementService, storageService);
|
|
2040
|
+
}
|
|
2041
|
+
};
|
|
2042
|
+
ExtensionStorageCleaner = ( __decorate([
|
|
2043
|
+
( __param(0, IExtensionManagementService)),
|
|
2044
|
+
( __param(1, IStorageService))
|
|
2045
|
+
], ExtensionStorageCleaner));
|
|
2046
|
+
const workbenchRegistry = ( Registry.as(Extensions$3.Workbench));
|
|
2047
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionsContributions, 3 );
|
|
2048
|
+
workbenchRegistry.registerWorkbenchContribution(StatusUpdater, 4 );
|
|
2049
|
+
workbenchRegistry.registerWorkbenchContribution(MaliciousExtensionChecker, 4 );
|
|
2050
|
+
workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, 3 );
|
|
2051
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, 3 );
|
|
2052
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionActivationProgress, 4 );
|
|
2053
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionDependencyChecker, 4 );
|
|
2054
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionEnablementWorkspaceTrustTransitionParticipant, 3 );
|
|
2055
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionsCompletionItemsProvider, 3 );
|
|
2056
|
+
workbenchRegistry.registerWorkbenchContribution(UnsupportedExtensionsMigrationContrib, 4 );
|
|
2057
|
+
workbenchRegistry.registerWorkbenchContribution(DeprecatedExtensionsChecker, 4 );
|
|
2058
|
+
if (isWeb) {
|
|
2059
|
+
workbenchRegistry.registerWorkbenchContribution(ExtensionStorageCleaner, 4 );
|
|
2060
|
+
}
|
|
2061
|
+
registerAction2(ShowRuntimeExtensionsAction);
|
|
2062
|
+
|
|
2063
|
+
export { CONTEXT_HAS_LOCAL_SERVER, CONTEXT_HAS_REMOTE_SERVER, CONTEXT_HAS_WEB_SERVER };
|