add isProposedApiEnabled-util, move checkProposedApiEnabled-util, use utils instead of reading the enableProposedApi-property, https://github.com/microsoft/vscode/issues/129037

This commit is contained in:
Johannes Rieken
2021-11-09 14:13:32 +01:00
parent 9867849287
commit 799d82fcc3
16 changed files with 41 additions and 39 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { Emitter } from 'vs/base/common/event';
import { IExtensionManifest } from 'vs/platform/extensions/common/extensions';
import { IExtensionManifest, isProposedApiEnabled } from 'vs/platform/extensions/common/extensions';
import { ExtHostNotebookRenderersShape, IMainContext, MainContext, MainThreadNotebookRenderersShape } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostNotebookController } from 'vs/workbench/api/common/extHostNotebook';
import { ExtHostNotebookEditor } from 'vs/workbench/api/common/extHostNotebookEditor';
@@ -31,7 +31,7 @@ export class ExtHostNotebookRenderers implements ExtHostNotebookRenderersShape {
// In the stable API, the editor is given as an empty object, and this map
// is used to maintain references. This can be removed after editor finalization.
const notebookEditorVisible = !!manifest.enableProposedApi;
const notebookEditorVisible = isProposedApiEnabled(manifest);
const notebookEditorAliases = new WeakMap<{}, vscode.NotebookEditor>();
const messaging: vscode.NotebookRendererMessaging = {