|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information. |
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
6 | | -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; |
7 | | -import { getGalleryExtensionId, areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; |
| 6 | +import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; |
8 | 7 | import * as strings from 'vs/base/common/strings'; |
9 | | -import { isNonEmptyArray } from 'vs/base/common/arrays'; |
10 | 8 | import { ILocalization } from 'vs/platform/localizations/common/localizations'; |
11 | 9 | import { URI } from 'vs/base/common/uri'; |
12 | 10 |
|
@@ -174,39 +172,6 @@ export interface IExtension { |
174 | 172 | readonly location: URI; |
175 | 173 | } |
176 | 174 |
|
177 | | -const uiExtensions = new Set<string>(); |
178 | | -uiExtensions.add('msjsdiag.debugger-for-chrome'); |
179 | | - |
180 | | -export function isUIExtension(manifest: IExtensionManifest, configurationService: IConfigurationService): boolean { |
181 | | - const extensionId = getGalleryExtensionId(manifest.publisher, manifest.name); |
182 | | - const configuredUIExtensions = configurationService.getValue<string[]>('_workbench.uiExtensions') || []; |
183 | | - if (configuredUIExtensions.length) { |
184 | | - if (configuredUIExtensions.indexOf(extensionId) !== -1) { |
185 | | - return true; |
186 | | - } |
187 | | - if (configuredUIExtensions.indexOf(`-${extensionId}`) !== -1) { |
188 | | - return false; |
189 | | - } |
190 | | - } |
191 | | - switch (manifest.extensionKind) { |
192 | | - case 'ui': return true; |
193 | | - case 'workspace': return false; |
194 | | - default: { |
195 | | - if (uiExtensions.has(extensionId)) { |
196 | | - return true; |
197 | | - } |
198 | | - if (manifest.main) { |
199 | | - return false; |
200 | | - } |
201 | | - if (manifest.contributes && isNonEmptyArray(manifest.contributes.debuggers)) { |
202 | | - return false; |
203 | | - } |
204 | | - // Default is UI Extension |
205 | | - return true; |
206 | | - } |
207 | | - } |
208 | | -} |
209 | | - |
210 | 175 | /** |
211 | 176 | * **!Do not construct directly!** |
212 | 177 | * |
|
0 commit comments