mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Cleanup Notebook actions (#23368)
* Cleanup Notebook actions * Comments
This commit is contained in:
@@ -59,8 +59,13 @@ export const noParameterCell: string = localize('noParametersCell', "This notebo
|
||||
export const noParametersInCell: string = localize('noParametersInCell', "This notebook cannot run with parameters until there are parameters added to the parameter cell. [Learn more](https://docs.microsoft.com/sql/azure-data-studio/notebooks/notebooks-parameterization).");
|
||||
export const untitledNotSupported: string = localize('untitledNotSupported', "Run with parameters is not supported for Untitled notebooks. Please save the notebook before continuing. [Learn more](https://docs.microsoft.com/sql/azure-data-studio/notebooks/notebooks-parameterization).");
|
||||
|
||||
// Action to add a cell to notebook based on cell type(code/markdown).
|
||||
export class AddCellAction extends Action {
|
||||
export class ToggleAddCellDropdownAction extends Action {
|
||||
constructor() {
|
||||
super('notebook.toggleAddCell', localize('codeCellsPreview', "Add cell"))
|
||||
}
|
||||
}
|
||||
|
||||
export abstract class AddCellAction extends Action {
|
||||
public cellType: CellType;
|
||||
|
||||
constructor(
|
||||
@@ -95,6 +100,28 @@ export class AddCellAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Action to add a new Text cell to a Notebook
|
||||
*/
|
||||
export class AddTextCellAction extends AddCellAction {
|
||||
public override cellType: CellType = 'markdown';
|
||||
|
||||
constructor(@INotebookService notebookService: INotebookService) {
|
||||
super('notebook.AddTextCell', localize('textPreview', "Text cell"), 'masked-pseudo markdown', notebookService);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Action to add a new Code cell to a Notebook
|
||||
*/
|
||||
export class AddCodeCellAction extends AddCellAction {
|
||||
public override cellType: CellType = 'code';
|
||||
|
||||
constructor(@INotebookService notebookService: INotebookService) {
|
||||
super('notebook.AddCodeCell', localize('codePreview', "Code cell"), 'masked-pseudo code', notebookService);
|
||||
}
|
||||
}
|
||||
|
||||
export interface ITooltipState {
|
||||
label: string;
|
||||
baseClass: string;
|
||||
|
||||
Reference in New Issue
Block a user