mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
This reverts commit 5d44b6a6a7.
This commit is contained in:
@@ -24,10 +24,10 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { MenuItemAction, IMenuService, MenuId, IMenu } from 'vs/platform/actions/common/actions';
|
||||
import { IAction, Action, IActionViewItem, ActionRunner } from 'vs/base/common/actions';
|
||||
import { fillInContextMenuActions, ContextAwareMenuEntryActionViewItem, fillInActionBarActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { IAction, Action, IActionItem, ActionRunner } from 'vs/base/common/actions';
|
||||
import { fillInContextMenuActions, ContextAwareMenuItemActionItem, fillInActionBarActions } from 'vs/platform/actions/browser/menuItemActionItem';
|
||||
import { SCMMenus } from './scmMenus';
|
||||
import { ActionBar, IActionViewItemProvider, ActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { ActionBar, IActionItemProvider, ActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { IThemeService, LIGHT } from 'vs/platform/theme/common/themeService';
|
||||
import { isSCMResource } from './scmUtil';
|
||||
import { attachBadgeStyler, attachInputBoxStyler } from 'vs/platform/theme/common/styler';
|
||||
@@ -94,7 +94,7 @@ class StatusBarAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
class StatusBarActionViewItem extends ActionViewItem {
|
||||
class StatusBarActionItem extends ActionItem {
|
||||
|
||||
constructor(action: StatusBarAction) {
|
||||
super(null, action, {});
|
||||
@@ -160,7 +160,7 @@ class ProviderRenderer implements IListRenderer<ISCMRepository, RepositoryTempla
|
||||
const countContainer = append(provider, $('.count'));
|
||||
const count = new CountBadge(countContainer);
|
||||
const badgeStyler = attachBadgeStyler(count, this.themeService);
|
||||
const actionBar = new ActionBar(provider, { actionViewItemProvider: a => new StatusBarActionViewItem(a as StatusBarAction) });
|
||||
const actionBar = new ActionBar(provider, { actionItemProvider: a => new StatusBarActionItem(a as StatusBarAction) });
|
||||
const disposable = Disposable.None;
|
||||
const templateDisposable = combinedDisposable([actionBar, badgeStyler]);
|
||||
|
||||
@@ -366,7 +366,7 @@ class ResourceGroupRenderer implements IListRenderer<ISCMResourceGroup, Resource
|
||||
get templateId(): string { return ResourceGroupRenderer.TEMPLATE_ID; }
|
||||
|
||||
constructor(
|
||||
private actionViewItemProvider: IActionViewItemProvider,
|
||||
private actionItemProvider: IActionItemProvider,
|
||||
private themeService: IThemeService,
|
||||
private menus: SCMMenus
|
||||
) { }
|
||||
@@ -375,7 +375,7 @@ class ResourceGroupRenderer implements IListRenderer<ISCMResourceGroup, Resource
|
||||
const element = append(container, $('.resource-group'));
|
||||
const name = append(element, $('.name'));
|
||||
const actionsContainer = append(element, $('.actions'));
|
||||
const actionBar = new ActionBar(actionsContainer, { actionViewItemProvider: this.actionViewItemProvider });
|
||||
const actionBar = new ActionBar(actionsContainer, { actionItemProvider: this.actionItemProvider });
|
||||
const countContainer = append(element, $('.count'));
|
||||
const count = new CountBadge(countContainer);
|
||||
const styler = attachBadgeStyler(count, this.themeService);
|
||||
@@ -454,7 +454,7 @@ class ResourceRenderer implements IListRenderer<ISCMResource, ResourceTemplate>
|
||||
|
||||
constructor(
|
||||
private labels: ResourceLabels,
|
||||
private actionViewItemProvider: IActionViewItemProvider,
|
||||
private actionItemProvider: IActionItemProvider,
|
||||
private getSelectedResources: () => ISCMResource[],
|
||||
private themeService: IThemeService,
|
||||
private menus: SCMMenus
|
||||
@@ -466,7 +466,7 @@ class ResourceRenderer implements IListRenderer<ISCMResource, ResourceTemplate>
|
||||
const fileLabel = this.labels.create(name);
|
||||
const actionsContainer = append(fileLabel.element, $('.actions'));
|
||||
const actionBar = new ActionBar(actionsContainer, {
|
||||
actionViewItemProvider: this.actionViewItemProvider,
|
||||
actionItemProvider: this.actionItemProvider,
|
||||
actionRunner: new MultipleSelectionActionRunner(this.getSelectedResources)
|
||||
});
|
||||
|
||||
@@ -827,14 +827,14 @@ export class RepositoryPanel extends ViewletPanel {
|
||||
|
||||
const delegate = new ProviderListDelegate();
|
||||
|
||||
const actionViewItemProvider = (action: IAction) => this.getActionViewItem(action);
|
||||
const actionItemProvider = (action: IAction) => this.getActionItem(action);
|
||||
|
||||
this.listLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility });
|
||||
this.disposables.push(this.listLabels);
|
||||
|
||||
const renderers = [
|
||||
new ResourceGroupRenderer(actionViewItemProvider, this.themeService, this.menus),
|
||||
new ResourceRenderer(this.listLabels, actionViewItemProvider, () => this.getSelectedResources(), this.themeService, this.menus)
|
||||
new ResourceGroupRenderer(actionItemProvider, this.themeService, this.menus),
|
||||
new ResourceRenderer(this.listLabels, actionItemProvider, () => this.getSelectedResources(), this.themeService, this.menus)
|
||||
];
|
||||
|
||||
this.list = this.instantiationService.createInstance(WorkbenchList, this.listContainer, delegate, renderers, {
|
||||
@@ -918,12 +918,12 @@ export class RepositoryPanel extends ViewletPanel {
|
||||
return this.menus.getTitleSecondaryActions();
|
||||
}
|
||||
|
||||
getActionViewItem(action: IAction): IActionViewItem | undefined {
|
||||
getActionItem(action: IAction): IActionItem | undefined {
|
||||
if (!(action instanceof MenuItemAction)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return new ContextAwareMenuEntryActionViewItem(action, this.keybindingService, this.notificationService, this.contextMenuService);
|
||||
return new ContextAwareMenuItemActionItem(action, this.keybindingService, this.notificationService, this.contextMenuService);
|
||||
}
|
||||
|
||||
getActionsContext(): any {
|
||||
@@ -1227,12 +1227,12 @@ export class SCMViewlet extends ViewContainerViewlet implements IViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
getActionViewItem(action: IAction): IActionViewItem | undefined {
|
||||
getActionItem(action: IAction): IActionItem | undefined {
|
||||
if (!(action instanceof MenuItemAction)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return new ContextAwareMenuEntryActionViewItem(action, this.keybindingService, this.notificationService, this.contextMenuService);
|
||||
return new ContextAwareMenuItemActionItem(action, this.keybindingService, this.notificationService, this.contextMenuService);
|
||||
}
|
||||
|
||||
getActions(): IAction[] {
|
||||
|
||||
Reference in New Issue
Block a user