File tree Expand file tree Collapse file tree
workbench/contrib/notebook Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1591,6 +1591,12 @@ declare module 'vscode' {
15911591 */
15921592 runnable ?: boolean ;
15931593
1594+ /**
1595+ * Controls if the cell has a margin to support the breakpoint UI.
1596+ * This metadata is ignored for markdown cell.
1597+ */
1598+ breakpointMargin ?: boolean ;
1599+
15941600 /**
15951601 * The order in which this cell was executed.
15961602 */
Original file line number Diff line number Diff line change @@ -159,6 +159,13 @@ export class CellEditorOptions {
159159 get value ( ) : IEditorOptions {
160160 return this . _value ;
161161 }
162+
163+ setGlyphMargin ( gm : boolean ) : void {
164+ if ( gm !== this . _value . glyphMargin ) {
165+ this . _value . glyphMargin = gm ;
166+ this . _onDidChange . fire ( this . value ) ;
167+ }
168+ }
162169}
163170
164171abstract class AbstractCellRenderer {
@@ -989,6 +996,10 @@ export class CodeCellRenderer extends AbstractCellRenderer implements IListRende
989996 } else {
990997 templateData . timer . clear ( ) ;
991998 }
999+
1000+ if ( typeof metadata . breakpointMargin === 'boolean' ) {
1001+ this . editorOptions . setGlyphMargin ( metadata . breakpointMargin ) ;
1002+ }
9921003 }
9931004
9941005 private renderExecutionOrder ( element : CodeCellViewModel , templateData : CodeCellRenderTemplate ) : void {
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ export enum NotebookCellRunState {
7979export interface NotebookCellMetadata {
8080 editable ?: boolean ;
8181 runnable ?: boolean ;
82+ breakpointMargin ?: boolean ;
8283 executionOrder ?: number ;
8384 statusMessage ?: string ;
8485 runState ?: NotebookCellRunState ;
You can’t perform that action at this time.
0 commit comments