mirror of
https://github.com/Microsoft/vscode
synced 2024-08-25 12:06:27 +00:00
Update majority of workbench references to setupCustomHover
This commit is contained in:
parent
89e578da7a
commit
c1169fbdac
|
@ -31,6 +31,7 @@ import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
|
|||
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
|
||||
import { IThemeService, themeColorFromId } from 'vs/platform/theme/common/themeService';
|
||||
import { Selection } from 'vs/editor/common/core/selection';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const SEARCH_STRING_MAX_LENGTH = 524288;
|
||||
|
||||
|
@ -99,6 +100,7 @@ export class CommonFindController extends Disposable implements IEditorContribut
|
|||
private readonly _clipboardService: IClipboardService;
|
||||
protected readonly _contextKeyService: IContextKeyService;
|
||||
protected readonly _notificationService: INotificationService;
|
||||
protected readonly _hoverService: IHoverService;
|
||||
|
||||
get editor() {
|
||||
return this._editor;
|
||||
|
@ -113,7 +115,8 @@ export class CommonFindController extends Disposable implements IEditorContribut
|
|||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IClipboardService clipboardService: IClipboardService,
|
||||
@INotificationService notificationService: INotificationService
|
||||
@INotificationService notificationService: INotificationService,
|
||||
@IHoverService hoverService: IHoverService
|
||||
) {
|
||||
super();
|
||||
this._editor = editor;
|
||||
|
@ -122,6 +125,7 @@ export class CommonFindController extends Disposable implements IEditorContribut
|
|||
this._storageService = storageService;
|
||||
this._clipboardService = clipboardService;
|
||||
this._notificationService = notificationService;
|
||||
this._hoverService = hoverService;
|
||||
|
||||
this._updateHistoryDelayer = new Delayer<void>(500);
|
||||
this._state = this._register(new FindReplaceState());
|
||||
|
@ -448,8 +452,9 @@ export class FindController extends CommonFindController implements IFindControl
|
|||
@INotificationService notificationService: INotificationService,
|
||||
@IStorageService _storageService: IStorageService,
|
||||
@IClipboardService clipboardService: IClipboardService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
super(editor, _contextKeyService, _storageService, clipboardService, notificationService);
|
||||
super(editor, _contextKeyService, _storageService, clipboardService, notificationService, hoverService);
|
||||
this._widget = null;
|
||||
this._findOptionsWidget = null;
|
||||
}
|
||||
|
@ -503,7 +508,7 @@ export class FindController extends CommonFindController implements IFindControl
|
|||
}
|
||||
|
||||
private _createFindWidget() {
|
||||
this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService));
|
||||
this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService, this._hoverService));
|
||||
this._findOptionsWidget = this._register(new FindOptionsWidget(this._editor, this._state, this._keybindingService));
|
||||
}
|
||||
|
||||
|
|
|
@ -43,9 +43,9 @@ import { isHighContrast } from 'vs/platform/theme/common/theme';
|
|||
import { assertIsDefined } from 'vs/base/common/types';
|
||||
import { defaultInputBoxStyles, defaultToggleStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { Selection } from 'vs/editor/common/core/selection';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { createInstantHoverDelegate, getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { IHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const findSelectionIcon = registerIcon('find-selection', Codicon.selection, nls.localize('findSelectionIcon', 'Icon for \'Find in Selection\' in the editor find widget.'));
|
||||
const findCollapsedIcon = registerIcon('find-collapsed', Codicon.chevronRight, nls.localize('findCollapsedIcon', 'Icon to indicate that the editor find widget is collapsed.'));
|
||||
|
@ -172,6 +172,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
|||
themeService: IThemeService,
|
||||
storageService: IStorageService,
|
||||
notificationService: INotificationService,
|
||||
private readonly _hoverService: IHoverService,
|
||||
) {
|
||||
super();
|
||||
this._codeEditor = codeEditor;
|
||||
|
@ -1024,7 +1025,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
|||
onTrigger: () => {
|
||||
assertIsDefined(this._codeEditor.getAction(FIND_IDS.PreviousMatchFindAction)).run().then(undefined, onUnexpectedError);
|
||||
}
|
||||
}));
|
||||
}, this._hoverService));
|
||||
|
||||
// Next button
|
||||
this._nextBtn = this._register(new SimpleButton({
|
||||
|
@ -1034,7 +1035,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
|||
onTrigger: () => {
|
||||
assertIsDefined(this._codeEditor.getAction(FIND_IDS.NextMatchFindAction)).run().then(undefined, onUnexpectedError);
|
||||
}
|
||||
}));
|
||||
}, this._hoverService));
|
||||
|
||||
const findPart = document.createElement('div');
|
||||
findPart.className = 'find-part';
|
||||
|
@ -1102,7 +1103,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
|||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
}, this._hoverService));
|
||||
|
||||
// Replace input
|
||||
this._replaceInput = this._register(new ContextScopedReplaceInput(null, undefined, {
|
||||
|
@ -1165,7 +1166,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
|||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}));
|
||||
}, this._hoverService));
|
||||
|
||||
// Replace all button
|
||||
this._replaceAllBtn = this._register(new SimpleButton({
|
||||
|
@ -1175,7 +1176,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
|||
onTrigger: () => {
|
||||
this._controller.replaceAll();
|
||||
}
|
||||
}));
|
||||
}, this._hoverService));
|
||||
|
||||
const replacePart = document.createElement('div');
|
||||
replacePart.className = 'replace-part';
|
||||
|
@ -1200,7 +1201,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
|||
}
|
||||
this._showViewZone();
|
||||
}
|
||||
}));
|
||||
}, this._hoverService));
|
||||
this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
|
||||
|
||||
// Widget
|
||||
|
@ -1324,7 +1325,10 @@ export class SimpleButton extends Widget {
|
|||
private readonly _opts: ISimpleButtonOpts;
|
||||
private readonly _domNode: HTMLElement;
|
||||
|
||||
constructor(opts: ISimpleButtonOpts) {
|
||||
constructor(
|
||||
opts: ISimpleButtonOpts,
|
||||
hoverService: IHoverService
|
||||
) {
|
||||
super();
|
||||
this._opts = opts;
|
||||
|
||||
|
@ -1341,7 +1345,7 @@ export class SimpleButton extends Widget {
|
|||
this._domNode.className = className;
|
||||
this._domNode.setAttribute('role', 'button');
|
||||
this._domNode.setAttribute('aria-label', this._opts.label);
|
||||
this._register(setupCustomHover(opts.hoverDelegate ?? getDefaultHoverDelegate('element'), this._domNode, this._opts.label));
|
||||
this._register(hoverService.setupUpdatableHover(opts.hoverDelegate ?? getDefaultHoverDelegate('element'), this._domNode, this._opts.label));
|
||||
|
||||
this.onclick(this._domNode, (e) => {
|
||||
this._opts.onTrigger();
|
||||
|
|
|
@ -18,6 +18,7 @@ import { CONTEXT_FIND_INPUT_FOCUSED } from 'vs/editor/contrib/find/browser/findM
|
|||
import { withAsyncTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
|
@ -35,9 +36,10 @@ class TestFindController extends CommonFindController {
|
|||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IClipboardService clipboardService: IClipboardService,
|
||||
@INotificationService notificationService: INotificationService
|
||||
@INotificationService notificationService: INotificationService,
|
||||
@IHoverService hoverService: IHoverService
|
||||
) {
|
||||
super(editor, contextKeyService, storageService, clipboardService, notificationService);
|
||||
super(editor, contextKeyService, storageService, clipboardService, notificationService, hoverService);
|
||||
this._findInputFocused = CONTEXT_FIND_INPUT_FOCUSED.bindTo(contextKeyService);
|
||||
this._updateHistoryDelayer = new Delayer<void>(50);
|
||||
this.hasFocus = false;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
import { ButtonBar, IButton } from 'vs/base/browser/ui/button/button';
|
||||
import { createInstantHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { ActionRunner, IAction, IActionRunner, SubmenuAction, WorkbenchActionExecutedClassification, WorkbenchActionExecutedEvent } from 'vs/base/common/actions';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
|
@ -14,6 +13,7 @@ import { localize } from 'vs/nls';
|
|||
import { MenuId, IMenuService, MenuItemAction } from 'vs/platform/actions/common/actions';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
|
||||
|
@ -44,6 +44,7 @@ export class WorkbenchButtonBar extends ButtonBar {
|
|||
@IContextMenuService private readonly _contextMenuService: IContextMenuService,
|
||||
@IKeybindingService private readonly _keybindingService: IKeybindingService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService private readonly _hoverService: IHoverService,
|
||||
) {
|
||||
super(container);
|
||||
|
||||
|
@ -121,7 +122,7 @@ export class WorkbenchButtonBar extends ButtonBar {
|
|||
} else {
|
||||
tooltip = action.label;
|
||||
}
|
||||
this._updateStore.add(setupCustomHover(hoverDelegate, btn.element, tooltip));
|
||||
this._updateStore.add(this._hoverService.setupUpdatableHover(hoverDelegate, btn.element, tooltip));
|
||||
this._updateStore.add(btn.onDidClick(async () => {
|
||||
this._actionRunner.run(action);
|
||||
}));
|
||||
|
@ -141,8 +142,9 @@ export class MenuWorkbenchButtonBar extends WorkbenchButtonBar {
|
|||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
super(container, options, contextMenuService, keybindingService, telemetryService);
|
||||
super(container, options, contextMenuService, keybindingService, telemetryService, hoverService);
|
||||
|
||||
const menu = menuService.createMenu(menuId, contextKeyService);
|
||||
this._store.add(menu);
|
||||
|
|
|
@ -12,10 +12,10 @@ import { KeyCode } from 'vs/base/common/keyCodes';
|
|||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import 'vs/css!./link';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { IHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate';
|
||||
import type { IUpdatableHover } from 'vs/base/browser/ui/hover/hover';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export interface ILinkDescriptor {
|
||||
readonly label: string | HTMLElement;
|
||||
|
@ -85,6 +85,7 @@ export class Link extends Disposable {
|
|||
container: HTMLElement,
|
||||
private _link: ILinkDescriptor,
|
||||
options: ILinkOptions = {},
|
||||
@IHoverService private readonly _hoverService: IHoverService,
|
||||
@IOpenerService openerService: IOpenerService
|
||||
) {
|
||||
super();
|
||||
|
@ -130,7 +131,7 @@ export class Link extends Disposable {
|
|||
if (this.hoverDelegate.showNativeHover) {
|
||||
this.el.title = title ?? '';
|
||||
} else if (!this.hover && title) {
|
||||
this.hover = this._register(setupCustomHover(this.hoverDelegate, this.el, title));
|
||||
this.hover = this._register(this._hoverService.setupUpdatableHover(this.hoverDelegate, this.el, title));
|
||||
} else if (this.hover) {
|
||||
this.hover.update(title);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ import { $ } from 'vs/base/browser/dom';
|
|||
import { HiddenItemStrategy, WorkbenchToolBar } from 'vs/platform/actions/browser/toolbar';
|
||||
import { ActionViewItem, IActionViewItemOptions } from 'vs/base/browser/ui/actionbar/actionViewItems';
|
||||
import { CompositeMenuActions } from 'vs/workbench/browser/actions';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export class AuxiliaryBarPart extends AbstractPaneCompositePart {
|
||||
|
||||
|
@ -78,6 +79,7 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart {
|
|||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
|
@ -104,6 +106,7 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart {
|
|||
contextMenuService,
|
||||
layoutService,
|
||||
keybindingService,
|
||||
hoverService,
|
||||
instantiationService,
|
||||
themeService,
|
||||
viewDescriptorService,
|
||||
|
|
|
@ -35,7 +35,7 @@ import { IBoundarySashes } from 'vs/base/browser/ui/sash/sash';
|
|||
import { IBaseActionViewItemOptions } from 'vs/base/browser/ui/actionbar/actionViewItems';
|
||||
import { IHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate';
|
||||
import { createInstantHoverDelegate, getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import type { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export interface ICompositeTitleLabel {
|
||||
|
||||
|
@ -83,6 +83,7 @@ export abstract class CompositePart<T extends Composite> extends Part {
|
|||
protected readonly contextMenuService: IContextMenuService,
|
||||
layoutService: IWorkbenchLayoutService,
|
||||
protected readonly keybindingService: IKeybindingService,
|
||||
private readonly hoverService: IHoverService,
|
||||
protected readonly instantiationService: IInstantiationService,
|
||||
themeService: IThemeService,
|
||||
protected readonly registry: CompositeRegistry<T>,
|
||||
|
@ -420,7 +421,7 @@ export abstract class CompositePart<T extends Composite> extends Part {
|
|||
const titleContainer = append(parent, $('.title-label'));
|
||||
const titleLabel = append(titleContainer, $('h2'));
|
||||
this.titleLabelElement = titleLabel;
|
||||
const hover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), titleLabel, ''));
|
||||
const hover = this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), titleLabel, ''));
|
||||
|
||||
const $this = this;
|
||||
return {
|
||||
|
|
|
@ -29,9 +29,9 @@ import { Event } from 'vs/base/common/event';
|
|||
import { defaultButtonStyles, defaultProgressBarStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import type { IUpdatableHover } from 'vs/base/browser/ui/hover/hover';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export class NotificationsListDelegate implements IListVirtualDelegate<INotificationViewItem> {
|
||||
|
||||
|
@ -340,6 +340,7 @@ export class NotificationTemplateRenderer extends Disposable {
|
|||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IKeybindingService private readonly keybindingService: IKeybindingService,
|
||||
@IContextMenuService private readonly contextMenuService: IContextMenuService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
) {
|
||||
super();
|
||||
|
||||
|
@ -378,14 +379,14 @@ export class NotificationTemplateRenderer extends Disposable {
|
|||
this.renderSeverity(notification);
|
||||
|
||||
// Message
|
||||
const messageCustomHover = this.inputDisposables.add(setupCustomHover(getDefaultHoverDelegate('mouse'), this.template.message, ''));
|
||||
const messageCustomHover = this.inputDisposables.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.template.message, ''));
|
||||
const messageOverflows = this.renderMessage(notification, messageCustomHover);
|
||||
|
||||
// Secondary Actions
|
||||
this.renderSecondaryActions(notification, messageOverflows);
|
||||
|
||||
// Source
|
||||
const sourceCustomHover = this.inputDisposables.add(setupCustomHover(getDefaultHoverDelegate('mouse'), this.template.source, ''));
|
||||
const sourceCustomHover = this.inputDisposables.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.template.source, ''));
|
||||
this.renderSource(notification, sourceCustomHover);
|
||||
|
||||
// Buttons
|
||||
|
|
|
@ -39,6 +39,7 @@ import { IAction, SubmenuAction } from 'vs/base/common/actions';
|
|||
import { Composite } from 'vs/workbench/browser/composite';
|
||||
import { ViewsSubMenu } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { createAndFillInActionBarActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export enum CompositeBarPosition {
|
||||
TOP,
|
||||
|
@ -141,6 +142,7 @@ export abstract class AbstractPaneCompositePart extends CompositePart<PaneCompos
|
|||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IViewDescriptorService private readonly viewDescriptorService: IViewDescriptorService,
|
||||
|
@ -166,6 +168,7 @@ export abstract class AbstractPaneCompositePart extends CompositePart<PaneCompos
|
|||
contextMenuService,
|
||||
layoutService,
|
||||
keybindingService,
|
||||
hoverService,
|
||||
instantiationService,
|
||||
themeService,
|
||||
Registry.as<PaneCompositeRegistry>(registryId),
|
||||
|
|
|
@ -29,6 +29,7 @@ import { AbstractPaneCompositePart, CompositeBarPosition } from 'vs/workbench/br
|
|||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { createAndFillInContextMenuActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { IPaneCompositeBarOptions } from 'vs/workbench/browser/parts/paneCompositeBar';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export class PanelPart extends AbstractPaneCompositePart {
|
||||
|
||||
|
@ -70,6 +71,7 @@ export class PanelPart extends AbstractPaneCompositePart {
|
|||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
|
@ -92,6 +94,7 @@ export class PanelPart extends AbstractPaneCompositePart {
|
|||
contextMenuService,
|
||||
layoutService,
|
||||
keybindingService,
|
||||
hoverService,
|
||||
instantiationService,
|
||||
themeService,
|
||||
viewDescriptorService,
|
||||
|
|
|
@ -31,6 +31,7 @@ import { Action2, IMenuService, registerAction2 } from 'vs/platform/actions/comm
|
|||
import { Separator } from 'vs/base/common/actions';
|
||||
import { ToggleActivityBarVisibilityActionId } from 'vs/workbench/browser/actions/layoutActions';
|
||||
import { localize2 } from 'vs/nls';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export class SidebarPart extends AbstractPaneCompositePart {
|
||||
|
||||
|
@ -70,6 +71,7 @@ export class SidebarPart extends AbstractPaneCompositePart {
|
|||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
|
@ -92,6 +94,7 @@ export class SidebarPart extends AbstractPaneCompositePart {
|
|||
contextMenuService,
|
||||
layoutService,
|
||||
keybindingService,
|
||||
hoverService,
|
||||
instantiationService,
|
||||
themeService,
|
||||
viewDescriptorService,
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
import * as DOM from 'vs/base/browser/dom';
|
||||
import type { IUpdatableHover } from 'vs/base/browser/ui/hover/hover';
|
||||
import { IHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { Toggle } from 'vs/base/browser/ui/toggle/toggle';
|
||||
import { Codicon } from 'vs/base/common/codicons';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { localize } from 'vs/nls';
|
||||
import type { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { defaultToggleStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { ITreeItem, ITreeItemCheckboxState } from 'vs/workbench/common/views';
|
||||
|
||||
|
@ -35,7 +35,12 @@ export class TreeItemCheckbox extends Disposable {
|
|||
private readonly _onDidChangeState = new Emitter<boolean>();
|
||||
readonly onDidChangeState: Event<boolean> = this._onDidChangeState.event;
|
||||
|
||||
constructor(container: HTMLElement, private checkboxStateHandler: CheckboxStateHandler, private readonly hoverDelegate: IHoverDelegate) {
|
||||
constructor(
|
||||
container: HTMLElement,
|
||||
private checkboxStateHandler: CheckboxStateHandler,
|
||||
private readonly hoverDelegate: IHoverDelegate,
|
||||
private readonly hoverService: IHoverService
|
||||
) {
|
||||
super();
|
||||
this.checkboxContainer = <HTMLDivElement>container;
|
||||
}
|
||||
|
@ -82,7 +87,7 @@ export class TreeItemCheckbox extends Disposable {
|
|||
private setHover(checkbox: ITreeItemCheckboxState) {
|
||||
if (this.toggle) {
|
||||
if (!this.hover) {
|
||||
this.hover = this._register(setupCustomHover(this.hoverDelegate, this.toggle.domNode, this.checkboxHoverContent(checkbox)));
|
||||
this.hover = this._register(this.hoverService.setupUpdatableHover(this.hoverDelegate, this.toggle.domNode, this.checkboxHoverContent(checkbox)));
|
||||
} else {
|
||||
this.hover.update(checkbox.tooltip);
|
||||
}
|
||||
|
|
|
@ -91,9 +91,10 @@ export class TreeViewPane extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@INotificationService notificationService: INotificationService
|
||||
@INotificationService notificationService: INotificationService,
|
||||
@IHoverService hoverService: IHoverService
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), titleMenuId: MenuId.ViewTitle, donotForwardArgs: false }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super({ ...(options as IViewPaneOptions), titleMenuId: MenuId.ViewTitle, donotForwardArgs: false }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
const { treeView } = (<ITreeViewDescriptor>Registry.as<IViewsRegistry>(Extensions.ViewsRegistry).getView(options.id));
|
||||
this.treeView = treeView;
|
||||
this._register(this.treeView.onDidChangeActions(() => this.updateActions(), this));
|
||||
|
@ -1103,6 +1104,7 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
|||
@ILabelService private readonly labelService: ILabelService,
|
||||
@ITreeViewsService private readonly treeViewsService: ITreeViewsService,
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
) {
|
||||
super();
|
||||
|
@ -1286,7 +1288,7 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
|||
this.rerender();
|
||||
}
|
||||
if (!templateData.checkbox) {
|
||||
const checkbox = new TreeItemCheckbox(templateData.checkboxContainer, this.checkboxStateHandler, this._hoverDelegate);
|
||||
const checkbox = new TreeItemCheckbox(templateData.checkboxContainer, this.checkboxStateHandler, this._hoverDelegate, this.hoverService);
|
||||
templateData.checkbox = checkbox;
|
||||
}
|
||||
templateData.checkbox.render(node);
|
||||
|
|
|
@ -47,10 +47,10 @@ import { FilterWidget, IFilterWidgetOptions } from 'vs/workbench/browser/parts/v
|
|||
import { BaseActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { defaultButtonStyles, defaultProgressBarStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle';
|
||||
import type { IUpdatableHover } from 'vs/base/browser/ui/hover/hover';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export enum ViewPaneShowActions {
|
||||
/** Show the actions when the view is hovered. This is the default behavior. */
|
||||
|
@ -373,6 +373,7 @@ export abstract class ViewPane extends Pane implements IView {
|
|||
@IOpenerService protected openerService: IOpenerService,
|
||||
@IThemeService protected themeService: IThemeService,
|
||||
@ITelemetryService protected telemetryService: ITelemetryService,
|
||||
@IHoverService protected readonly hoverService: IHoverService
|
||||
) {
|
||||
super({ ...options, ...{ orientation: viewDescriptorService.getViewLocationById(options.id) === ViewContainerLocation.Panel ? Orientation.HORIZONTAL : Orientation.VERTICAL } });
|
||||
|
||||
|
@ -536,13 +537,13 @@ export abstract class ViewPane extends Pane implements IView {
|
|||
|
||||
const calculatedTitle = this.calculateTitle(title);
|
||||
this.titleContainer = append(container, $('h3.title', {}, calculatedTitle));
|
||||
this.titleContainerHover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), this.titleContainer, calculatedTitle));
|
||||
this.titleContainerHover = this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.titleContainer, calculatedTitle));
|
||||
|
||||
if (this._titleDescription) {
|
||||
this.setTitleDescription(this._titleDescription);
|
||||
}
|
||||
|
||||
this.iconContainerHover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), this.iconContainer, calculatedTitle));
|
||||
this.iconContainerHover = this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.iconContainer, calculatedTitle));
|
||||
this.iconContainer.setAttribute('aria-label', calculatedTitle);
|
||||
}
|
||||
|
||||
|
@ -569,7 +570,7 @@ export abstract class ViewPane extends Pane implements IView {
|
|||
}
|
||||
else if (description && this.titleContainer) {
|
||||
this.titleDescriptionContainer = after(this.titleContainer, $('span.description', {}, description));
|
||||
this.titleDescriptionContainerHover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), this.titleDescriptionContainer, description));
|
||||
this.titleDescriptionContainerHover = this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.titleDescriptionContainer, description));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -735,8 +736,9 @@ export abstract class FilterViewPane extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
this.filterWidget = this._register(instantiationService.createChild(new ServiceCollection([IContextKeyService, this.scopedContextKeyService])).createInstance(FilterWidget, options.filterOptions));
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ import { IResourceDiffEditorInput } from 'vs/workbench/common/editor';
|
|||
import { IMultiDiffEditorOptions, IMultiDiffResourceId } from 'vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl';
|
||||
import { IRange } from 'vs/editor/common/core/range';
|
||||
import { CachedFunction, LRUCachedFunction } from 'vs/base/common/cache';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const enum State {
|
||||
Data = 'data',
|
||||
|
@ -89,10 +90,11 @@ export class BulkEditPane extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
super(
|
||||
{ ...options, titleMenuId: MenuId.BulkEditTitle },
|
||||
keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, _instaService, openerService, themeService, telemetryService
|
||||
keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, _instaService, openerService, themeService, telemetryService, hoverService
|
||||
);
|
||||
|
||||
this.element.classList.add('bulk-edit-panel', 'show-file-icons');
|
||||
|
|
|
@ -8,6 +8,7 @@ import { DisposableStore } from 'vs/base/common/lifecycle';
|
|||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
|
@ -60,11 +61,12 @@ export class ChatViewPane extends ViewPane implements IChatViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IStorageService private readonly storageService: IStorageService,
|
||||
@IChatService private readonly chatService: IChatService,
|
||||
@ILogService private readonly logService: ILogService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
// View state for the ViewPane is currently global per-provider basically, but some other strictly per-model state will require a separate memento.
|
||||
this.memento = new Memento('interactive-session-view-' + this.chatViewOptions.providerId, this.storageService);
|
||||
|
|
|
@ -25,6 +25,7 @@ import { status } from 'vs/base/browser/ui/aria/aria';
|
|||
import { defaultInputBoxStyles, defaultToggleStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { ISashEvent, IVerticalSashLayoutProvider, Orientation, Sash } from 'vs/base/browser/ui/sash/sash';
|
||||
import { registerColor } from 'vs/platform/theme/common/colorRegistry';
|
||||
import type { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const NLS_FIND_INPUT_LABEL = nls.localize('label.find', "Find");
|
||||
const NLS_FIND_INPUT_PLACEHOLDER = nls.localize('placeholder.find', "Find");
|
||||
|
@ -73,7 +74,8 @@ export abstract class SimpleFindWidget extends Widget implements IVerticalSashLa
|
|||
options: IFindOptions,
|
||||
contextViewService: IContextViewService,
|
||||
contextKeyService: IContextKeyService,
|
||||
private readonly _keybindingService: IKeybindingService
|
||||
hoverService: IHoverService,
|
||||
private readonly _keybindingService: IKeybindingService,
|
||||
) {
|
||||
super();
|
||||
|
||||
|
@ -143,7 +145,7 @@ export abstract class SimpleFindWidget extends Widget implements IVerticalSashLa
|
|||
onTrigger: () => {
|
||||
this.find(true);
|
||||
}
|
||||
}));
|
||||
}, hoverService));
|
||||
|
||||
this.nextBtn = this._register(new SimpleButton({
|
||||
label: NLS_NEXT_MATCH_BTN_LABEL + (options.nextMatchActionId ? this._getKeybinding(options.nextMatchActionId) : ''),
|
||||
|
@ -151,7 +153,7 @@ export abstract class SimpleFindWidget extends Widget implements IVerticalSashLa
|
|||
onTrigger: () => {
|
||||
this.find(false);
|
||||
}
|
||||
}));
|
||||
}, hoverService));
|
||||
|
||||
const closeBtn = this._register(new SimpleButton({
|
||||
label: NLS_CLOSE_BTN_LABEL + (options.closeWidgetActionId ? this._getKeybinding(options.closeWidgetActionId) : ''),
|
||||
|
@ -159,7 +161,7 @@ export abstract class SimpleFindWidget extends Widget implements IVerticalSashLa
|
|||
onTrigger: () => {
|
||||
this.hide();
|
||||
}
|
||||
}));
|
||||
}, hoverService));
|
||||
|
||||
this._innerDomNode = document.createElement('div');
|
||||
this._innerDomNode.classList.add('simple-find-part');
|
||||
|
|
|
@ -51,6 +51,7 @@ import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
|
|||
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { MarshalledCommentThread } from 'vs/workbench/common/comments';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
class CommentsActionRunner extends ActionRunner {
|
||||
protected override async runAction(action: IAction, context: any[]): Promise<void> {
|
||||
|
@ -117,6 +118,7 @@ export class CommentNode<T extends IRange | ICellRange> extends Disposable {
|
|||
@IContextMenuService private contextMenuService: IContextMenuService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@IHoverService private hoverService: IHoverService,
|
||||
@IAccessibilityService private accessibilityService: IAccessibilityService,
|
||||
@IKeybindingService private keybindingService: IKeybindingService
|
||||
) {
|
||||
|
@ -250,7 +252,7 @@ export class CommentNode<T extends IRange | ICellRange> extends Disposable {
|
|||
this._timestampWidget?.dispose();
|
||||
} else {
|
||||
if (!this._timestampWidget) {
|
||||
this._timestampWidget = new TimestampWidget(this.configurationService, this._timestamp, timestamp);
|
||||
this._timestampWidget = new TimestampWidget(this.configurationService, this.hoverService, this._timestamp, timestamp);
|
||||
this._register(this._timestampWidget);
|
||||
} else {
|
||||
this._timestampWidget.setTimestamp(timestamp);
|
||||
|
|
|
@ -32,7 +32,6 @@ import { IStyleOverride } from 'vs/platform/theme/browser/defaultStyles';
|
|||
import { IListStyles } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { ILocalizedString } from 'vs/platform/action/common/action';
|
||||
import { CommentsModel } from 'vs/workbench/contrib/comments/browser/commentsModel';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { ActionBar, IActionViewItemProvider } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { createActionViewItem, createAndFillInContextMenuActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
|
@ -43,6 +42,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView
|
|||
import { ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { MarshalledCommentThread, MarshalledCommentThreadInternal } from 'vs/workbench/common/comments';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export const COMMENTS_VIEW_ID = 'workbench.panel.comments';
|
||||
export const COMMENTS_VIEW_STORAGE_ID = 'Comments';
|
||||
|
@ -191,6 +191,7 @@ export class CommentNodeRenderer implements IListRenderer<ITreeNode<CommentNode>
|
|||
private menus: CommentsMenus,
|
||||
@IOpenerService private readonly openerService: IOpenerService,
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@IThemeService private themeService: IThemeService
|
||||
) { }
|
||||
|
||||
|
@ -201,7 +202,7 @@ export class CommentNodeRenderer implements IListRenderer<ITreeNode<CommentNode>
|
|||
const threadMetadata = {
|
||||
icon: dom.append(metadata, dom.$('.icon')),
|
||||
userNames: dom.append(metadata, dom.$('.user')),
|
||||
timestamp: new TimestampWidget(this.configurationService, dom.append(metadata, dom.$('.timestamp-container'))),
|
||||
timestamp: new TimestampWidget(this.configurationService, this.hoverService, dom.append(metadata, dom.$('.timestamp-container'))),
|
||||
relevance: dom.append(metadata, dom.$('.relevance')),
|
||||
separator: dom.append(metadata, dom.$('.separator')),
|
||||
commentPreview: dom.append(metadata, dom.$('.text')),
|
||||
|
@ -221,7 +222,7 @@ export class CommentNodeRenderer implements IListRenderer<ITreeNode<CommentNode>
|
|||
count: dom.append(snippetContainer, dom.$('.count')),
|
||||
lastReplyDetail: dom.append(snippetContainer, dom.$('.reply-detail')),
|
||||
separator: dom.append(snippetContainer, dom.$('.separator')),
|
||||
timestamp: new TimestampWidget(this.configurationService, dom.append(snippetContainer, dom.$('.timestamp-container'))),
|
||||
timestamp: new TimestampWidget(this.configurationService, this.hoverService, dom.append(snippetContainer, dom.$('.timestamp-container'))),
|
||||
};
|
||||
repliesMetadata.separator.innerText = '\u00b7';
|
||||
repliesMetadata.icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.indent));
|
||||
|
@ -300,7 +301,7 @@ export class CommentNodeRenderer implements IListRenderer<ITreeNode<CommentNode>
|
|||
const renderedComment = this.getRenderedComment(originalComment.comment.body, disposables);
|
||||
templateData.disposables.push(renderedComment);
|
||||
templateData.threadMetadata.commentPreview.appendChild(renderedComment.element.firstElementChild ?? renderedComment.element);
|
||||
templateData.disposables.push(setupCustomHover(getDefaultHoverDelegate('mouse'), templateData.threadMetadata.commentPreview, renderedComment.element.textContent ?? ''));
|
||||
templateData.disposables.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), templateData.threadMetadata.commentPreview, renderedComment.element.textContent ?? ''));
|
||||
}
|
||||
|
||||
if (node.element.range) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import { Iterable } from 'vs/base/common/iterator';
|
|||
import { revealCommentThread } from 'vs/workbench/contrib/comments/browser/commentsController';
|
||||
import { registerNavigableContainer } from 'vs/workbench/browser/actions/widgetNavigationCommands';
|
||||
import { CommentsModel, ICommentsModel } from 'vs/workbench/contrib/comments/browser/commentsModel';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export const CONTEXT_KEY_HAS_COMMENTS = new RawContextKey<boolean>('commentsView.hasComments', false);
|
||||
export const CONTEXT_KEY_SOME_COMMENTS_EXPANDED = new RawContextKey<boolean>('commentsView.someCommentsExpanded', false);
|
||||
|
@ -80,6 +81,7 @@ export class CommentsPanel extends FilterViewPane implements ICommentsView {
|
|||
@IThemeService themeService: IThemeService,
|
||||
@ICommentService private readonly commentService: ICommentService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IUriIdentityService private readonly uriIdentityService: IUriIdentityService,
|
||||
@IStorageService storageService: IStorageService
|
||||
) {
|
||||
|
@ -94,7 +96,7 @@ export class CommentsPanel extends FilterViewPane implements ICommentsView {
|
|||
text: viewState['filter'] || '',
|
||||
focusContextKey: CommentsViewFilterFocusContextKey.key
|
||||
}
|
||||
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
this.hasCommentsContextKey = CONTEXT_KEY_HAS_COMMENTS.bindTo(contextKeyService);
|
||||
this.someCommentsExpandedContextKey = CONTEXT_KEY_SOME_COMMENTS_EXPANDED.bindTo(contextKeyService);
|
||||
this.stateMemento = stateMemento;
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
import * as dom from 'vs/base/browser/dom';
|
||||
import type { IUpdatableHover } from 'vs/base/browser/ui/hover/hover';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { fromNow } from 'vs/base/common/date';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { language } from 'vs/base/common/platform';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import type { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { COMMENTS_SECTION, ICommentsConfiguration } from 'vs/workbench/contrib/comments/common/commentsConfiguration';
|
||||
|
||||
export class TimestampWidget extends Disposable {
|
||||
|
@ -20,12 +20,17 @@ export class TimestampWidget extends Disposable {
|
|||
|
||||
private hover: IUpdatableHover;
|
||||
|
||||
constructor(private configurationService: IConfigurationService, container: HTMLElement, timeStamp?: Date) {
|
||||
constructor(
|
||||
private configurationService: IConfigurationService,
|
||||
hoverService: IHoverService,
|
||||
container: HTMLElement,
|
||||
timeStamp?: Date
|
||||
) {
|
||||
super();
|
||||
this._date = dom.append(container, dom.$('span.timestamp'));
|
||||
this._date.style.display = 'none';
|
||||
this._useRelativeTime = this.useRelativeTimeSetting;
|
||||
this.hover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), this._date, ''));
|
||||
this.hover = this._register(hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this._date, ''));
|
||||
this.setTimestamp(timeStamp);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
|||
import { AriaRole } from 'vs/base/browser/ui/aria/aria';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { IconLabel } from 'vs/base/browser/ui/iconLabel/iconLabel';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox';
|
||||
import { IListContextMenuEvent, IListRenderer, IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
|
||||
import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
|
@ -114,10 +113,10 @@ export class BreakpointsView extends ViewPane {
|
|||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@ILabelService private readonly labelService: ILabelService,
|
||||
@IMenuService menuService: IMenuService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@ILanguageService private readonly languageService: ILanguageService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
this.menu = menuService.createMenu(MenuId.DebugBreakpointsContext, contextKeyService);
|
||||
this._register(this.menu);
|
||||
|
@ -141,12 +140,12 @@ export class BreakpointsView extends ViewPane {
|
|||
|
||||
this.list = this.instantiationService.createInstance(WorkbenchList, 'Breakpoints', container, delegate, [
|
||||
this.instantiationService.createInstance(BreakpointsRenderer, this.menu, this.breakpointHasMultipleModes, this.breakpointSupportsCondition, this.breakpointItemType),
|
||||
new ExceptionBreakpointsRenderer(this.menu, this.breakpointHasMultipleModes, this.breakpointSupportsCondition, this.breakpointItemType, this.debugService),
|
||||
new ExceptionBreakpointsRenderer(this.menu, this.breakpointHasMultipleModes, this.breakpointSupportsCondition, this.breakpointItemType, this.debugService, this.hoverService),
|
||||
new ExceptionBreakpointInputRenderer(this, this.debugService, this.contextViewService),
|
||||
this.instantiationService.createInstance(FunctionBreakpointsRenderer, this.menu, this.breakpointSupportsCondition, this.breakpointItemType),
|
||||
new FunctionBreakpointInputRenderer(this, this.debugService, this.contextViewService, this.labelService),
|
||||
new FunctionBreakpointInputRenderer(this, this.debugService, this.contextViewService, this.hoverService, this.labelService),
|
||||
this.instantiationService.createInstance(DataBreakpointsRenderer, this.menu, this.breakpointHasMultipleModes, this.breakpointSupportsCondition, this.breakpointItemType, this.breakpointIsDataBytes),
|
||||
new DataBreakpointInputRenderer(this, this.debugService, this.contextViewService, this.labelService),
|
||||
new DataBreakpointInputRenderer(this, this.debugService, this.contextViewService, this.hoverService, this.labelService),
|
||||
this.instantiationService.createInstance(InstructionBreakpointsRenderer),
|
||||
], {
|
||||
identityProvider: { getId: (element: IEnablement) => element.getId() },
|
||||
|
@ -499,6 +498,7 @@ class BreakpointsRenderer implements IListRenderer<IBreakpoint, IBreakpointTempl
|
|||
private breakpointSupportsCondition: IContextKey<boolean>,
|
||||
private breakpointItemType: IContextKey<string | undefined>,
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@ILabelService private readonly labelService: ILabelService
|
||||
) {
|
||||
// noop
|
||||
|
@ -555,7 +555,7 @@ class BreakpointsRenderer implements IListRenderer<IBreakpoint, IBreakpointTempl
|
|||
|
||||
const { message, icon } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), breakpoint, this.labelService, this.debugService.getModel());
|
||||
data.icon.className = ThemeIcon.asClassName(icon);
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.breakpoint, breakpoint.message || message || ''));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.breakpoint, breakpoint.message || message || ''));
|
||||
|
||||
const debugActive = this.debugService.state === State.Running || this.debugService.state === State.Stopped;
|
||||
if (debugActive && !breakpoint.verified) {
|
||||
|
@ -585,7 +585,8 @@ class ExceptionBreakpointsRenderer implements IListRenderer<IExceptionBreakpoint
|
|||
private breakpointHasMultipleModes: IContextKey<boolean>,
|
||||
private breakpointSupportsCondition: IContextKey<boolean>,
|
||||
private breakpointItemType: IContextKey<string | undefined>,
|
||||
private debugService: IDebugService
|
||||
private debugService: IDebugService,
|
||||
private readonly hoverService: IHoverService,
|
||||
) {
|
||||
// noop
|
||||
}
|
||||
|
@ -624,11 +625,11 @@ class ExceptionBreakpointsRenderer implements IListRenderer<IExceptionBreakpoint
|
|||
data.context = exceptionBreakpoint;
|
||||
data.name.textContent = exceptionBreakpoint.label || `${exceptionBreakpoint.filter} exceptions`;
|
||||
const exceptionBreakpointtitle = exceptionBreakpoint.verified ? (exceptionBreakpoint.description || data.name.textContent) : exceptionBreakpoint.message || localize('unverifiedExceptionBreakpoint', "Unverified Exception Breakpoint");
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.breakpoint, exceptionBreakpointtitle));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.breakpoint, exceptionBreakpointtitle));
|
||||
data.breakpoint.classList.toggle('disabled', !exceptionBreakpoint.verified);
|
||||
data.checkbox.checked = exceptionBreakpoint.enabled;
|
||||
data.condition.textContent = exceptionBreakpoint.condition || '';
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.condition, localize('expressionCondition', "Expression condition: {0}", exceptionBreakpoint.condition)));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.condition, localize('expressionCondition', "Expression condition: {0}", exceptionBreakpoint.condition)));
|
||||
|
||||
if (exceptionBreakpoint.modeLabel) {
|
||||
data.badge.textContent = exceptionBreakpoint.modeLabel;
|
||||
|
@ -659,6 +660,7 @@ class FunctionBreakpointsRenderer implements IListRenderer<FunctionBreakpoint, I
|
|||
private breakpointSupportsCondition: IContextKey<boolean>,
|
||||
private breakpointItemType: IContextKey<string | undefined>,
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@ILabelService private readonly labelService: ILabelService
|
||||
) {
|
||||
// noop
|
||||
|
@ -700,9 +702,9 @@ class FunctionBreakpointsRenderer implements IListRenderer<FunctionBreakpoint, I
|
|||
data.name.textContent = functionBreakpoint.name;
|
||||
const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), functionBreakpoint, this.labelService, this.debugService.getModel());
|
||||
data.icon.className = ThemeIcon.asClassName(icon);
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.icon, message ? message : ''));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.icon, message ? message : ''));
|
||||
data.checkbox.checked = functionBreakpoint.enabled;
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.breakpoint, message ? message : ''));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.breakpoint, message ? message : ''));
|
||||
if (functionBreakpoint.condition && functionBreakpoint.hitCondition) {
|
||||
data.condition.textContent = localize('expressionAndHitCount', "Condition: {0} | Hit Count: {1}", functionBreakpoint.condition, functionBreakpoint.hitCondition);
|
||||
} else {
|
||||
|
@ -720,7 +722,7 @@ class FunctionBreakpointsRenderer implements IListRenderer<FunctionBreakpoint, I
|
|||
const session = this.debugService.getViewModel().focusedSession;
|
||||
data.breakpoint.classList.toggle('disabled', (session && !session.capabilities.supportsFunctionBreakpoints) || !this.debugService.getModel().areBreakpointsActivated());
|
||||
if (session && !session.capabilities.supportsFunctionBreakpoints) {
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.breakpoint, localize('functionBreakpointsNotSupported', "Function breakpoints are not supported by this debug type")));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.breakpoint, localize('functionBreakpointsNotSupported', "Function breakpoints are not supported by this debug type")));
|
||||
}
|
||||
|
||||
const primary: IAction[] = [];
|
||||
|
@ -746,6 +748,7 @@ class DataBreakpointsRenderer implements IListRenderer<DataBreakpoint, IDataBrea
|
|||
private breakpointItemType: IContextKey<string | undefined>,
|
||||
private breakpointIsDataBytes: IContextKey<boolean | undefined>,
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@ILabelService private readonly labelService: ILabelService
|
||||
) {
|
||||
// noop
|
||||
|
@ -788,9 +791,9 @@ class DataBreakpointsRenderer implements IListRenderer<DataBreakpoint, IDataBrea
|
|||
data.name.textContent = dataBreakpoint.description;
|
||||
const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), dataBreakpoint, this.labelService, this.debugService.getModel());
|
||||
data.icon.className = ThemeIcon.asClassName(icon);
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.icon, message ? message : ''));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.icon, message ? message : ''));
|
||||
data.checkbox.checked = dataBreakpoint.enabled;
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.breakpoint, message ? message : ''));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.breakpoint, message ? message : ''));
|
||||
|
||||
if (dataBreakpoint.modeLabel) {
|
||||
data.badge.textContent = dataBreakpoint.modeLabel;
|
||||
|
@ -803,7 +806,7 @@ class DataBreakpointsRenderer implements IListRenderer<DataBreakpoint, IDataBrea
|
|||
const session = this.debugService.getViewModel().focusedSession;
|
||||
data.breakpoint.classList.toggle('disabled', (session && !session.capabilities.supportsDataBreakpoints) || !this.debugService.getModel().areBreakpointsActivated());
|
||||
if (session && !session.capabilities.supportsDataBreakpoints) {
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.breakpoint, localize('dataBreakpointsNotSupported', "Data breakpoints are not supported by this debug type")));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.breakpoint, localize('dataBreakpointsNotSupported', "Data breakpoints are not supported by this debug type")));
|
||||
}
|
||||
if (dataBreakpoint.accessType) {
|
||||
const accessType = dataBreakpoint.accessType === 'read' ? localize('read', "Read") : dataBreakpoint.accessType === 'write' ? localize('write', "Write") : localize('access', "Access");
|
||||
|
@ -838,6 +841,7 @@ class InstructionBreakpointsRenderer implements IListRenderer<IInstructionBreakp
|
|||
|
||||
constructor(
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@ILabelService private readonly labelService: ILabelService
|
||||
) {
|
||||
// noop
|
||||
|
@ -879,12 +883,12 @@ class InstructionBreakpointsRenderer implements IListRenderer<IInstructionBreakp
|
|||
data.breakpoint.classList.toggle('disabled', !this.debugService.getModel().areBreakpointsActivated());
|
||||
|
||||
data.name.textContent = '0x' + breakpoint.address.toString(16);
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.name, `Decimal address: breakpoint.address.toString()`));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.name, `Decimal address: breakpoint.address.toString()`));
|
||||
data.checkbox.checked = breakpoint.enabled;
|
||||
|
||||
const { message, icon } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), breakpoint, this.labelService, this.debugService.getModel());
|
||||
data.icon.className = ThemeIcon.asClassName(icon);
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.breakpoint, breakpoint.message || message || ''));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.breakpoint, breakpoint.message || message || ''));
|
||||
|
||||
const debugActive = this.debugService.state === State.Running || this.debugService.state === State.Stopped;
|
||||
if (debugActive && !breakpoint.verified) {
|
||||
|
@ -910,6 +914,7 @@ class FunctionBreakpointInputRenderer implements IListRenderer<IFunctionBreakpoi
|
|||
private view: BreakpointsView,
|
||||
private debugService: IDebugService,
|
||||
private contextViewService: IContextViewService,
|
||||
private readonly hoverService: IHoverService,
|
||||
private labelService: ILabelService
|
||||
) { }
|
||||
|
||||
|
@ -989,7 +994,7 @@ class FunctionBreakpointInputRenderer implements IListRenderer<IFunctionBreakpoi
|
|||
const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), functionBreakpoint, this.labelService, this.debugService.getModel());
|
||||
|
||||
data.icon.className = ThemeIcon.asClassName(icon);
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.icon, message ? message : ''));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.icon, message ? message : ''));
|
||||
data.checkbox.checked = functionBreakpoint.enabled;
|
||||
data.checkbox.disabled = true;
|
||||
data.inputBox.value = functionBreakpoint.name || '';
|
||||
|
@ -1025,6 +1030,7 @@ class DataBreakpointInputRenderer implements IListRenderer<IDataBreakpoint, IDat
|
|||
private view: BreakpointsView,
|
||||
private debugService: IDebugService,
|
||||
private contextViewService: IContextViewService,
|
||||
private readonly hoverService: IHoverService,
|
||||
private labelService: ILabelService
|
||||
) { }
|
||||
|
||||
|
@ -1097,7 +1103,7 @@ class DataBreakpointInputRenderer implements IListRenderer<IDataBreakpoint, IDat
|
|||
const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), dataBreakpoint, this.labelService, this.debugService.getModel());
|
||||
|
||||
data.icon.className = ThemeIcon.asClassName(icon);
|
||||
data.toDispose.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.icon, message ?? ''));
|
||||
data.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.icon, message ?? ''));
|
||||
data.checkbox.checked = dataBreakpoint.enabled;
|
||||
data.checkbox.disabled = true;
|
||||
data.inputBox.value = '';
|
||||
|
|
|
@ -48,9 +48,9 @@ import { createDisconnectMenuItemAction } from 'vs/workbench/contrib/debug/brows
|
|||
import { CALLSTACK_VIEW_ID, CONTEXT_CALLSTACK_ITEM_STOPPED, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD, CONTEXT_CALLSTACK_SESSION_IS_ATTACH, CONTEXT_DEBUG_STATE, CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, getStateLabel, IDebugModel, IDebugService, IDebugSession, IRawStoppedDetails, isFrameDeemphasized, IStackFrame, IThread, State } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { StackFrame, Thread, ThreadAndSessionIds } from 'vs/workbench/contrib/debug/common/debugModel';
|
||||
import { isSessionAttach } from 'vs/workbench/contrib/debug/common/debugUtils';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import type { IUpdatableHover } from 'vs/base/browser/ui/hover/hover';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
|
@ -159,9 +159,10 @@ export class CallStackView extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IMenuService private readonly menuService: IMenuService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
// Create scheduler to prevent unnecessary flashing of tree when reacting to changes
|
||||
this.onCallStackChangeScheduler = this._register(new RunOnceScheduler(async () => {
|
||||
|
@ -220,7 +221,7 @@ export class CallStackView extends ViewPane {
|
|||
this.stateMessage = dom.append(container, $('span.call-stack-state-message'));
|
||||
this.stateMessage.hidden = true;
|
||||
this.stateMessageLabel = dom.append(this.stateMessage, $('span.label'));
|
||||
this.stateMessageLabelHover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), this.stateMessage, ''));
|
||||
this.stateMessageLabelHover = this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.stateMessage, ''));
|
||||
}
|
||||
|
||||
protected override renderBody(container: HTMLElement): void {
|
||||
|
@ -234,7 +235,7 @@ export class CallStackView extends ViewPane {
|
|||
this.instantiationService.createInstance(SessionsRenderer),
|
||||
this.instantiationService.createInstance(ThreadsRenderer),
|
||||
this.instantiationService.createInstance(StackFramesRenderer),
|
||||
new ErrorsRenderer(),
|
||||
this.instantiationService.createInstance(ErrorsRenderer),
|
||||
new LoadMoreRenderer(),
|
||||
new ShowMoreRenderer()
|
||||
], this.dataSource, {
|
||||
|
@ -531,6 +532,7 @@ class SessionsRenderer implements ICompressibleTreeRenderer<IDebugSession, Fuzzy
|
|||
constructor(
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@IMenuService private readonly menuService: IMenuService,
|
||||
) { }
|
||||
|
||||
|
@ -582,7 +584,7 @@ class SessionsRenderer implements ICompressibleTreeRenderer<IDebugSession, Fuzzy
|
|||
}
|
||||
|
||||
private doRenderElement(session: IDebugSession, matches: IMatch[], data: ISessionTemplateData): void {
|
||||
const sessionHover = data.elementDisposable.add(setupCustomHover(getDefaultHoverDelegate('mouse'), data.session, localize({ key: 'session', comment: ['Session is a noun'] }, "Session")));
|
||||
const sessionHover = data.elementDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.session, localize({ key: 'session', comment: ['Session is a noun'] }, "Session")));
|
||||
data.label.set(session.getLabel(), matches);
|
||||
const stoppedDetails = session.getStoppedDetails();
|
||||
const thread = session.getAllThreads().find(t => t.stopped);
|
||||
|
@ -647,6 +649,7 @@ class ThreadsRenderer implements ICompressibleTreeRenderer<IThread, FuzzyScore,
|
|||
|
||||
constructor(
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@IMenuService private readonly menuService: IMenuService,
|
||||
) { }
|
||||
|
||||
|
@ -670,7 +673,7 @@ class ThreadsRenderer implements ICompressibleTreeRenderer<IThread, FuzzyScore,
|
|||
|
||||
renderElement(element: ITreeNode<IThread, FuzzyScore>, _index: number, data: IThreadTemplateData): void {
|
||||
const thread = element.element;
|
||||
data.elementDisposable.add(setupCustomHover(getDefaultHoverDelegate('mouse'), data.thread, thread.name));
|
||||
data.elementDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.thread, thread.name));
|
||||
data.label.set(thread.name, createMatches(element.filterData));
|
||||
data.stateLabel.textContent = thread.stateLabel;
|
||||
data.stateLabel.classList.toggle('exception', thread.stoppedDetails?.reason === 'exception');
|
||||
|
@ -719,6 +722,7 @@ class StackFramesRenderer implements ICompressibleTreeRenderer<IStackFrame, Fuzz
|
|||
static readonly ID = 'stackFrame';
|
||||
|
||||
constructor(
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@ILabelService private readonly labelService: ILabelService,
|
||||
@INotificationService private readonly notificationService: INotificationService,
|
||||
) { }
|
||||
|
@ -754,7 +758,7 @@ class StackFramesRenderer implements ICompressibleTreeRenderer<IStackFrame, Fuzz
|
|||
if (stackFrame.source.raw.origin) {
|
||||
title += `\n${stackFrame.source.raw.origin}`;
|
||||
}
|
||||
data.templateDisposable.add(setupCustomHover(getDefaultHoverDelegate('mouse'), data.file, title));
|
||||
data.templateDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.file, title));
|
||||
|
||||
data.label.set(stackFrame.name, createMatches(element.filterData), stackFrame.name);
|
||||
data.fileName.textContent = getSpecificSourceName(stackFrame);
|
||||
|
@ -797,6 +801,11 @@ class ErrorsRenderer implements ICompressibleTreeRenderer<string, FuzzyScore, IE
|
|||
return ErrorsRenderer.ID;
|
||||
}
|
||||
|
||||
constructor(
|
||||
@IHoverService private readonly hoverService: IHoverService
|
||||
) {
|
||||
}
|
||||
|
||||
renderTemplate(container: HTMLElement): IErrorTemplateData {
|
||||
const label = dom.append(container, $('.error'));
|
||||
|
||||
|
@ -806,7 +815,7 @@ class ErrorsRenderer implements ICompressibleTreeRenderer<string, FuzzyScore, IE
|
|||
renderElement(element: ITreeNode<string, FuzzyScore>, index: number, data: IErrorTemplateData): void {
|
||||
const error = element.element;
|
||||
data.label.textContent = error;
|
||||
data.templateDisposable.add(setupCustomHover(getDefaultHoverDelegate('mouse'), data.label, error));
|
||||
data.templateDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.label, error));
|
||||
}
|
||||
|
||||
renderCompressedElements(node: ITreeNode<ICompressedTreeNode<string>, FuzzyScore>, index: number, templateData: IErrorTemplateData, height: number | undefined): void {
|
||||
|
|
|
@ -43,6 +43,7 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
|
|||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IPathService } from 'vs/workbench/services/path/common/pathService';
|
||||
import { TreeFindMode } from 'vs/base/browser/ui/tree/abstractTree';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const NEW_STYLE_COMPRESS = true;
|
||||
|
||||
|
@ -437,9 +438,10 @@ export class LoadedScriptsView extends ViewPane {
|
|||
@IPathService private readonly pathService: IPathService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
this.loadedScriptsItemType = CONTEXT_LOADED_SCRIPTS_ITEM_TYPE.bindTo(contextKeyService);
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ import { ReplEvaluationResult, ReplGroup } from 'vs/workbench/contrib/debug/comm
|
|||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { registerNavigableContainer } from 'vs/workbench/browser/actions/widgetNavigationCommands';
|
||||
import { AccessibilitySignal, IAccessibilitySignalService } from 'vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
|
@ -133,6 +134,7 @@ export class Repl extends FilterViewPane implements IHistoryNavigationWidget {
|
|||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IMenuService menuService: IMenuService,
|
||||
@ILanguageFeaturesService private readonly languageFeaturesService: ILanguageFeaturesService,
|
||||
@ILogService private readonly logService: ILogService,
|
||||
|
@ -145,7 +147,7 @@ export class Repl extends FilterViewPane implements IHistoryNavigationWidget {
|
|||
text: filterText,
|
||||
history: JSON.parse(storageService.get(FILTER_HISTORY_STORAGE_KEY, StorageScope.WORKSPACE, '[]')) as string[],
|
||||
}
|
||||
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
this.menu = menuService.createMenu(MenuId.DebugConsoleContext, contextKeyService);
|
||||
this._register(this.menu);
|
||||
|
|
|
@ -26,6 +26,7 @@ import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/c
|
|||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';
|
||||
|
@ -80,9 +81,10 @@ export class VariablesView extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IMenuService private readonly menuService: IMenuService
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
// Use scheduler to prevent unnecessary flashing
|
||||
this.updateTreeScheduler = new RunOnceScheduler(async () => {
|
||||
|
|
|
@ -20,6 +20,7 @@ import { Action2, IMenu, IMenuService, MenuId, registerAction2 } from 'vs/platfo
|
|||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ContextKeyExpr, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';
|
||||
|
@ -62,9 +63,10 @@ export class WatchExpressionsView extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IMenuService menuService: IMenuService
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
this.menu = menuService.createMenu(MenuId.DebugWatchContext, contextKeyService);
|
||||
this._register(this.menu);
|
||||
|
|
|
@ -26,6 +26,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
|||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { SELECT_AND_START_ID, DEBUG_CONFIGURE_COMMAND_ID, DEBUG_START_COMMAND_ID } from 'vs/workbench/contrib/debug/browser/debugCommands';
|
||||
import { ILocalizedString } from 'vs/platform/action/common/action';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const debugStartLanguageKey = 'debugStartLanguage';
|
||||
const CONTEXT_DEBUG_START_LANGUAGE = new RawContextKey<string>(debugStartLanguageKey, undefined);
|
||||
|
@ -53,8 +54,9 @@ export class WelcomeView extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IStorageService storageSevice: IStorageService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
this.debugStartLanguageContext = CONTEXT_DEBUG_START_LANGUAGE.bindTo(contextKeyService);
|
||||
this.debuggerInterestedContext = CONTEXT_DEBUGGER_INTERESTED_IN_ACTIVE_EDITOR.bindTo(contextKeyService);
|
||||
|
|
|
@ -60,6 +60,7 @@ import { Extensions, IExtensionFeatureRenderer, IExtensionFeaturesManagementServ
|
|||
import { URI } from 'vs/base/common/uri';
|
||||
import { isString } from 'vs/base/common/types';
|
||||
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export const NONE_CATEGORY = 'none';
|
||||
|
||||
|
@ -135,6 +136,7 @@ export class ExtensionsListView extends ViewPane {
|
|||
@IExtensionsWorkbenchService protected extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@IExtensionRecommendationsService protected extensionRecommendationsService: IExtensionRecommendationsService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IWorkspaceContextService protected contextService: IWorkspaceContextService,
|
||||
@IExtensionManagementServerService protected readonly extensionManagementServerService: IExtensionManagementServerService,
|
||||
|
@ -158,7 +160,7 @@ export class ExtensionsListView extends ViewPane {
|
|||
...(viewletViewOptions as IViewPaneOptions),
|
||||
showActions: ViewPaneShowActions.Always,
|
||||
maximumBodySize: options.flexibleHeight ? (storageService.getNumber(`${viewletViewOptions.id}.size`, StorageScope.PROFILE, 0) ? undefined : 0) : undefined
|
||||
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
if (this.options.onDidChangeTitle) {
|
||||
this._register(this.options.onDidChangeTitle(title => this.updateTitle(title)));
|
||||
}
|
||||
|
@ -1325,6 +1327,7 @@ export class StaticQueryExtensionsView extends ExtensionsListView {
|
|||
@IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@IExtensionRecommendationsService extensionRecommendationsService: IExtensionRecommendationsService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IWorkspaceContextService contextService: IWorkspaceContextService,
|
||||
@IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService,
|
||||
|
@ -1345,7 +1348,7 @@ export class StaticQueryExtensionsView extends ExtensionsListView {
|
|||
@ILogService logService: ILogService
|
||||
) {
|
||||
super(options, viewletViewOptions, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService,
|
||||
extensionsWorkbenchService, extensionRecommendationsService, telemetryService, configurationService, contextService, extensionManagementServerService,
|
||||
extensionsWorkbenchService, extensionRecommendationsService, telemetryService, hoverService, configurationService, contextService, extensionManagementServerService,
|
||||
extensionManifestPropertiesService, extensionManagementService, workspaceService, productService, contextKeyService, viewDescriptorService, openerService,
|
||||
preferencesService, storageService, workspaceTrustManagementService, extensionEnablementService, layoutService, extensionFeaturesManagementService,
|
||||
uriIdentityService, logService);
|
||||
|
|
|
@ -31,7 +31,6 @@ import { URI } from 'vs/base/common/uri';
|
|||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import { renderMarkdown } from 'vs/base/browser/markdownRenderer';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
|
@ -131,7 +130,8 @@ export class RatingsWidget extends ExtensionWidget {
|
|||
|
||||
constructor(
|
||||
private container: HTMLElement,
|
||||
private small: boolean
|
||||
private small: boolean,
|
||||
@IHoverService hoverService: IHoverService
|
||||
) {
|
||||
super();
|
||||
container.classList.add('extension-ratings');
|
||||
|
@ -140,7 +140,7 @@ export class RatingsWidget extends ExtensionWidget {
|
|||
container.classList.add('small');
|
||||
}
|
||||
|
||||
this.containerHover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), container, ''));
|
||||
this.containerHover = this._register(hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), container, ''));
|
||||
|
||||
this.render();
|
||||
}
|
||||
|
@ -197,10 +197,11 @@ export class VerifiedPublisherWidget extends ExtensionWidget {
|
|||
constructor(
|
||||
private container: HTMLElement,
|
||||
private small: boolean,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IOpenerService private readonly openerService: IOpenerService,
|
||||
) {
|
||||
super();
|
||||
this.containerHover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), container, ''));
|
||||
this.containerHover = this._register(hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), container, ''));
|
||||
this.render();
|
||||
}
|
||||
|
||||
|
@ -241,6 +242,7 @@ export class SponsorWidget extends ExtensionWidget {
|
|||
|
||||
constructor(
|
||||
private container: HTMLElement,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@IOpenerService private readonly openerService: IOpenerService,
|
||||
@ITelemetryService private readonly telemetryService: ITelemetryService,
|
||||
) {
|
||||
|
@ -256,7 +258,7 @@ export class SponsorWidget extends ExtensionWidget {
|
|||
}
|
||||
|
||||
const sponsor = append(this.container, $('span.sponsor.clickable', { tabIndex: 0 }));
|
||||
this.disposables.add(setupCustomHover(getDefaultHoverDelegate('mouse'), sponsor, this.extension?.publisherSponsorLink.toString() ?? ''));
|
||||
this.disposables.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), sponsor, this.extension?.publisherSponsorLink.toString() ?? ''));
|
||||
sponsor.setAttribute('role', 'link'); // #132645
|
||||
const sponsorIconElement = renderIcon(sponsorIcon);
|
||||
const label = $('span', undefined, localize('sponsor', "Sponsor"));
|
||||
|
@ -388,13 +390,14 @@ class RemoteBadge extends Disposable {
|
|||
|
||||
constructor(
|
||||
private readonly tooltip: boolean,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@ILabelService private readonly labelService: ILabelService,
|
||||
@IThemeService private readonly themeService: IThemeService,
|
||||
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService
|
||||
) {
|
||||
super();
|
||||
this.element = $('div.extension-badge.extension-remote-badge');
|
||||
this.elementHover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), this.element, ''));
|
||||
this.elementHover = this._register(hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.element, ''));
|
||||
this.render();
|
||||
}
|
||||
|
||||
|
@ -460,6 +463,7 @@ export class SyncIgnoredWidget extends ExtensionWidget {
|
|||
private readonly container: HTMLElement,
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@IUserDataSyncEnablementService private readonly userDataSyncEnablementService: IUserDataSyncEnablementService,
|
||||
) {
|
||||
super();
|
||||
|
@ -474,7 +478,7 @@ export class SyncIgnoredWidget extends ExtensionWidget {
|
|||
|
||||
if (this.extension && this.extension.state === ExtensionState.Installed && this.userDataSyncEnablementService.isEnabled() && this.extensionsWorkbenchService.isExtensionIgnoredToSync(this.extension)) {
|
||||
const element = append(this.container, $('span.extension-sync-ignored' + ThemeIcon.asCSSSelector(syncIgnoredIcon)));
|
||||
this.disposables.add(setupCustomHover(getDefaultHoverDelegate('mouse'), element, localize('syncingore.label', "This extension is ignored during sync.")));
|
||||
this.disposables.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), element, localize('syncingore.label', "This extension is ignored during sync.")));
|
||||
element.classList.add(...ThemeIcon.asClassNameArray(syncIgnoredIcon));
|
||||
}
|
||||
}
|
||||
|
@ -547,7 +551,7 @@ export class ExtensionHoverWidget extends ExtensionWidget {
|
|||
render(): void {
|
||||
this.hover.value = undefined;
|
||||
if (this.extension) {
|
||||
this.hover.value = setupCustomHover({
|
||||
this.hover.value = this.hoverService.setupUpdatableHover({
|
||||
delay: this.configurationService.getValue<number>('workbench.hover.delay'),
|
||||
showHover: (options) => {
|
||||
return this.hoverService.showHover({
|
||||
|
|
|
@ -22,6 +22,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
|||
import { isWeb } from 'vs/base/common/platform';
|
||||
import { DragAndDropObserver, getWindow } from 'vs/base/browser/dom';
|
||||
import { ILocalizedString } from 'vs/platform/action/common/action';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export class EmptyView extends ViewPane {
|
||||
|
||||
|
@ -42,8 +43,9 @@ export class EmptyView extends ViewPane {
|
|||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
this._register(this.contextService.onDidChangeWorkbenchState(() => this.refreshTitle()));
|
||||
this._register(this.labelService.onDidChangeFormatters(() => this.refreshTitle()));
|
||||
|
|
|
@ -56,6 +56,7 @@ import { EditorOpenSource } from 'vs/platform/editor/common/editor';
|
|||
import { ResourceMap } from 'vs/base/common/map';
|
||||
import { isInputElement } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { AbstractTreePart } from 'vs/base/browser/ui/tree/abstractTree';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
|
||||
function hasExpandedRootChild(tree: WorkbenchCompressibleAsyncDataTree<ExplorerItem | ExplorerItem[], ExplorerItem, FuzzyScore>, treeInput: ExplorerItem[]): boolean {
|
||||
|
@ -201,6 +202,7 @@ export class ExplorerView extends ViewPane implements IExplorerView {
|
|||
@ILabelService private readonly labelService: ILabelService,
|
||||
@IThemeService themeService: IWorkbenchThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IExplorerService private readonly explorerService: IExplorerService,
|
||||
@IStorageService private readonly storageService: IStorageService,
|
||||
@IClipboardService private clipboardService: IClipboardService,
|
||||
|
@ -209,7 +211,7 @@ export class ExplorerView extends ViewPane implements IExplorerView {
|
|||
@ICommandService private readonly commandService: ICommandService,
|
||||
@IOpenerService openerService: IOpenerService
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
this.delegate = options.delegate;
|
||||
this.resourceContext = instantiationService.createInstance(ResourceContextKey);
|
||||
|
|
|
@ -54,6 +54,7 @@ import { extUriIgnorePathCase } from 'vs/base/common/resources';
|
|||
import { ILocalizedString } from 'vs/platform/action/common/action';
|
||||
import { mainWindow } from 'vs/base/browser/window';
|
||||
import { EditorGroupView } from 'vs/workbench/browser/parts/editor/editorGroupView';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
|
@ -90,11 +91,12 @@ export class OpenEditorsView extends ViewPane {
|
|||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IWorkingCopyService private readonly workingCopyService: IWorkingCopyService,
|
||||
@IFilesConfigurationService private readonly filesConfigurationService: IFilesConfigurationService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
this.structuralRefreshDelay = 0;
|
||||
this.sortOrder = configurationService.getValue('explorer.openEditors.sortOrder');
|
||||
|
|
|
@ -33,7 +33,7 @@ import { Categories } from 'vs/platform/action/common/actionCommonCategories';
|
|||
import { IAccessibilityInformation } from 'vs/platform/accessibility/common/accessibility';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { nativeHoverDelegate } from 'vs/platform/hover/browser/hover';
|
||||
import { IHoverService, nativeHoverDelegate } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
class LanguageStatusViewModel {
|
||||
|
||||
|
@ -104,6 +104,7 @@ class LanguageStatus {
|
|||
@ILanguageStatusService private readonly _languageStatusService: ILanguageStatusService,
|
||||
@IStatusbarService private readonly _statusBarService: IStatusbarService,
|
||||
@IEditorService private readonly _editorService: IEditorService,
|
||||
@IHoverService private readonly _hoverService: IHoverService,
|
||||
@IOpenerService private readonly _openerService: IOpenerService,
|
||||
@IStorageService private readonly _storageService: IStorageService,
|
||||
) {
|
||||
|
@ -324,7 +325,7 @@ class LanguageStatus {
|
|||
href: URI.from({
|
||||
scheme: 'command', path: command.id, query: command.arguments && JSON.stringify(command.arguments)
|
||||
}).toString()
|
||||
}, { hoverDelegate: nativeHoverDelegate }, this._openerService));
|
||||
}, { hoverDelegate: nativeHoverDelegate }, this._hoverService, this._openerService));
|
||||
}
|
||||
|
||||
// -- pin
|
||||
|
@ -374,7 +375,7 @@ class LanguageStatus {
|
|||
const parts = renderLabelWithIcons(node);
|
||||
dom.append(target, ...parts);
|
||||
} else {
|
||||
store.add(new Link(target, node, undefined, this._openerService));
|
||||
store.add(new Link(target, node, undefined, this._hoverService, this._openerService));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
|||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { unsupportedSchemas } from 'vs/platform/markers/common/markerService';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const $ = DOM.$;
|
||||
|
||||
|
@ -118,6 +119,7 @@ class MarkerCodeColumnRenderer implements ITableRenderer<MarkerTableItem, IMarke
|
|||
readonly templateId: string = MarkerCodeColumnRenderer.TEMPLATE_ID;
|
||||
|
||||
constructor(
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@IOpenerService private readonly openerService: IOpenerService
|
||||
) { }
|
||||
|
||||
|
@ -131,7 +133,7 @@ class MarkerCodeColumnRenderer implements ITableRenderer<MarkerTableItem, IMarke
|
|||
const codeLabel = templateDisposable.add(new HighlightedLabel(codeColumn));
|
||||
codeLabel.element.classList.add('code-label');
|
||||
|
||||
const codeLink = templateDisposable.add(new Link(codeColumn, { href: '', label: '' }, {}, this.openerService));
|
||||
const codeLink = templateDisposable.add(new Link(codeColumn, { href: '', label: '' }, {}, this.hoverService, this.openerService));
|
||||
|
||||
return { codeColumn, sourceLabel, codeLabel, codeLink, templateDisposable };
|
||||
}
|
||||
|
|
|
@ -51,9 +51,9 @@ import { MarkersContextKeys, MarkersViewMode } from 'vs/workbench/contrib/marker
|
|||
import { unsupportedSchemas } from 'vs/platform/markers/common/markerService';
|
||||
import { defaultCountBadgeStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import type { IUpdatableHover } from 'vs/base/browser/ui/hover/hover';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
interface IResourceMarkersTemplateData {
|
||||
readonly resourceLabel: IResourceLabel;
|
||||
|
@ -237,6 +237,7 @@ export class MarkerRenderer implements ITreeRenderer<Marker, MarkerFilterData, I
|
|||
|
||||
constructor(
|
||||
private readonly markersViewState: MarkersViewModel,
|
||||
@IHoverService protected hoverService: IHoverService,
|
||||
@IInstantiationService protected instantiationService: IInstantiationService,
|
||||
@IOpenerService protected openerService: IOpenerService,
|
||||
) { }
|
||||
|
@ -245,7 +246,7 @@ export class MarkerRenderer implements ITreeRenderer<Marker, MarkerFilterData, I
|
|||
|
||||
renderTemplate(container: HTMLElement): IMarkerTemplateData {
|
||||
const data: IMarkerTemplateData = Object.create(null);
|
||||
data.markerWidget = new MarkerWidget(container, this.markersViewState, this.openerService, this.instantiationService);
|
||||
data.markerWidget = new MarkerWidget(container, this.markersViewState, this.hoverService, this.openerService, this.instantiationService);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -294,6 +295,7 @@ class MarkerWidget extends Disposable {
|
|||
constructor(
|
||||
private parent: HTMLElement,
|
||||
private readonly markersViewModel: MarkersViewModel,
|
||||
private readonly _hoverService: IHoverService,
|
||||
private readonly _openerService: IOpenerService,
|
||||
_instantiationService: IInstantiationService
|
||||
) {
|
||||
|
@ -308,7 +310,7 @@ class MarkerWidget extends Disposable {
|
|||
this.iconContainer = dom.append(parent, dom.$(''));
|
||||
this.icon = dom.append(this.iconContainer, dom.$(''));
|
||||
this.messageAndDetailsContainer = dom.append(parent, dom.$('.marker-message-details-container'));
|
||||
this.messageAndDetailsContainerHover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), this.messageAndDetailsContainer, ''));
|
||||
this.messageAndDetailsContainerHover = this._register(this._hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.messageAndDetailsContainer, ''));
|
||||
}
|
||||
|
||||
render(element: Marker, filterData: MarkerFilterData | undefined): void {
|
||||
|
@ -405,7 +407,7 @@ class MarkerWidget extends Disposable {
|
|||
const container = dom.$('.marker-code');
|
||||
const code = this.disposables.add(new HighlightedLabel(container));
|
||||
const link = marker.code.target.toString(true);
|
||||
this.disposables.add(new Link(parent, { href: link, label: container, title: link }, undefined, this._openerService));
|
||||
this.disposables.add(new Link(parent, { href: link, label: container, title: link }, undefined, this._hoverService, this._openerService));
|
||||
const codeMatches = filterData && filterData.codeMatches || [];
|
||||
code.set(marker.code.value, codeMatches);
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ import { ITableContextMenuEvent, ITableEvent } from 'vs/base/browser/ui/table/ta
|
|||
import { MarkersTable } from 'vs/workbench/contrib/markers/browser/markersTable';
|
||||
import { Markers, MarkersContextKeys, MarkersViewMode } from 'vs/workbench/contrib/markers/common/markers';
|
||||
import { registerNavigableContainer } from 'vs/workbench/browser/actions/widgetNavigationCommands';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
function createResourceMarkersIterator(resourceMarkers: ResourceMarkers): Iterable<ITreeElement<MarkerElement>> {
|
||||
return Iterable.map(resourceMarkers.markers, m => {
|
||||
|
@ -138,6 +139,7 @@ export class MarkersView extends FilterViewPane implements IMarkersView {
|
|||
@IStorageService storageService: IStorageService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
const memento = new Memento(Markers.MARKERS_VIEW_STORAGE_ID, storageService);
|
||||
const panelState = memento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
||||
|
@ -150,7 +152,7 @@ export class MarkersView extends FilterViewPane implements IMarkersView {
|
|||
text: panelState['filter'] || '',
|
||||
history: panelState['filterHistory'] || []
|
||||
}
|
||||
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
this.memento = memento;
|
||||
this.panelState = panelState;
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ import { IToggleStyles } from 'vs/base/browser/ui/toggle/toggle';
|
|||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { NotebookSetting } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { IActionViewItemOptions } from 'vs/base/browser/ui/actionbar/actionViewItems';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const NLS_FIND_INPUT_LABEL = nls.localize('label.find', "Find");
|
||||
const NLS_FIND_INPUT_PLACEHOLDER = nls.localize('placeholder.find', "Find");
|
||||
|
@ -319,6 +320,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
|
|||
@IConfigurationService protected readonly _configurationService: IConfigurationService,
|
||||
@IContextMenuService private readonly contextMenuService: IContextMenuService,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
protected readonly _state: FindReplaceState<NotebookFindFilters> = new FindReplaceState<NotebookFindFilters>(),
|
||||
protected readonly _notebookEditor: INotebookEditor,
|
||||
) {
|
||||
|
@ -358,7 +360,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
|
|||
this._state.change({ isReplaceRevealed: this._isReplaceVisible }, false);
|
||||
this._updateReplaceViewDisplay();
|
||||
}
|
||||
}));
|
||||
}, hoverService));
|
||||
this._toggleReplaceBtn.setEnabled(!isInteractiveWindow);
|
||||
this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
|
||||
this._domNode.appendChild(this._toggleReplaceBtn.domNode);
|
||||
|
@ -441,7 +443,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
|
|||
onTrigger: () => {
|
||||
this.find(true);
|
||||
}
|
||||
}));
|
||||
}, hoverService));
|
||||
|
||||
this.nextBtn = this._register(new SimpleButton({
|
||||
label: NLS_NEXT_MATCH_BTN_LABEL,
|
||||
|
@ -449,7 +451,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
|
|||
onTrigger: () => {
|
||||
this.find(false);
|
||||
}
|
||||
}));
|
||||
}, hoverService));
|
||||
|
||||
const closeBtn = this._register(new SimpleButton({
|
||||
label: NLS_CLOSE_BTN_LABEL,
|
||||
|
@ -457,7 +459,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
|
|||
onTrigger: () => {
|
||||
this.hide();
|
||||
}
|
||||
}));
|
||||
}, hoverService));
|
||||
|
||||
this._innerFindDomNode.appendChild(this._findInput.domNode);
|
||||
this._innerFindDomNode.appendChild(this._matchesCount);
|
||||
|
@ -518,7 +520,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
|
|||
onTrigger: () => {
|
||||
this.replaceOne();
|
||||
}
|
||||
}));
|
||||
}, hoverService));
|
||||
|
||||
// Replace all button
|
||||
this._replaceAllBtn = this._register(new SimpleButton({
|
||||
|
@ -527,7 +529,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
|
|||
onTrigger: () => {
|
||||
this.replaceAll();
|
||||
}
|
||||
}));
|
||||
}, hoverService));
|
||||
|
||||
this._innerReplaceDomNode.appendChild(this._replaceBtn.domNode);
|
||||
this._innerReplaceDomNode.appendChild(this._replaceAllBtn.domNode);
|
||||
|
|
|
@ -16,10 +16,10 @@ import { MATCHES_LIMIT } from 'vs/editor/contrib/find/browser/findModel';
|
|||
import { FindReplaceState } from 'vs/editor/contrib/find/browser/findState';
|
||||
import { NLS_MATCHES_LOCATION, NLS_NO_RESULTS } from 'vs/editor/contrib/find/browser/findWidget';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IMenuService } from 'vs/platform/actions/common/actions';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { NotebookFindFilters } from 'vs/workbench/contrib/notebook/browser/contrib/find/findFilters';
|
||||
import { FindModel } from 'vs/workbench/contrib/notebook/browser/contrib/find/findModel';
|
||||
|
@ -82,10 +82,10 @@ class NotebookFindWidget extends SimpleFindReplaceWidget implements INotebookEdi
|
|||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IMenuService menuService: IMenuService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
) {
|
||||
super(contextViewService, contextKeyService, configurationService, contextMenuService, instantiationService, new FindReplaceState<NotebookFindFilters>(), _notebookEditor);
|
||||
super(contextViewService, contextKeyService, configurationService, contextMenuService, instantiationService, hoverService, new FindReplaceState<NotebookFindFilters>(), _notebookEditor);
|
||||
this._findModel = new FindModel(this._notebookEditor, this._state, this._configurationService);
|
||||
|
||||
DOM.append(this._notebookEditor.getDomNode(), this.getDomNode());
|
||||
|
|
|
@ -15,6 +15,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands';
|
|||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
|
@ -63,9 +64,10 @@ export class NotebookVariablesView extends ViewPane {
|
|||
@ICommandService protected commandService: ICommandService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IMenuService private readonly menuService: IMenuService
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
this._register(this.editorService.onDidActiveEditorChange(this.handleActiveEditorChange.bind(this)));
|
||||
this._register(this.notebookKernelService.onDidNotebookVariablesUpdate(this.handleVariablesChanged.bind(this)));
|
||||
|
|
|
@ -9,7 +9,6 @@ import { EventType as TouchEventType } from 'vs/base/browser/touch';
|
|||
import { IActionViewItemProvider } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { IActionProvider } from 'vs/base/browser/ui/dropdown/dropdown';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { renderLabelWithIcons } from 'vs/base/browser/ui/iconLabel/iconLabels';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { ThemeIcon } from 'vs/base/common/themables';
|
||||
|
@ -19,6 +18,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView
|
|||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import type { IUpdatableHover } from 'vs/base/browser/ui/hover/hover';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export class CodiconActionViewItem extends MenuEntryActionViewItem {
|
||||
|
||||
|
@ -60,7 +60,8 @@ export class UnifiedSubmenuActionView extends SubmenuEntryActionViewItem {
|
|||
readonly subActionViewItemProvider: IActionViewItemProvider | undefined,
|
||||
@IKeybindingService _keybindingService: IKeybindingService,
|
||||
@IContextMenuService _contextMenuService: IContextMenuService,
|
||||
@IThemeService _themeService: IThemeService
|
||||
@IThemeService _themeService: IThemeService,
|
||||
@IHoverService private readonly _hoverService: IHoverService
|
||||
) {
|
||||
super(action, { ...options, hoverDelegate: options?.hoverDelegate ?? getDefaultHoverDelegate('element') }, _keybindingService, _contextMenuService, _themeService);
|
||||
}
|
||||
|
@ -72,7 +73,7 @@ export class UnifiedSubmenuActionView extends SubmenuEntryActionViewItem {
|
|||
this._actionLabel = document.createElement('a');
|
||||
container.appendChild(this._actionLabel);
|
||||
|
||||
this._hover = this._register(setupCustomHover(this.options.hoverDelegate ?? getDefaultHoverDelegate('element'), this._actionLabel, ''));
|
||||
this._hover = this._register(this._hoverService.setupUpdatableHover(this.options.hoverDelegate ?? getDefaultHoverDelegate('element'), this._actionLabel, ''));
|
||||
|
||||
this.updateLabel();
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ import { CellContentPart } from 'vs/workbench/contrib/notebook/browser/view/cell
|
|||
import { ClickTargetType, IClickTarget } from 'vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets';
|
||||
import { CodeCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel';
|
||||
import { CellStatusbarAlignment, INotebookCellStatusBarItem } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { IHoverDelegate, IHoverDelegateOptions } from 'vs/base/browser/ui/hover/hoverDelegate';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
|
@ -285,6 +284,7 @@ class CellStatusBarItem extends Disposable {
|
|||
@ICommandService private readonly _commandService: ICommandService,
|
||||
@INotificationService private readonly _notificationService: INotificationService,
|
||||
@IThemeService private readonly _themeService: IThemeService,
|
||||
@IHoverService private readonly _hoverService: IHoverService,
|
||||
) {
|
||||
super();
|
||||
|
||||
|
@ -328,7 +328,7 @@ class CellStatusBarItem extends Disposable {
|
|||
|
||||
if (item.tooltip) {
|
||||
const hoverContent = typeof item.tooltip === 'string' ? item.tooltip : { markdown: item.tooltip } as IUpdatableHoverTooltipMarkdownString;
|
||||
this._itemDisposables.add(setupCustomHover(this._hoverDelegate, this.container, hoverContent));
|
||||
this._itemDisposables.add(this._hoverService.setupUpdatableHover(this._hoverDelegate, this.container, hoverContent));
|
||||
}
|
||||
|
||||
this.container.classList.toggle('cell-status-item-has-command', !!item.command);
|
||||
|
|
|
@ -36,6 +36,7 @@ import { AbstractTreeViewState, IAbstractTreeViewState, TreeFindMode } from 'vs/
|
|||
import { URI } from 'vs/base/common/uri';
|
||||
import { ctxAllCollapsed, ctxFilterOnType, ctxFollowsCursor, ctxSortMode, IOutlinePane, OutlineSortOrder } from 'vs/workbench/contrib/outline/browser/outline';
|
||||
import { defaultProgressBarStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
class OutlineTreeSorter<E> implements ITreeSorter<E> {
|
||||
|
||||
|
@ -94,8 +95,9 @@ export class OutlinePane extends ViewPane implements IOutlinePane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, _instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, _instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
this._outlineViewState.restore(this._storageService);
|
||||
this._disposables.add(this._outlineViewState);
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import { ResourceContextKey } from 'vs/workbench/common/contextkeys';
|
|||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { IEditorConfiguration } from 'vs/workbench/browser/parts/editor/textEditor';
|
||||
import { computeEditorAriaLabel } from 'vs/workbench/browser/editor';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export class OutputViewPane extends ViewPane {
|
||||
|
||||
|
@ -56,8 +57,9 @@ export class OutputViewPane extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
this.scrollLockContextKey = CONTEXT_OUTPUT_SCROLL_LOCK.bindTo(this.contextKeyService);
|
||||
|
||||
const editorInstantiationService = instantiationService.createChild(new ServiceCollection([IContextKeyService, this.scopedContextKeyService]));
|
||||
|
|
|
@ -58,10 +58,10 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
|
|||
import { AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
||||
import { registerNavigableContainer } from 'vs/workbench/browser/actions/widgetNavigationCommands';
|
||||
import { IActionViewItemOptions } from 'vs/base/browser/ui/actionbar/actionViewItems';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import type { IUpdatableHover } from 'vs/base/browser/ui/hover/hover';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const $ = DOM.$;
|
||||
|
||||
|
@ -918,9 +918,14 @@ class CommandColumnRenderer implements ITableRenderer<IKeybindingItemEntry, ICom
|
|||
|
||||
readonly templateId: string = CommandColumnRenderer.TEMPLATE_ID;
|
||||
|
||||
constructor(
|
||||
@IHoverService private readonly _hoverService: IHoverService
|
||||
) {
|
||||
}
|
||||
|
||||
renderTemplate(container: HTMLElement): ICommandColumnTemplateData {
|
||||
const commandColumn = DOM.append(container, $('.command'));
|
||||
const commandColumnHover = setupCustomHover(getDefaultHoverDelegate('mouse'), commandColumn, '');
|
||||
const commandColumnHover = this._hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), commandColumn, '');
|
||||
const commandLabelContainer = DOM.append(commandColumn, $('.command-label'));
|
||||
const commandLabel = new HighlightedLabel(commandLabelContainer);
|
||||
const commandDefaultLabelContainer = DOM.append(commandColumn, $('.command-default-label'));
|
||||
|
@ -1036,11 +1041,12 @@ class SourceColumnRenderer implements ITableRenderer<IKeybindingItemEntry, ISour
|
|||
|
||||
constructor(
|
||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
) { }
|
||||
|
||||
renderTemplate(container: HTMLElement): ISourceColumnTemplateData {
|
||||
const sourceColumn = DOM.append(container, $('.source'));
|
||||
const sourceColumnHover = setupCustomHover(getDefaultHoverDelegate('mouse'), sourceColumn, '');
|
||||
const sourceColumnHover = this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), sourceColumn, '');
|
||||
const sourceLabel = new HighlightedLabel(DOM.append(sourceColumn, $('.source-label')));
|
||||
const extensionContainer = DOM.append(sourceColumn, $('.extension-container'));
|
||||
const extensionLabel = DOM.append<HTMLAnchorElement>(extensionContainer, $('a.extension-label', { tabindex: 0 }));
|
||||
|
@ -1148,6 +1154,7 @@ class WhenColumnRenderer implements ITableRenderer<IKeybindingItemEntry, IWhenCo
|
|||
|
||||
constructor(
|
||||
private readonly keybindingsEditor: KeybindingsEditor,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
) { }
|
||||
|
||||
|
@ -1206,7 +1213,7 @@ class WhenColumnRenderer implements ITableRenderer<IKeybindingItemEntry, IWhenCo
|
|||
|
||||
if (keybindingItemEntry.keybindingItem.when) {
|
||||
templateData.whenLabel.set(keybindingItemEntry.keybindingItem.when, keybindingItemEntry.whenMatches, keybindingItemEntry.keybindingItem.when);
|
||||
templateData.disposables.add(setupCustomHover(getDefaultHoverDelegate('mouse'), templateData.element, keybindingItemEntry.keybindingItem.when));
|
||||
templateData.disposables.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), templateData.element, keybindingItemEntry.keybindingItem.when));
|
||||
} else {
|
||||
templateData.whenLabel.set('-');
|
||||
}
|
||||
|
|
|
@ -34,9 +34,10 @@ import { isWorkspaceFolder, IWorkspaceContextService, IWorkspaceFolder, Workbenc
|
|||
import { settingsEditIcon, settingsScopeDropDownIcon } from 'vs/workbench/contrib/preferences/browser/preferencesIcons';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { ILanguageService } from 'vs/editor/common/languages/language';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import type { IUpdatableHover } from 'vs/base/browser/ui/hover/hover';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export class FolderSettingsActionViewItem extends BaseActionViewItem {
|
||||
|
||||
private _folder: IWorkspaceFolder | null;
|
||||
|
@ -53,6 +54,7 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem {
|
|||
action: IAction,
|
||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
||||
@IContextMenuService private readonly contextMenuService: IContextMenuService,
|
||||
@IHoverService private readonly hoverService: IHoverService,
|
||||
) {
|
||||
super(null, action);
|
||||
const workspace = this.contextService.getWorkspace();
|
||||
|
@ -91,7 +93,7 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem {
|
|||
'aria-haspopup': 'true',
|
||||
'tabindex': '0'
|
||||
}, this.labelElement, this.detailsElement, this.dropDownElement);
|
||||
this.anchorElementHover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), this.anchorElement, ''));
|
||||
this.anchorElementHover = this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.anchorElement, ''));
|
||||
this._register(DOM.addDisposableListener(this.anchorElement, DOM.EventType.MOUSE_DOWN, e => DOM.EventHelper.stop(e)));
|
||||
this._register(DOM.addDisposableListener(this.anchorElement, DOM.EventType.CLICK, e => this.onClick(e)));
|
||||
this._register(DOM.addDisposableListener(this.container, DOM.EventType.KEY_UP, e => this.onKeyUp(e)));
|
||||
|
|
|
@ -54,6 +54,7 @@ import { getVirtualWorkspaceLocation } from 'vs/platform/workspace/common/virtua
|
|||
import { IWalkthroughsService } from 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { mainWindow } from 'vs/base/browser/window';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
interface IViewModel {
|
||||
onDidChangeHelpInformation: Event<void>;
|
||||
|
@ -460,10 +461,11 @@ class HelpPanel extends ViewPane {
|
|||
@IWorkbenchEnvironmentService protected readonly environmentService: IWorkbenchEnvironmentService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
|
||||
@IWalkthroughsService private readonly walkthroughsService: IWalkthroughsService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
}
|
||||
|
||||
protected override renderBody(container: HTMLElement): void {
|
||||
|
|
|
@ -57,6 +57,7 @@ import { Codicon } from 'vs/base/common/codicons';
|
|||
import { defaultButtonStyles, defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
import { Attributes, CandidatePort, Tunnel, TunnelCloseReason, TunnelModel, TunnelSource, forwardedPortsViewEnabled, makeAddress, mapHasAddressLocalhostOrAllInterfaces, parseAddress } from 'vs/workbench/services/remote/common/tunnelModel';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
export const openPreviewEnabledContext = new RawContextKey<boolean>('openPreviewEnabled', false);
|
||||
|
||||
|
@ -781,10 +782,11 @@ export class TunnelPanel extends ViewPane {
|
|||
@IThemeService themeService: IThemeService,
|
||||
@IRemoteExplorerService private readonly remoteExplorerService: IRemoteExplorerService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@ITunnelService private readonly tunnelService: ITunnelService,
|
||||
@IContextViewService private readonly contextViewService: IContextViewService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
this.tunnelTypeContext = TunnelTypeContextKey.bindTo(contextKeyService);
|
||||
this.tunnelCloseableContext = TunnelCloseableContextKey.bindTo(contextKeyService);
|
||||
this.tunnelPrivacyContext = TunnelPrivacyContextKey.bindTo(contextKeyService);
|
||||
|
|
|
@ -27,6 +27,7 @@ import { Orientation } from 'vs/base/browser/ui/sash/sash';
|
|||
import { Iterable } from 'vs/base/common/iterator';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { MenuId } from 'vs/platform/actions/common/actions';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
class ListDelegate implements IListVirtualDelegate<ISCMRepository> {
|
||||
|
||||
|
@ -55,9 +56,10 @@ export class SCMRepositoriesViewPane extends ViewPane {
|
|||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService
|
||||
) {
|
||||
super({ ...options, titleMenuId: MenuId.SCMSourceControlTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super({ ...options, titleMenuId: MenuId.SCMSourceControlTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
}
|
||||
|
||||
protected override renderBody(container: HTMLElement): void {
|
||||
|
|
|
@ -110,6 +110,7 @@ import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget'
|
|||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { MarkdownString } from 'vs/base/common/htmlContent';
|
||||
import type { IUpdatableHover, IUpdatableHoverTooltipMarkdownString } from 'vs/base/browser/ui/hover/hover';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
// type SCMResourceTreeNode = IResourceNode<ISCMResource, ISCMResourceGroup>;
|
||||
// type SCMHistoryItemChangeResourceTreeNode = IResourceNode<SCMHistoryItemChangeTreeElement, SCMHistoryItemTreeElement>;
|
||||
|
@ -2828,8 +2829,9 @@ export class SCMViewPane extends ViewPane {
|
|||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
super({ ...options, titleMenuId: MenuId.SCMTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super({ ...options, titleMenuId: MenuId.SCMTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
// View mode and sort key
|
||||
this._viewMode = this.getViewMode();
|
||||
|
|
|
@ -83,6 +83,7 @@ import { ILogService } from 'vs/platform/log/common/log';
|
|||
import { AccessibilitySignal, IAccessibilitySignalService } from 'vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
||||
import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const $ = dom.$;
|
||||
|
||||
|
@ -193,12 +194,13 @@ export class SearchView extends ViewPane {
|
|||
@IStorageService private readonly storageService: IStorageService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@INotebookService private readonly notebookService: INotebookService,
|
||||
@ILogService private readonly logService: ILogService,
|
||||
@IAccessibilitySignalService private readonly accessibilitySignalService: IAccessibilitySignalService
|
||||
) {
|
||||
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
this.container = dom.$('.search-view');
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ export class TerminalViewPane extends ViewPane {
|
|||
@ITerminalGroupService private readonly _terminalGroupService: ITerminalGroupService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@INotificationService private readonly _notificationService: INotificationService,
|
||||
@IKeybindingService private readonly _keybindingService: IKeybindingService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
|
@ -82,7 +83,7 @@ export class TerminalViewPane extends ViewPane {
|
|||
@IThemeService private readonly _themeService: IThemeService,
|
||||
@IAccessibilityService private readonly _accessibilityService: IAccessibilityService
|
||||
) {
|
||||
super(options, keybindingService, _contextMenuService, _configurationService, _contextKeyService, viewDescriptorService, _instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, _contextMenuService, _configurationService, _contextKeyService, viewDescriptorService, _instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
this._register(this._terminalService.onDidRegisterProcessSupport(() => {
|
||||
this._onDidChangeViewWelcomeState.fire();
|
||||
}));
|
||||
|
|
|
@ -18,6 +18,7 @@ import { TerminalCommandId } from 'vs/workbench/contrib/terminal/common/terminal
|
|||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { openContextMenu } from 'vs/workbench/contrib/terminalContrib/find/browser/textInputContextMenu';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const TERMINAL_FIND_WIDGET_INITIAL_WIDTH = 419;
|
||||
|
||||
|
@ -35,6 +36,7 @@ export class TerminalFindWidget extends SimpleFindWidget {
|
|||
@IContextKeyService private readonly _contextKeyService: IContextKeyService,
|
||||
@IContextMenuService _contextMenuService: IContextMenuService,
|
||||
@IClipboardService _clipboardService: IClipboardService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IThemeService private readonly _themeService: IThemeService,
|
||||
@IConfigurationService private readonly _configurationService: IConfigurationService
|
||||
) {
|
||||
|
@ -52,7 +54,7 @@ export class TerminalFindWidget extends SimpleFindWidget {
|
|||
closeWidgetActionId: TerminalCommandId.FindHide,
|
||||
type: 'Terminal',
|
||||
matchesLimit: XtermTerminalConstants.SearchHighlightLimit
|
||||
}, _contextViewService, _contextKeyService, keybindingService);
|
||||
}, _contextViewService, _contextKeyService, hoverService, keybindingService);
|
||||
|
||||
this._register(this.state.onFindReplaceStateChange(() => {
|
||||
this.show();
|
||||
|
|
|
@ -29,6 +29,7 @@ import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/commo
|
|||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { EditorOpenSource, TextEditorSelectionRevealType } from 'vs/platform/editor/common/editor';
|
||||
import { FileKind } from 'vs/platform/files/common/files';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { ILabelService } from 'vs/platform/label/common/label';
|
||||
|
@ -70,9 +71,10 @@ export class TestCoverageView extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@ITestCoverageService private readonly coverageService: ITestCoverageService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
}
|
||||
|
||||
protected override renderBody(container: HTMLElement): void {
|
||||
|
|
|
@ -112,10 +112,11 @@ export class TestingExplorerView extends ViewPane {
|
|||
@IThemeService themeService: IThemeService,
|
||||
@ITestService private readonly testService: ITestService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@ITestProfileService private readonly testProfileService: ITestProfileService,
|
||||
@ICommandService private readonly commandService: ICommandService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
const relayout = this._register(new RunOnceScheduler(() => this.layoutBody(), 1));
|
||||
this._register(this.onDidChangeViewWelcomeState(() => {
|
||||
|
|
|
@ -58,6 +58,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
|
|||
import { ContextKeyExpr, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { ITextEditorOptions, TextEditorSelectionRevealType } from 'vs/platform/editor/common/editor';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
|
@ -1086,9 +1087,10 @@ export class TestResultsView extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@ITestResultService private readonly resultService: ITestResultService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
}
|
||||
|
||||
public get subject() {
|
||||
|
|
|
@ -56,6 +56,7 @@ import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storag
|
|||
import { AriaRole } from 'vs/base/browser/ui/aria/aria';
|
||||
import { ILocalizedString } from 'vs/platform/action/common/action';
|
||||
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
const ItemHeight = 22;
|
||||
|
||||
|
@ -268,11 +269,12 @@ export class TimelinePane extends ViewPane {
|
|||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@ILabelService private readonly labelService: ILabelService,
|
||||
@IUriIdentityService private readonly uriIdentityService: IUriIdentityService,
|
||||
@IExtensionService private readonly extensionService: IExtensionService,
|
||||
) {
|
||||
super({ ...options, titleMenuId: MenuId.TimelineTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super({ ...options, titleMenuId: MenuId.TimelineTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
|
||||
this.commands = this._register(this.instantiationService.createInstance(TimelinePaneCommands, this));
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
|
|||
import { Codicon } from 'vs/base/common/codicons';
|
||||
import { IUserDataProfile, IUserDataProfilesService, reviveProfile } from 'vs/platform/userDataProfile/common/userDataProfile';
|
||||
import { DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
type UserDataSyncConflictResource = IUserDataSyncResource & IResourcePreview;
|
||||
|
||||
|
@ -44,12 +45,13 @@ export class UserDataSyncConflictsViewPane extends TreeViewPane implements IUser
|
|||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@INotificationService notificationService: INotificationService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IUserDataSyncService private readonly userDataSyncService: IUserDataSyncService,
|
||||
@IUserDataSyncWorkbenchService private readonly userDataSyncWorkbenchService: IUserDataSyncWorkbenchService,
|
||||
@IUserDataSyncEnablementService private readonly userDataSyncEnablementService: IUserDataSyncEnablementService,
|
||||
@IUserDataProfilesService private readonly userDataProfilesService: IUserDataProfilesService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, notificationService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, notificationService, hoverService);
|
||||
this._register(this.userDataSyncService.onDidChangeConflicts(() => this.treeView.refresh()));
|
||||
this.registerActions();
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
import { Event } from 'vs/base/common/event';
|
||||
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { SimpleFindWidget } from 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget';
|
||||
import { KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED } from 'vs/workbench/contrib/webview/browser/webview';
|
||||
|
@ -31,13 +32,14 @@ export class WebviewFindWidget extends SimpleFindWidget {
|
|||
private readonly _delegate: WebviewFindDelegate,
|
||||
@IContextViewService contextViewService: IContextViewService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IKeybindingService keybindingService: IKeybindingService
|
||||
) {
|
||||
super({
|
||||
showCommonFindToggles: false,
|
||||
checkImeCompletionState: _delegate.checkImeCompletionState,
|
||||
enableSash: true,
|
||||
}, contextViewService, contextKeyService, keybindingService);
|
||||
}, contextViewService, contextKeyService, hoverService, keybindingService);
|
||||
this._findWidgetFocused = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED.bindTo(contextKeyService);
|
||||
|
||||
this._register(_delegate.hasFindResult(hasResult => {
|
||||
|
|
|
@ -29,6 +29,7 @@ import { WebviewWindowDragMonitor } from 'vs/workbench/contrib/webview/browser/w
|
|||
import { IWebviewViewService, WebviewView } from 'vs/workbench/contrib/webviewView/browser/webviewViewService';
|
||||
import { IActivityService, NumberBadge } from 'vs/workbench/services/activity/common/activity';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
declare const ResizeObserver: any;
|
||||
|
||||
|
@ -74,6 +75,7 @@ export class WebviewViewPane extends ViewPane {
|
|||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
@IActivityService private readonly activityService: IActivityService,
|
||||
|
@ -84,7 +86,7 @@ export class WebviewViewPane extends ViewPane {
|
|||
@IWebviewService private readonly webviewService: IWebviewService,
|
||||
@IWebviewViewService private readonly webviewViewService: IWebviewViewService,
|
||||
) {
|
||||
super({ ...options, titleMenuId: MenuId.ViewTitle, showActions: ViewPaneShowActions.WhenExpanded }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
super({ ...options, titleMenuId: MenuId.ViewTitle, showActions: ViewPaneShowActions.WhenExpanded }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
||||
this.extensionId = options.fromExtensionId;
|
||||
this.defaultTitle = this.title;
|
||||
|
||||
|
|
|
@ -1124,8 +1124,9 @@ class UserDataProfilePreviewViewPane extends TreeViewPane {
|
|||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@INotificationService notificationService: INotificationService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, notificationService);
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, notificationService, hoverService);
|
||||
}
|
||||
|
||||
protected override renderTreeView(container: HTMLElement): void {
|
||||
|
|
Loading…
Reference in a new issue