mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Remove notebook.enabled feature flag (#3866)
* Remove notebook.enabled feature flag * Fix build error with package.json typos
This commit is contained in:
@@ -17,11 +17,6 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"title": "%notebook.configuration.title%",
|
"title": "%notebook.configuration.title%",
|
||||||
"properties": {
|
"properties": {
|
||||||
"notebook.enabled": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": true,
|
|
||||||
"description": "%notebook.enabled.description%"
|
|
||||||
},
|
|
||||||
"notebook.pythonPath": {
|
"notebook.pythonPath": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "",
|
"default": "",
|
||||||
@@ -55,20 +50,17 @@
|
|||||||
"menus": {
|
"menus": {
|
||||||
"commandPalette": [
|
"commandPalette": [
|
||||||
{
|
{
|
||||||
"command": "notebook.command.new",
|
"command": "notebook.command.new"
|
||||||
"when": "config.notebook.enabled"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "notebook.command.open",
|
"command": "notebook.command.open"
|
||||||
"when": "config.notebook.enabled"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"keybindings": [
|
"keybindings": [
|
||||||
{
|
{
|
||||||
"command": "notebook.command.new",
|
"command": "notebook.command.new",
|
||||||
"key": "Ctrl+Shift+N",
|
"key": "Ctrl+Shift+N"
|
||||||
"when": "config.notebook.enabled"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
"displayName": "Notebook Core Extensions",
|
"displayName": "Notebook Core Extensions",
|
||||||
"description": "Defines the Data-procotol based Notebook contribution and many Notebook commands and contributions.",
|
"description": "Defines the Data-procotol based Notebook contribution and many Notebook commands and contributions.",
|
||||||
"notebook.configuration.title": "Notebook configuration",
|
"notebook.configuration.title": "Notebook configuration",
|
||||||
"notebook.enabled.description": "Enable viewing notebook files using built-in notebook editor.",
|
|
||||||
"notebook.pythonPath.description": "Local path to python installation used by Notebooks.",
|
"notebook.pythonPath.description": "Local path to python installation used by Notebooks.",
|
||||||
"notebook.sqlKernelEnabled.description": "Enable SQL kernel in notebook editor (Preview)",
|
"notebook.sqlKernelEnabled.description": "Enable SQL kernel in notebook editor (Preview)",
|
||||||
"notebook.command.new": "New Notebook",
|
"notebook.command.new": "New Notebook",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { QueryResultsInput } from 'sql/parts/query/common/queryResultsInput';
|
|||||||
import { QueryInput } from 'sql/parts/query/common/queryInput';
|
import { QueryInput } from 'sql/parts/query/common/queryInput';
|
||||||
import { IQueryEditorOptions } from 'sql/parts/query/common/queryEditorService';
|
import { IQueryEditorOptions } from 'sql/parts/query/common/queryEditorService';
|
||||||
import { QueryPlanInput } from 'sql/parts/queryPlan/queryPlanInput';
|
import { QueryPlanInput } from 'sql/parts/queryPlan/queryPlanInput';
|
||||||
import { NotebookInput, NotebookInputModel, NotebookInputValidator } from 'sql/parts/notebook/notebookInput';
|
import { NotebookInput, NotebookInputModel } from 'sql/parts/notebook/notebookInput';
|
||||||
import { DEFAULT_NOTEBOOK_PROVIDER, INotebookService } from 'sql/workbench/services/notebook/common/notebookService';
|
import { DEFAULT_NOTEBOOK_PROVIDER, INotebookService } from 'sql/workbench/services/notebook/common/notebookService';
|
||||||
import { getProvidersForFileName, getStandardKernelsForProvider } from 'sql/parts/notebook/notebookUtils';
|
import { getProvidersForFileName, getStandardKernelsForProvider } from 'sql/parts/notebook/notebookUtils';
|
||||||
import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput';
|
import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput';
|
||||||
@@ -56,9 +56,8 @@ export function convertEditorInput(input: EditorInput, options: IQueryEditorOpti
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Notebook
|
//Notebook
|
||||||
let notebookValidator = instantiationService.createInstance(NotebookInputValidator);
|
|
||||||
uri = getNotebookEditorUri(input, instantiationService);
|
uri = getNotebookEditorUri(input, instantiationService);
|
||||||
if (uri && notebookValidator.isNotebookEnabled()) {
|
if (uri) {
|
||||||
return withService<INotebookService, NotebookInput>(instantiationService, INotebookService, notebookService => {
|
return withService<INotebookService, NotebookInput>(instantiationService, INotebookService, notebookService => {
|
||||||
let fileName: string = 'untitled';
|
let fileName: string = 'untitled';
|
||||||
let providerIds: string[] = [DEFAULT_NOTEBOOK_PROVIDER];
|
let providerIds: string[] = [DEFAULT_NOTEBOOK_PROVIDER];
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { IEditorModel } from 'vs/platform/editor/common/editor';
|
|||||||
import { EditorInput, EditorModel, ConfirmResult } from 'vs/workbench/common/editor';
|
import { EditorInput, EditorModel, ConfirmResult } from 'vs/workbench/common/editor';
|
||||||
import { Emitter, Event } from 'vs/base/common/event';
|
import { Emitter, Event } from 'vs/base/common/event';
|
||||||
import URI from 'vs/base/common/uri';
|
import URI from 'vs/base/common/uri';
|
||||||
import { IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
|
||||||
import * as resources from 'vs/base/common/resources';
|
import * as resources from 'vs/base/common/resources';
|
||||||
import * as sqlops from 'sqlops';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
@@ -22,8 +21,6 @@ import Severity from 'vs/base/common/severity';
|
|||||||
|
|
||||||
export type ModeViewSaveHandler = (handle: number) => Thenable<boolean>;
|
export type ModeViewSaveHandler = (handle: number) => Thenable<boolean>;
|
||||||
|
|
||||||
export let notebooksEnabledCondition = ContextKeyExpr.equals('config.notebook.enabled', true);
|
|
||||||
|
|
||||||
|
|
||||||
export class NotebookInputModel extends EditorModel {
|
export class NotebookInputModel extends EditorModel {
|
||||||
private dirty: boolean;
|
private dirty: boolean;
|
||||||
@@ -105,14 +102,6 @@ export class NotebookInputModel extends EditorModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NotebookInputValidator {
|
|
||||||
|
|
||||||
constructor( @IContextKeyService private readonly _contextKeyService: IContextKeyService) { }
|
|
||||||
|
|
||||||
public isNotebookEnabled(): boolean {
|
|
||||||
return this._contextKeyService.contextMatchesRules(notebooksEnabledCondition);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class NotebookInput extends EditorInput {
|
export class NotebookInput extends EditorInput {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user