mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
parent
739d4803af
commit
0891d3031c
|
@ -13,7 +13,6 @@ import { Registry } from 'vs/platform/registry/common/platform';
|
|||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { localize } from 'vs/nls';
|
||||
import { WorkbenchList } from 'vs/platform/list/browser/listService';
|
||||
import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { getExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { IListRenderer, IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
|
||||
import { Button } from 'vs/base/browser/ui/button/button';
|
||||
|
@ -240,7 +239,7 @@ export class ExtensionFeaturesTab extends Themable {
|
|||
multipleSelectionSupport: false,
|
||||
setRowLineHeight: false,
|
||||
horizontalScrolling: false,
|
||||
accessibilityProvider: <IListAccessibilityProvider<IExtensionFeatureDescriptor | null>>{
|
||||
accessibilityProvider: {
|
||||
getAriaLabel(extensionFeature: IExtensionFeatureDescriptor | null): string {
|
||||
return extensionFeature?.label ?? '';
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { localize, localize2 } from 'vs/nls';
|
||||
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { MenuRegistry, MenuId, registerAction2, Action2, ISubmenuItem, IMenuItem, IAction2Options } from 'vs/platform/actions/common/actions';
|
||||
import { MenuRegistry, MenuId, registerAction2, Action2, IMenuItem, IAction2Options } from 'vs/platform/actions/common/actions';
|
||||
import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { ExtensionsLocalizedLabel, IExtensionManagementService, IExtensionGalleryService, PreferencesLocalizedLabel, InstallOperation, EXTENSION_INSTALL_SOURCE_CONTEXT, ExtensionInstallSource } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { EnablementState, IExtensionManagementServerService, IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementService, extensionsConfigurationNodeBase } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||
|
@ -635,7 +635,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
|
|||
});
|
||||
|
||||
const autoUpdateExtensionsSubMenu = new MenuId('autoUpdateExtensionsSubMenu');
|
||||
MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, <ISubmenuItem>{
|
||||
MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
||||
submenu: autoUpdateExtensionsSubMenu,
|
||||
title: localize('configure auto updating extensions', "Auto Update Extensions"),
|
||||
when: ContextKeyExpr.and(ContextKeyExpr.equals('viewContainer', VIEWLET_ID), CONTEXT_HAS_GALLERY),
|
||||
|
@ -930,7 +930,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
|
|||
});
|
||||
|
||||
const extensionsFilterSubMenu = new MenuId('extensionsFilterSubMenu');
|
||||
MenuRegistry.appendMenuItem(extensionsSearchActionsMenu, <ISubmenuItem>{
|
||||
MenuRegistry.appendMenuItem(extensionsSearchActionsMenu, {
|
||||
submenu: extensionsFilterSubMenu,
|
||||
title: localize('filterExtensions', "Filter Extensions..."),
|
||||
group: 'navigation',
|
||||
|
@ -1016,7 +1016,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
|
|||
});
|
||||
|
||||
const extensionsCategoryFilterSubMenu = new MenuId('extensionsCategoryFilterSubMenu');
|
||||
MenuRegistry.appendMenuItem(extensionsFilterSubMenu, <ISubmenuItem>{
|
||||
MenuRegistry.appendMenuItem(extensionsFilterSubMenu, {
|
||||
submenu: extensionsCategoryFilterSubMenu,
|
||||
title: localize('filter by category', "Category"),
|
||||
when: CONTEXT_HAS_GALLERY,
|
||||
|
@ -1129,7 +1129,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
|
|||
});
|
||||
|
||||
const extensionsSortSubMenu = new MenuId('extensionsSortSubMenu');
|
||||
MenuRegistry.appendMenuItem(extensionsFilterSubMenu, <ISubmenuItem>{
|
||||
MenuRegistry.appendMenuItem(extensionsFilterSubMenu, {
|
||||
submenu: extensionsSortSubMenu,
|
||||
title: localize('sorty by', "Sort By"),
|
||||
when: ContextKeyExpr.and(ContextKeyExpr.or(CONTEXT_HAS_GALLERY, DefaultViewsContext)),
|
||||
|
|
|
@ -39,7 +39,7 @@ import { PICK_WORKSPACE_FOLDER_COMMAND_ID } from 'vs/workbench/browser/actions/w
|
|||
import { INotificationService, IPromptChoice, Severity } from 'vs/platform/notification/common/notification';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IQuickPickItem, IQuickInputService, IQuickPickSeparator, QuickPickItem } from 'vs/platform/quickinput/common/quickInput';
|
||||
import { IQuickPickItem, IQuickInputService, QuickPickItem } from 'vs/platform/quickinput/common/quickInput';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { alert } from 'vs/base/browser/ui/aria/aria';
|
||||
import { IWorkbenchThemeService, IWorkbenchTheme, IWorkbenchColorTheme, IWorkbenchFileIconTheme, IWorkbenchProductIconTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
|
@ -1666,8 +1666,8 @@ function getQuickPickEntries(themes: IWorkbenchTheme[], currentTheme: IWorkbench
|
|||
}
|
||||
}
|
||||
if (showCurrentTheme) {
|
||||
picks.push(<IQuickPickSeparator>{ type: 'separator', label: localize('current', "current") });
|
||||
picks.push(<IQuickPickItem>{ label: currentTheme.label, id: currentTheme.id });
|
||||
picks.push({ type: 'separator', label: localize('current', "current") });
|
||||
picks.push({ label: currentTheme.label, id: currentTheme.id });
|
||||
}
|
||||
return picks;
|
||||
}
|
||||
|
@ -2086,7 +2086,7 @@ export abstract class AbstractConfigureRecommendedExtensionsAction extends Actio
|
|||
.then(reference => {
|
||||
const position = reference.object.textEditorModel.getPositionAt(offset);
|
||||
reference.dispose();
|
||||
return <ITextEditorSelection>{
|
||||
return {
|
||||
startLineNumber: position.lineNumber,
|
||||
startColumn: position.column,
|
||||
endLineNumber: position.lineNumber,
|
||||
|
@ -2667,7 +2667,7 @@ export class ReinstallAction extends Action {
|
|||
label: extension.displayName,
|
||||
description: extension.identifier.id,
|
||||
extension,
|
||||
} as (IQuickPickItem & { extension: IExtension });
|
||||
};
|
||||
});
|
||||
return entries;
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ import { listFocusForeground, listFocusBackground, foreground, editorBackground
|
|||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { IListAccessibilityProvider, IListStyles } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { IListStyles } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { HoverPosition } from 'vs/base/browser/ui/hover/hoverWidget';
|
||||
import { IStyleOverride } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { getAriaLabelForExtension } from 'vs/workbench/contrib/extensions/browser/extensionsViews';
|
||||
|
@ -264,7 +264,7 @@ export class ExtensionsTree extends WorkbenchAsyncDataTree<IExtensionData, IExte
|
|||
identityProvider,
|
||||
multipleSelectionSupport: false,
|
||||
overrideStyles,
|
||||
accessibilityProvider: <IListAccessibilityProvider<IExtensionData>>{
|
||||
accessibilityProvider: {
|
||||
getAriaLabel(extensionData: IExtensionData): string {
|
||||
return getAriaLabelForExtension(extensionData.extension);
|
||||
},
|
||||
|
|
|
@ -45,7 +45,6 @@ import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
|||
import { IViewDescriptorService, ViewContainerLocation } from 'vs/workbench/common/views';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences';
|
||||
import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
|
||||
import { IExtensionManifestPropertiesService } from 'vs/workbench/services/extensions/common/extensionManifestPropertiesService';
|
||||
import { isVirtualWorkspace } from 'vs/platform/workspace/common/virtualWorkspace';
|
||||
|
@ -207,7 +206,7 @@ export class ExtensionsListView extends ViewPane {
|
|||
multipleSelectionSupport: false,
|
||||
setRowLineHeight: false,
|
||||
horizontalScrolling: false,
|
||||
accessibilityProvider: <IListAccessibilityProvider<IExtension | null>>{
|
||||
accessibilityProvider: {
|
||||
getAriaLabel(extension: IExtension | null): string {
|
||||
return getAriaLabelForExtension(extension);
|
||||
},
|
||||
|
|
|
@ -20,7 +20,7 @@ export class KeymapRecommendations extends ExtensionRecommendations {
|
|||
|
||||
protected async doActivate(): Promise<void> {
|
||||
if (this.productService.keymapExtensionTips) {
|
||||
this._recommendations = this.productService.keymapExtensionTips.map(extensionId => (<ExtensionRecommendation>{
|
||||
this._recommendations = this.productService.keymapExtensionTips.map(extensionId => ({
|
||||
extension: extensionId.toLowerCase(),
|
||||
reason: {
|
||||
reasonId: ExtensionRecommendationReason.Application,
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Disposable, DisposableStore, IDisposable, MutableDisposable } from 'vs/
|
|||
import { isWeb } from 'vs/base/common/platform';
|
||||
import { ServicesAccessor } from 'vs/editor/browser/editorExtensions';
|
||||
import { localize, localize2 } from 'vs/nls';
|
||||
import { Action2, IMenuService, ISubmenuItem, MenuId, MenuRegistry, registerAction2 } from 'vs/platform/actions/common/actions';
|
||||
import { Action2, IMenuService, MenuId, MenuRegistry, registerAction2 } from 'vs/platform/actions/common/actions';
|
||||
import { ContextKeyExpr, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IUserDataProfile, IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';
|
||||
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
|
@ -92,7 +92,7 @@ export class UserDataProfilesWorkbenchContribution extends Disposable implements
|
|||
const getProfilesTitle = () => {
|
||||
return localize('profiles', "Profiles ({0})", this.userDataProfileService.currentProfile.name);
|
||||
};
|
||||
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, <ISubmenuItem>{
|
||||
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||
get title() {
|
||||
return getProfilesTitle();
|
||||
},
|
||||
|
@ -100,7 +100,7 @@ export class UserDataProfilesWorkbenchContribution extends Disposable implements
|
|||
group: '2_configuration',
|
||||
order: 1,
|
||||
});
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, <ISubmenuItem>{
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
get title() {
|
||||
return getProfilesTitle();
|
||||
},
|
||||
|
|
|
@ -92,7 +92,7 @@ export class UserDataSyncConflictsViewPane extends TreeViewPane implements IUser
|
|||
label: { label: basename(resource.remoteResource), strikethrough: resource.mergeState === MergeState.Accepted && (resource.localChange === Change.Deleted || resource.remoteChange === Change.Deleted) },
|
||||
description: getSyncAreaLabel(resource.syncResource),
|
||||
collapsibleState: TreeItemCollapsibleState.None,
|
||||
command: { id: `workbench.actions.sync.openConflicts`, title: '', arguments: [<TreeViewItemHandleArg>{ $treeViewId: '', $treeItemHandle: handle }] },
|
||||
command: { id: `workbench.actions.sync.openConflicts`, title: '', arguments: [{ $treeViewId: '', $treeItemHandle: handle } satisfies TreeViewItemHandleArg] },
|
||||
contextValue: `sync-conflict-resource`
|
||||
};
|
||||
children.push(treeItem);
|
||||
|
|
|
@ -61,7 +61,7 @@ export class UserDataSyncDataViews extends Disposable {
|
|||
private registerConflictsView(container: ViewContainer): void {
|
||||
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);
|
||||
const viewName = localize2('conflicts', "Conflicts");
|
||||
viewsRegistry.registerViews([<ITreeViewDescriptor>{
|
||||
const viewDescriptor: ITreeViewDescriptor = {
|
||||
id: SYNC_CONFLICTS_VIEW_ID,
|
||||
name: viewName,
|
||||
ctorDescriptor: new SyncDescriptor(UserDataSyncConflictsViewPane),
|
||||
|
@ -71,7 +71,8 @@ export class UserDataSyncDataViews extends Disposable {
|
|||
treeView: this.instantiationService.createInstance(TreeView, SYNC_CONFLICTS_VIEW_ID, viewName.value),
|
||||
collapsed: false,
|
||||
order: 100,
|
||||
}], container);
|
||||
};
|
||||
viewsRegistry.registerViews([viewDescriptor], container);
|
||||
}
|
||||
|
||||
private registerMachinesView(container: ViewContainer): void {
|
||||
|
@ -85,7 +86,7 @@ export class UserDataSyncDataViews extends Disposable {
|
|||
|
||||
this._register(Event.any(this.userDataSyncMachinesService.onDidChange, this.userDataSyncService.onDidResetRemote)(() => treeView.refresh()));
|
||||
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);
|
||||
viewsRegistry.registerViews([<ITreeViewDescriptor>{
|
||||
const viewDescriptor: ITreeViewDescriptor = {
|
||||
id,
|
||||
name,
|
||||
ctorDescriptor: new SyncDescriptor(TreeViewPane),
|
||||
|
@ -95,7 +96,8 @@ export class UserDataSyncDataViews extends Disposable {
|
|||
treeView,
|
||||
collapsed: false,
|
||||
order: 300,
|
||||
}], container);
|
||||
};
|
||||
viewsRegistry.registerViews([viewDescriptor], container);
|
||||
|
||||
this._register(registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
|
@ -152,7 +154,7 @@ export class UserDataSyncDataViews extends Disposable {
|
|||
this.userDataSyncService.onDidResetLocal,
|
||||
this.userDataSyncService.onDidResetRemote)(() => treeView.refresh()));
|
||||
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);
|
||||
viewsRegistry.registerViews([<ITreeViewDescriptor>{
|
||||
const viewDescriptor: ITreeViewDescriptor = {
|
||||
id,
|
||||
name,
|
||||
ctorDescriptor: new SyncDescriptor(TreeViewPane),
|
||||
|
@ -163,7 +165,8 @@ export class UserDataSyncDataViews extends Disposable {
|
|||
collapsed: false,
|
||||
order: remote ? 200 : 400,
|
||||
hideByDefault: !remote,
|
||||
}], container);
|
||||
};
|
||||
viewsRegistry.registerViews([viewDescriptor], container);
|
||||
|
||||
this.registerDataViewActions(id);
|
||||
}
|
||||
|
@ -178,7 +181,7 @@ export class UserDataSyncDataViews extends Disposable {
|
|||
treeView.dataProvider = dataProvider;
|
||||
|
||||
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);
|
||||
viewsRegistry.registerViews([<ITreeViewDescriptor>{
|
||||
const viewDescriptor: ITreeViewDescriptor = {
|
||||
id,
|
||||
name,
|
||||
ctorDescriptor: new SyncDescriptor(TreeViewPane),
|
||||
|
@ -188,7 +191,8 @@ export class UserDataSyncDataViews extends Disposable {
|
|||
treeView,
|
||||
collapsed: false,
|
||||
hideByDefault: false,
|
||||
}], container);
|
||||
};
|
||||
viewsRegistry.registerViews([viewDescriptor], container);
|
||||
|
||||
this._register(registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
|
@ -303,7 +307,7 @@ export class UserDataSyncDataViews extends Disposable {
|
|||
treeView.dataProvider = dataProvider;
|
||||
|
||||
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);
|
||||
viewsRegistry.registerViews([<ITreeViewDescriptor>{
|
||||
const viewDescriptor: ITreeViewDescriptor = {
|
||||
id,
|
||||
name,
|
||||
ctorDescriptor: new SyncDescriptor(TreeViewPane),
|
||||
|
@ -314,7 +318,8 @@ export class UserDataSyncDataViews extends Disposable {
|
|||
collapsed: false,
|
||||
order: 500,
|
||||
hideByDefault: true
|
||||
}], container);
|
||||
};
|
||||
viewsRegistry.registerViews([viewDescriptor], container);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue