More layering (#9111)

* move handling generated files to the serilization classes

* remove unneeded methods

* add more folders to strictire compile, add more strict compile options

* update ci

* wip

* add more layering and fix issues

* add more strictness

* remove unnecessary assertion

* add missing checks

* fix indentation

* wip

* remove jsdoc

* fix layering

* fix compile

* fix compile errors

* wip

* wip

* finish layering

* fix css

* more layering

* rip

* reworking results serializer

* move some files around

* move capabilities to platform wip

* implement capabilities register provider

* fix capabilities service

* fix usage of the regist4ry

* add contribution

* remove no longer good parts

* fix issues with startup

* another try

* fix startup

* fix imports

* fix tests

* fix tests

* fix more tests

* fix tests

* fix more tests

* fix broken test

* fix tabbing

* fix naming
This commit is contained in:
Anthony Dresser
2020-02-12 18:24:08 -06:00
committed by GitHub
parent fa3eaa59f5
commit 9af1f3b0eb
72 changed files with 407 additions and 475 deletions

View File

@@ -14,7 +14,7 @@ import * as DOM from 'vs/base/browser/dom';
import { INotebookService } from 'sql/workbench/services/notebook/browser/notebookService';
import { CellActionBase, CellContext } from 'sql/workbench/contrib/notebook/browser/cellViews/codeActions';
import { CellTypes, CellType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { CellTypes, CellType } from 'sql/workbench/services/notebook/common/contracts';
import { NotebookModel } from 'sql/workbench/contrib/notebook/browser/models/notebookModel';
import { ICellModel } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';
import { ToggleMoreWidgetAction } from 'sql/workbench/contrib/dashboard/browser/core/actions';

View File

@@ -22,7 +22,7 @@ import { IModeService } from 'vs/editor/common/services/modeService';
import { IModelService } from 'vs/editor/common/services/modelService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { Event, Emitter } from 'vs/base/common/event';
import { CellTypes } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { CellTypes } from 'sql/workbench/services/notebook/common/contracts';
import { OVERRIDE_EDITOR_THEMING_SETTING } from 'sql/workbench/services/notebook/browser/notebookService';
import * as notebookUtils from 'sql/workbench/contrib/notebook/browser/models/notebookUtils';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';

View File

@@ -9,7 +9,7 @@ import { CellView } from 'sql/workbench/contrib/notebook/browser/cellViews/inter
import { ICellModel } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';
import { NotebookModel } from 'sql/workbench/contrib/notebook/browser/models/notebookModel';
import { localize } from 'vs/nls';
import { CellType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { CellType } from 'sql/workbench/services/notebook/common/contracts';
export const PLACEHOLDER_SELECTOR: string = 'placeholder-cell-component';

View File

@@ -10,7 +10,7 @@ import { URI } from 'vs/base/common/uri';
import { localize } from 'vs/nls';
import * as notebookUtils from 'sql/workbench/contrib/notebook/browser/models/notebookUtils';
import { CellTypes, CellType, NotebookChangeType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { CellTypes, CellType, NotebookChangeType } from 'sql/workbench/services/notebook/common/contracts';
import { NotebookModel } from 'sql/workbench/contrib/notebook/browser/models/notebookModel';
import { ICellModel, notebookConstants, IOutputChangedEvent, FutureInternal, CellExecutionState, ICellModelOptions } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';

View File

@@ -3,7 +3,7 @@
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/
import { IRenderMime } from './renderMimeInterfaces';
import { ReadonlyJSONObject } from '../../common/models/jsonext';
import { ReadonlyJSONObject } from '../../../../services/notebook/common/jsonext';
import { IThemeService } from 'vs/platform/theme/common/themeService';
/**

View File

@@ -11,7 +11,7 @@ import { IDisposable } from 'vs/base/common/lifecycle';
import { URI } from 'vs/base/common/uri';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { CellType, NotebookChangeType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { CellType, NotebookChangeType } from 'sql/workbench/services/notebook/common/contracts';
import { INotebookManager, ILanguageMagic } from 'sql/workbench/services/notebook/browser/notebookService';
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';

View File

@@ -21,7 +21,7 @@ import { LocalContentManager } from 'sql/workbench/services/notebook/common/loca
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
import { IDisposable } from 'vs/base/common/lifecycle';
import { NotebookChangeType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { NotebookChangeType } from 'sql/workbench/services/notebook/common/contracts';
import { Deferred } from 'sql/base/common/promise';
import { NotebookTextFileModel } from 'sql/workbench/contrib/notebook/browser/models/notebookTextFileModel';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';

View File

@@ -10,8 +10,8 @@ import { Event, Emitter } from 'vs/base/common/event';
import { Disposable } from 'vs/base/common/lifecycle';
import { IClientSession, INotebookModel, INotebookModelOptions, ICellModel, NotebookContentChange, notebookConstants } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';
import { NotebookChangeType, CellType, CellTypes } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { nbversion } from 'sql/workbench/contrib/notebook/common/models/notebookConstants';
import { NotebookChangeType, CellType, CellTypes } from 'sql/workbench/services/notebook/common/contracts';
import { nbversion } from 'sql/workbench/services/notebook/common/notebookConstants';
import * as notebookUtils from 'sql/workbench/contrib/notebook/browser/models/notebookUtils';
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
import { INotebookManager, SQL_NOTEBOOK_PROVIDER, DEFAULT_NOTEBOOK_PROVIDER } from 'sql/workbench/services/notebook/browser/notebookService';

View File

@@ -6,7 +6,7 @@
import { Range, IRange } from 'vs/editor/common/core/range';
import { FindMatch } from 'vs/editor/common/model';
import { NotebookContentChange, INotebookModel } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';
import { NotebookChangeType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { NotebookChangeType } from 'sql/workbench/services/notebook/common/contracts';
import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel';
import { repeat } from 'vs/base/common/strings';

View File

@@ -4,10 +4,10 @@
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/
import { JSONObject, isPrimitive } from '../../common/models/jsonext';
import { MimeModel } from './mimemodel';
import { nbformat } from '../../common/models/nbformat';
import { nb } from 'azdata';
import { JSONObject, isPrimitive } from 'sql/workbench/services/notebook/common/jsonext';
import { nbformat } from 'sql/workbench/services/notebook/common/nbformat';
/**
* A multiline string.

View File

@@ -3,8 +3,8 @@
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/
import { ReadonlyJSONObject } from '../../common/models/jsonext';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ReadonlyJSONObject } from 'sql/workbench/services/notebook/common/jsonext';
/**
* A namespace for rendermime associated interfaces.

View File

@@ -21,7 +21,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import * as DOM from 'vs/base/browser/dom';
import { AngularDisposable } from 'sql/base/browser/lifecycle';
import { CellTypes, CellType, NotebookChangeType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { CellTypes, CellType, NotebookChangeType } from 'sql/workbench/services/notebook/common/contracts';
import { ICellModel, IModelFactory, INotebookModel, NotebookContentChange } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
import { INotebookService, INotebookParams, INotebookManager, INotebookEditor, DEFAULT_NOTEBOOK_PROVIDER, SQL_NOTEBOOK_PROVIDER, INotebookSection, INavigationProvider, ICellEditorProvider } from 'sql/workbench/services/notebook/browser/notebookService';

View File

@@ -18,7 +18,7 @@ import { noKernel } from 'sql/workbench/services/notebook/browser/sessionManager
import { IConnectionDialogService } from 'sql/workbench/services/connection/common/connectionDialogService';
import { NotebookModel } from 'sql/workbench/contrib/notebook/browser/models/notebookModel';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { CellType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { CellType } from 'sql/workbench/services/notebook/common/contracts';
import { getErrorMessage } from 'vs/base/common/errors';
import { IEditorAction } from 'vs/editor/common/editorCommon';
import { IFindNotebookController } from 'sql/workbench/contrib/notebook/find/notebookFindWidget';

View File

@@ -11,7 +11,6 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { SaveFormat } from 'sql/workbench/contrib/grid/common/interfaces';
import { IDataResource } from 'sql/workbench/services/notebook/browser/sql/sqlSessionManager';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { getEolString, shouldIncludeHeaders, shouldRemoveNewLines } from 'sql/workbench/services/query/common/queryRunner';
@@ -30,7 +29,7 @@ import { GridTableBase } from 'sql/workbench/contrib/query/browser/gridPanel';
import { getErrorMessage } from 'vs/base/common/errors';
import { ISerializationService, SerializeDataParams } from 'sql/platform/serialization/common/serializationService';
import { SaveResultAction } from 'sql/workbench/contrib/query/browser/actions';
import { ResultSerializer, SaveResultsResponse } from 'sql/workbench/contrib/query/common/resultSerializer';
import { ResultSerializer, SaveResultsResponse, SaveFormat } from 'sql/workbench/services/query/common/resultSerializer';
import { ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar';
import { values } from 'vs/base/common/collections';
import { assign } from 'vs/base/common/objects';

View File

@@ -5,7 +5,7 @@
import { Type } from '@angular/core';
import * as platform from 'vs/platform/registry/common/platform';
import { ReadonlyJSONObject } from 'sql/workbench/contrib/notebook/common/models/jsonext';
import { ReadonlyJSONObject } from 'sql/workbench/services/notebook/common/jsonext';
import { MimeModel } from 'sql/workbench/contrib/notebook/browser/models/mimemodel';
import * as types from 'vs/base/common/types';
import { ICellModel } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';

View File

@@ -3,10 +3,11 @@
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/
import { IRenderMime } from '../models/renderMimeInterfaces';
import { MimeModel } from '../models/mimemodel';
import { ReadonlyJSONObject } from '../../common/models/jsonext';
import { defaultSanitizer } from './sanitizer';
import type { IRenderMime } from 'sql/workbench/contrib/notebook/browser/models/renderMimeInterfaces';
import type { ReadonlyJSONObject } from 'sql/workbench/services/notebook/common/jsonext';
import { MimeModel } from 'sql/workbench/contrib/notebook/browser/models/mimemodel';
/**
* An object which manages mime renderer factories.

View File

@@ -4,10 +4,10 @@
*--------------------------------------------------------------------------------------------*/
import * as renderers from './renderers';
import { IRenderMime } from '../models/renderMimeInterfaces';
import { ReadonlyJSONObject } from '../../common/models/jsonext';
import * as tableRenderers from 'sql/workbench/contrib/notebook/browser/outputs/tableRenderers';
import { Deferred } from 'sql/base/common/promise';
import { IRenderMime } from 'sql/workbench/contrib/notebook/browser/models/renderMimeInterfaces';
import { ReadonlyJSONObject } from 'sql/workbench/services/notebook/common/jsonext';
import * as tableRenderers from 'sql/workbench/contrib/notebook/browser/outputs/tableRenderers';
/**
* A common base class for mime renderers.