Skip to content

Commit

Permalink
Add hover for breakpoint widget placeholder
Browse files Browse the repository at this point in the history
Because it can easily be cut off in a slightly narrow editor
Fix #221506
  • Loading branch information
roblourens committed Jul 31, 2024
1 parent 85fe3e7 commit 841288c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/debug/browser/breakpointWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import * as dom from 'vs/base/browser/dom';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { Button } from 'vs/base/browser/ui/button/button';
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
import { ISelectOptionItem, SelectBox } from 'vs/base/browser/ui/selectBox/selectBox';
import { CancellationToken } from 'vs/base/common/cancellation';
import { onUnexpectedError } from 'vs/base/common/errors';
Expand Down Expand Up @@ -34,6 +35,7 @@ import * as nls from 'vs/nls';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IHoverService } from 'vs/platform/hover/browser/hover';
import { IInstantiationService, createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
Expand Down Expand Up @@ -109,6 +111,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
@IKeybindingService private readonly keybindingService: IKeybindingService,
@ILabelService private readonly labelService: ILabelService,
@ITextModelService private readonly textModelService: ITextModelService,
@IHoverService private readonly hoverService: IHoverService
) {
super(editor, { showFrame: true, showArrow: false, frameWidth: 1, isAccessible: true });

Expand Down Expand Up @@ -221,6 +224,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
this.createModesInput(container);

this.inputContainer = $('.inputContainer');
this.toDispose.push(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), this.inputContainer, this.placeholder));
this.createBreakpointInput(dom.append(container, this.inputContainer));

this.input.getModel().setValue(this.getInputValue(this.breakpoint));
Expand Down

0 comments on commit 841288c

Please sign in to comment.