@@ -77,6 +77,7 @@ export class BreakpointsView extends ViewPane {
7777 @IContextKeyService contextKeyService : IContextKeyService ,
7878 @IOpenerService openerService : IOpenerService ,
7979 @ITelemetryService telemetryService : ITelemetryService ,
80+ @ILabelService private readonly labelService : ILabelService
8081 ) {
8182 super ( options , keybindingService , contextMenuService , configurationService , contextKeyService , viewDescriptorService , instantiationService , openerService , themeService , telemetryService ) ;
8283
@@ -95,12 +96,12 @@ export class BreakpointsView extends ViewPane {
9596 new ExceptionBreakpointsRenderer ( this . debugService ) ,
9697 this . instantiationService . createInstance ( FunctionBreakpointsRenderer ) ,
9798 this . instantiationService . createInstance ( DataBreakpointsRenderer ) ,
98- new FunctionBreakpointInputRenderer ( this . debugService , this . contextViewService , this . themeService )
99+ new FunctionBreakpointInputRenderer ( this . debugService , this . contextViewService , this . themeService , this . labelService )
99100 ] , {
100101 identityProvider : { getId : ( element : IEnablement ) => element . getId ( ) } ,
101102 multipleSelectionSupport : false ,
102103 keyboardNavigationLabelProvider : { getKeyboardNavigationLabel : ( e : IEnablement ) => e } ,
103- accessibilityProvider : new BreakpointsAccessibilityProvider ( this . debugService ) ,
104+ accessibilityProvider : new BreakpointsAccessibilityProvider ( this . debugService , this . labelService ) ,
104105 overrideStyles : {
105106 listBackground : this . getBackgroundColor ( )
106107 }
@@ -379,7 +380,7 @@ class BreakpointsRenderer implements IListRenderer<IBreakpoint, IBreakpointTempl
379380 data . filePath . textContent = this . labelService . getUriLabel ( resources . dirname ( breakpoint . uri ) , { relative : true } ) ;
380381 data . checkbox . checked = breakpoint . enabled ;
381382
382- const { message, className } = getBreakpointMessageAndClassName ( this . debugService . state , this . debugService . getModel ( ) . areBreakpointsActivated ( ) , breakpoint ) ;
383+ const { message, className } = getBreakpointMessageAndClassName ( this . debugService . state , this . debugService . getModel ( ) . areBreakpointsActivated ( ) , breakpoint , this . labelService ) ;
383384 data . icon . className = `codicon ${ className } ` ;
384385 data . breakpoint . title = breakpoint . message || message || '' ;
385386
@@ -441,7 +442,8 @@ class ExceptionBreakpointsRenderer implements IListRenderer<IExceptionBreakpoint
441442class FunctionBreakpointsRenderer implements IListRenderer < FunctionBreakpoint , IBaseBreakpointWithIconTemplateData > {
442443
443444 constructor (
444- @IDebugService private readonly debugService : IDebugService
445+ @IDebugService private readonly debugService : IDebugService ,
446+ @ILabelService private readonly labelService : ILabelService
445447 ) {
446448 // noop
447449 }
@@ -474,7 +476,7 @@ class FunctionBreakpointsRenderer implements IListRenderer<FunctionBreakpoint, I
474476 renderElement ( functionBreakpoint : FunctionBreakpoint , _index : number , data : IBaseBreakpointWithIconTemplateData ) : void {
475477 data . context = functionBreakpoint ;
476478 data . name . textContent = functionBreakpoint . name ;
477- const { className, message } = getBreakpointMessageAndClassName ( this . debugService . state , this . debugService . getModel ( ) . areBreakpointsActivated ( ) , functionBreakpoint ) ;
479+ const { className, message } = getBreakpointMessageAndClassName ( this . debugService . state , this . debugService . getModel ( ) . areBreakpointsActivated ( ) , functionBreakpoint , this . labelService ) ;
478480 data . icon . className = `codicon ${ className } ` ;
479481 data . icon . title = message ? message : '' ;
480482 data . checkbox . checked = functionBreakpoint . enabled ;
@@ -496,7 +498,8 @@ class FunctionBreakpointsRenderer implements IListRenderer<FunctionBreakpoint, I
496498class DataBreakpointsRenderer implements IListRenderer < DataBreakpoint , IBaseBreakpointWithIconTemplateData > {
497499
498500 constructor (
499- @IDebugService private readonly debugService : IDebugService
501+ @IDebugService private readonly debugService : IDebugService ,
502+ @ILabelService private readonly labelService : ILabelService
500503 ) {
501504 // noop
502505 }
@@ -529,7 +532,7 @@ class DataBreakpointsRenderer implements IListRenderer<DataBreakpoint, IBaseBrea
529532 renderElement ( dataBreakpoint : DataBreakpoint , _index : number , data : IBaseBreakpointWithIconTemplateData ) : void {
530533 data . context = dataBreakpoint ;
531534 data . name . textContent = dataBreakpoint . description ;
532- const { className, message } = getBreakpointMessageAndClassName ( this . debugService . state , this . debugService . getModel ( ) . areBreakpointsActivated ( ) , dataBreakpoint ) ;
535+ const { className, message } = getBreakpointMessageAndClassName ( this . debugService . state , this . debugService . getModel ( ) . areBreakpointsActivated ( ) , dataBreakpoint , this . labelService ) ;
533536 data . icon . className = `codicon ${ className } ` ;
534537 data . icon . title = message ? message : '' ;
535538 data . checkbox . checked = dataBreakpoint . enabled ;
@@ -553,7 +556,8 @@ class FunctionBreakpointInputRenderer implements IListRenderer<IFunctionBreakpoi
553556 constructor (
554557 private debugService : IDebugService ,
555558 private contextViewService : IContextViewService ,
556- private themeService : IThemeService
559+ private themeService : IThemeService ,
560+ private labelService : ILabelService
557561 ) {
558562 // noop
559563 }
@@ -619,7 +623,7 @@ class FunctionBreakpointInputRenderer implements IListRenderer<IFunctionBreakpoi
619623 renderElement ( functionBreakpoint : FunctionBreakpoint , _index : number , data : IInputTemplateData ) : void {
620624 data . breakpoint = functionBreakpoint ;
621625 data . reactedOnEvent = false ;
622- const { className, message } = getBreakpointMessageAndClassName ( this . debugService . state , this . debugService . getModel ( ) . areBreakpointsActivated ( ) , functionBreakpoint ) ;
626+ const { className, message } = getBreakpointMessageAndClassName ( this . debugService . state , this . debugService . getModel ( ) . areBreakpointsActivated ( ) , functionBreakpoint , this . labelService ) ;
623627
624628 data . icon . className = `codicon ${ className } ` ;
625629 data . icon . title = message ? message : '' ;
@@ -639,7 +643,10 @@ class FunctionBreakpointInputRenderer implements IListRenderer<IFunctionBreakpoi
639643
640644class BreakpointsAccessibilityProvider implements IListAccessibilityProvider < BreakpointItem > {
641645
642- constructor ( private readonly debugService : IDebugService ) { }
646+ constructor (
647+ private readonly debugService : IDebugService ,
648+ private readonly labelService : ILabelService
649+ ) { }
643650
644651 getWidgetAriaLabel ( ) : string {
645652 return nls . localize ( 'breakpoints' , "Breakpoints" ) ;
@@ -658,7 +665,7 @@ class BreakpointsAccessibilityProvider implements IListAccessibilityProvider<Bre
658665 return element . toString ( ) ;
659666 }
660667
661- const { message } = getBreakpointMessageAndClassName ( this . debugService . state , this . debugService . getModel ( ) . areBreakpointsActivated ( ) , element as IBreakpoint | IDataBreakpoint | IFunctionBreakpoint ) ;
668+ const { message } = getBreakpointMessageAndClassName ( this . debugService . state , this . debugService . getModel ( ) . areBreakpointsActivated ( ) , element as IBreakpoint | IDataBreakpoint | IFunctionBreakpoint , this . labelService ) ;
662669 const toString = element . toString ( ) ;
663670
664671 return message ? `${ toString } , ${ message } ` : toString ;
@@ -694,7 +701,7 @@ export function openBreakpointSource(breakpoint: IBreakpoint, sideBySide: boolea
694701 } , sideBySide ? SIDE_GROUP : ACTIVE_GROUP ) ;
695702}
696703
697- export function getBreakpointMessageAndClassName ( state : State , breakpointsActivated : boolean , breakpoint : IBreakpoint | IFunctionBreakpoint | IDataBreakpoint ) : { message ?: string , className : string } {
704+ export function getBreakpointMessageAndClassName ( state : State , breakpointsActivated : boolean , breakpoint : IBreakpoint | IFunctionBreakpoint | IDataBreakpoint , labelService ?: ILabelService ) : { message ?: string , className : string } {
698705 const debugActive = state === State . Running || state === State . Stopped ;
699706
700707 if ( ! breakpoint . enabled || ! breakpointsActivated ) {
@@ -768,7 +775,7 @@ export function getBreakpointMessageAndClassName(state: State, breakpointsActiva
768775 } ;
769776 }
770777
771- const message = ( 'message' in breakpoint && breakpoint . message ) ? breakpoint . message : breakpoint instanceof Breakpoint ? breakpoint . uri . path : nls . localize ( 'breakpoint' , "Breakpoint" ) ;
778+ const message = ( 'message' in breakpoint && breakpoint . message ) ? breakpoint . message : breakpoint instanceof Breakpoint && labelService ? labelService . getUriLabel ( breakpoint . uri ) : nls . localize ( 'breakpoint' , "Breakpoint" ) ;
772779 return {
773780 className : 'codicon-debug-breakpoint' ,
774781 message
0 commit comments