@@ -8,7 +8,7 @@ import * as env from 'vs/base/common/platform';
88import * as dom from 'vs/base/browser/dom' ;
99import { URI } from 'vs/base/common/uri' ;
1010import severity from 'vs/base/common/severity' ;
11- import { IAction , Action } from 'vs/base/common/actions' ;
11+ import { IAction , Action , SubmenuAction } from 'vs/base/common/actions' ;
1212import { Range } from 'vs/editor/common/core/range' ;
1313import { ICodeEditor , IEditorMouseEvent , MouseTargetType , IContentWidget , IActiveCodeEditor , IContentWidgetPosition , ContentWidgetPositionPreference } from 'vs/editor/browser/editorBrowser' ;
1414import { IModelDecorationOptions , IModelDeltaDecoration , TrackedRangeStickiness , ITextModel , OverviewRulerLane , IModelDecorationOverviewRulerOptions } from 'vs/editor/common/model' ;
@@ -18,7 +18,6 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView
1818import { RemoveBreakpointAction } from 'vs/workbench/contrib/debug/browser/debugActions' ;
1919import { IDebugService , IBreakpoint , CONTEXT_BREAKPOINT_WIDGET_VISIBLE , BreakpointWidgetContext , IBreakpointEditorContribution , IBreakpointUpdateData , IDebugConfiguration , State , IDebugSession } from 'vs/workbench/contrib/debug/common/debug' ;
2020import { IMarginData } from 'vs/editor/browser/controller/mouseTarget' ;
21- import { ContextSubMenu } from 'vs/base/browser/contextmenu' ;
2221import { IDialogService } from 'vs/platform/dialogs/common/dialogs' ;
2322import { BreakpointWidget } from 'vs/workbench/contrib/debug/browser/breakpointWidget' ;
2423import { IDisposable , dispose } from 'vs/base/common/lifecycle' ;
@@ -288,8 +287,8 @@ export class BreakpointEditorContribution implements IBreakpointEditorContributi
288287 } ) ) ;
289288 }
290289
291- private getContextMenuActions ( breakpoints : ReadonlyArray < IBreakpoint > , uri : URI , lineNumber : number , column ?: number ) : Array < IAction | ContextSubMenu > {
292- const actions : Array < IAction | ContextSubMenu > = [ ] ;
290+ private getContextMenuActions ( breakpoints : ReadonlyArray < IBreakpoint > , uri : URI , lineNumber : number , column ?: number ) : IAction [ ] {
291+ const actions : IAction [ ] = [ ] ;
293292 if ( breakpoints . length === 1 ) {
294293 const breakpointType = breakpoints [ 0 ] . logMessage ? nls . localize ( 'logPoint' , "Logpoint" ) : nls . localize ( 'breakpoint' , "Breakpoint" ) ;
295294 actions . push ( new RemoveBreakpointAction ( RemoveBreakpointAction . ID , nls . localize ( 'removeBreakpoint' , "Remove {0}" , breakpointType ) , this . debugService ) ) ;
@@ -310,15 +309,15 @@ export class BreakpointEditorContribution implements IBreakpointEditorContributi
310309 ) ) ;
311310 } else if ( breakpoints . length > 1 ) {
312311 const sorted = breakpoints . slice ( ) . sort ( ( first , second ) => ( first . column && second . column ) ? first . column - second . column : 1 ) ;
313- actions . push ( new ContextSubMenu ( nls . localize ( 'removeBreakpoints' , "Remove Breakpoints" ) , sorted . map ( bp => new Action (
312+ actions . push ( new SubmenuAction ( nls . localize ( 'removeBreakpoints' , "Remove Breakpoints" ) , sorted . map ( bp => new Action (
314313 'removeInlineBreakpoint' ,
315314 bp . column ? nls . localize ( 'removeInlineBreakpointOnColumn' , "Remove Inline Breakpoint on Column {0}" , bp . column ) : nls . localize ( 'removeLineBreakpoint' , "Remove Line Breakpoint" ) ,
316315 undefined ,
317316 true ,
318317 ( ) => this . debugService . removeBreakpoints ( bp . getId ( ) )
319318 ) ) ) ) ;
320319
321- actions . push ( new ContextSubMenu ( nls . localize ( 'editBreakpoints' , "Edit Breakpoints" ) , sorted . map ( bp =>
320+ actions . push ( new SubmenuAction ( nls . localize ( 'editBreakpoints' , "Edit Breakpoints" ) , sorted . map ( bp =>
322321 new Action ( 'editBreakpoint' ,
323322 bp . column ? nls . localize ( 'editInlineBreakpointOnColumn' , "Edit Inline Breakpoint on Column {0}" , bp . column ) : nls . localize ( 'editLineBrekapoint' , "Edit Line Breakpoint" ) ,
324323 undefined ,
@@ -327,7 +326,7 @@ export class BreakpointEditorContribution implements IBreakpointEditorContributi
327326 )
328327 ) ) ) ;
329328
330- actions . push ( new ContextSubMenu ( nls . localize ( 'enableDisableBreakpoints' , "Enable/Disable Breakpoints" ) , sorted . map ( bp => new Action (
329+ actions . push ( new SubmenuAction ( nls . localize ( 'enableDisableBreakpoints' , "Enable/Disable Breakpoints" ) , sorted . map ( bp => new Action (
331330 bp . enabled ? 'disableColumnBreakpoint' : 'enableColumnBreakpoint' ,
332331 bp . enabled ? ( bp . column ? nls . localize ( 'disableInlineColumnBreakpoint' , "Disable Inline Breakpoint on Column {0}" , bp . column ) : nls . localize ( 'disableBreakpointOnLine' , "Disable Line Breakpoint" ) )
333332 : ( bp . column ? nls . localize ( 'enableBreakpoints' , "Enable Inline Breakpoint on Column {0}" , bp . column ) : nls . localize ( 'enableBreakpointOnLine' , "Enable Line Breakpoint" ) ) ,
@@ -548,7 +547,7 @@ class InlineBreakpointWidget implements IContentWidget, IDisposable {
548547 private readonly breakpoint : IBreakpoint | undefined ,
549548 private readonly debugService : IDebugService ,
550549 private readonly contextMenuService : IContextMenuService ,
551- private readonly getContextMenuActions : ( ) => ReadonlyArray < IAction | ContextSubMenu >
550+ private readonly getContextMenuActions : ( ) => IAction [ ]
552551 ) {
553552 this . range = this . editor . getModel ( ) . getDecorationRange ( decorationId ) ;
554553 this . toDispose . push ( this . editor . onDidChangeModelDecorations ( ( ) => {
0 commit comments