未验证 提交 d40066d9 编写于 作者: A Andre Weinand 提交者: GitHub

Merge pull request #97849 from microsoft/aweinand/breakpointmargin

add breakpointMargin property to cell metadata
......@@ -1591,6 +1591,12 @@ declare module 'vscode' {
*/
runnable?: boolean;
/**
* Controls if the cell has a margin to support the breakpoint UI.
* This metadata is ignored for markdown cell.
*/
breakpointMargin?: boolean;
/**
* The order in which this cell was executed.
*/
......
......@@ -159,6 +159,13 @@ export class CellEditorOptions {
get value(): IEditorOptions {
return this._value;
}
setGlyphMargin(gm: boolean): void {
if (gm !== this._value.glyphMargin) {
this._value.glyphMargin = gm;
this._onDidChange.fire(this.value);
}
}
}
abstract class AbstractCellRenderer {
......@@ -989,6 +996,10 @@ export class CodeCellRenderer extends AbstractCellRenderer implements IListRende
} else {
templateData.timer.clear();
}
if (typeof metadata.breakpointMargin === 'boolean') {
this.editorOptions.setGlyphMargin(metadata.breakpointMargin);
}
}
private renderExecutionOrder(element: CodeCellViewModel, templateData: CodeCellRenderTemplate): void {
......
......@@ -79,6 +79,7 @@ export enum NotebookCellRunState {
export interface NotebookCellMetadata {
editable?: boolean;
runnable?: boolean;
breakpointMargin?: boolean;
executionOrder?: number;
statusMessage?: string;
runState?: NotebookCellRunState;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册