|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information.
|
4 | 4 | *--------------------------------------------------------------------------------------------*/
|
5 | 5 |
|
6 |
| -import * as glob from 'vs/base/common/glob'; |
7 |
| -import { localize } from 'vs/nls'; |
8 | 6 | import { getPixelRatio, getZoomLevel } from 'vs/base/browser/browser';
|
9 | 7 | import { Emitter, Event } from 'vs/base/common/event';
|
| 8 | +import * as glob from 'vs/base/common/glob'; |
10 | 9 | import { Iterable } from 'vs/base/common/iterator';
|
| 10 | +import { Lazy } from 'vs/base/common/lazy'; |
11 | 11 | import { Disposable, DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
12 | 12 | import { ResourceMap } from 'vs/base/common/map';
|
| 13 | +import { Schemas } from 'vs/base/common/network'; |
13 | 14 | import { URI } from 'vs/base/common/uri';
|
14 | 15 | import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
15 | 16 | import { IEditorOptions } from 'vs/editor/common/config/editorOptions';
|
16 | 17 | import { BareFontInfo } from 'vs/editor/common/config/fontInfo';
|
| 18 | +import { localize } from 'vs/nls'; |
17 | 19 | import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
18 | 20 | import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
| 21 | +import { IResourceEditorInput } from 'vs/platform/editor/common/editor'; |
| 22 | +import { IFileService } from 'vs/platform/files/common/files'; |
19 | 23 | import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
| 24 | +import { Registry } from 'vs/platform/registry/common/platform'; |
20 | 25 | import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
|
21 | 26 | import { NotebookExtensionDescription } from 'vs/workbench/api/common/extHost.protocol';
|
| 27 | +import { EditorExtensions, IEditorInput } from 'vs/workbench/common/editor'; |
| 28 | +import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; |
22 | 29 | import { Memento } from 'vs/workbench/common/memento';
|
23 | 30 | import { INotebookEditorContribution, notebookMarkupRendererExtensionPoint, notebookProviderExtensionPoint, notebookRendererExtensionPoint } from 'vs/workbench/contrib/notebook/browser/extensionPoint';
|
24 | 31 | import { NotebookEditorOptions, updateEditorTopPadding } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
|
| 32 | +import { NotebookDiffEditorInput } from 'vs/workbench/contrib/notebook/browser/notebookDiffEditorInput'; |
25 | 33 | import { NotebookCellTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookCellTextModel';
|
26 | 34 | import { NotebookTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookTextModel';
|
27 |
| -import { ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER, BUILTIN_RENDERER_ID, CellUri, DisplayOrderKey, INotebookExclusiveDocumentFilter, INotebookMarkupRendererInfo, INotebookRendererInfo, INotebookTextModel, IOrderedMimeType, IOutputDto, mimeTypeIsAlwaysSecure, mimeTypeSupportedByCore, NotebookDataDto, NotebookEditorPriority, NotebookRendererMatch, NotebookTextDiffEditorPreview, RENDERER_NOT_AVAILABLE, sortMimeTypes, TransientOptions } from 'vs/workbench/contrib/notebook/common/notebookCommon'; |
| 35 | +import { ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER, BUILTIN_RENDERER_ID, CellUri, DisplayOrderKey, INotebookExclusiveDocumentFilter, INotebookMarkupRendererInfo, INotebookRendererInfo, INotebookTextModel, IOrderedMimeType, IOutputDto, mimeTypeSupportedByCore, NotebookDataDto, NotebookEditorPriority, NotebookRendererMatch, NotebookTextDiffEditorPreview, RENDERER_NOT_AVAILABLE, sortMimeTypes, TransientOptions } from 'vs/workbench/contrib/notebook/common/notebookCommon'; |
| 36 | +import { NotebookEditorInput } from 'vs/workbench/contrib/notebook/common/notebookEditorInput'; |
28 | 37 | import { NotebookMarkupRendererInfo as NotebookMarkupRendererInfo } from 'vs/workbench/contrib/notebook/common/notebookMarkdownRenderer';
|
29 | 38 | import { NotebookOutputRendererInfo } from 'vs/workbench/contrib/notebook/common/notebookOutputRenderer';
|
30 | 39 | import { NotebookEditorDescriptor, NotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookProvider';
|
31 | 40 | import { ComplexNotebookProviderInfo, INotebookContentProvider, INotebookSerializer, INotebookService, SimpleNotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookService';
|
| 41 | +import { ContributedEditorPriority, DiffEditorInputFactoryFunction, EditorInputFactoryFunction, IEditorAssociationsRegistry, IEditorOverrideService, IEditorType, IEditorTypesHandler } from 'vs/workbench/services/editor/common/editorOverrideService'; |
32 | 42 | import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
33 | 43 | import { IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry';
|
34 |
| -import { Registry } from 'vs/platform/registry/common/platform'; |
35 |
| -import { Schemas } from 'vs/base/common/network'; |
36 |
| -import { Lazy } from 'vs/base/common/lazy'; |
37 |
| -import { IResourceEditorInput } from 'vs/platform/editor/common/editor'; |
38 |
| -import { NotebookDiffEditorInput } from 'vs/workbench/contrib/notebook/browser/notebookDiffEditorInput'; |
39 |
| -import { NotebookEditorInput } from 'vs/workbench/contrib/notebook/common/notebookEditorInput'; |
40 |
| -import { ContributedEditorPriority, DiffEditorInputFactoryFunction, EditorInputFactoryFunction, IEditorAssociationsRegistry, IEditorOverrideService, IEditorType, IEditorTypesHandler } from 'vs/workbench/services/editor/common/editorOverrideService'; |
41 |
| -import { EditorExtensions, IEditorInput } from 'vs/workbench/common/editor'; |
42 |
| -import { IFileService } from 'vs/platform/files/common/files'; |
43 |
| -import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; |
44 | 44 |
|
45 | 45 | export class NotebookProviderInfoStore extends Disposable {
|
46 | 46 |
|
@@ -599,36 +599,36 @@ export class NotebookService extends Disposable implements INotebookService, IEd
|
599 | 599 | orderMimeTypes.push({
|
600 | 600 | mimeType: mimeType,
|
601 | 601 | rendererId: handler.id,
|
602 |
| - isTrusted: textModel.metadata.trusted |
| 602 | + isTrusted: true |
603 | 603 | });
|
604 | 604 |
|
605 | 605 | for (let i = 1; i < handlers.length; i++) {
|
606 | 606 | orderMimeTypes.push({
|
607 | 607 | mimeType: mimeType,
|
608 | 608 | rendererId: handlers[i].id,
|
609 |
| - isTrusted: textModel.metadata.trusted |
| 609 | + isTrusted: true |
610 | 610 | });
|
611 | 611 | }
|
612 | 612 |
|
613 | 613 | if (mimeTypeSupportedByCore(mimeType)) {
|
614 | 614 | orderMimeTypes.push({
|
615 | 615 | mimeType: mimeType,
|
616 | 616 | rendererId: BUILTIN_RENDERER_ID,
|
617 |
| - isTrusted: mimeTypeIsAlwaysSecure(mimeType) || textModel.metadata.trusted |
| 617 | + isTrusted: true // TODO@roblourens mimeTypeIsAlwaysSecure(mimeType) || this.workspaceTrustManagementService.isWorkpaceTrusted() |
618 | 618 | });
|
619 | 619 | }
|
620 | 620 | } else {
|
621 | 621 | if (mimeTypeSupportedByCore(mimeType)) {
|
622 | 622 | orderMimeTypes.push({
|
623 | 623 | mimeType: mimeType,
|
624 | 624 | rendererId: BUILTIN_RENDERER_ID,
|
625 |
| - isTrusted: mimeTypeIsAlwaysSecure(mimeType) || textModel.metadata.trusted |
| 625 | + isTrusted: true // TODO@roblourens mimeTypeIsAlwaysSecure(mimeType) || this.workspaceTrustManagementService.isWorkpaceTrusted() |
626 | 626 | });
|
627 | 627 | } else {
|
628 | 628 | orderMimeTypes.push({
|
629 | 629 | mimeType: mimeType,
|
630 | 630 | rendererId: RENDERER_NOT_AVAILABLE,
|
631 |
| - isTrusted: textModel.metadata.trusted |
| 631 | + isTrusted: true |
632 | 632 | });
|
633 | 633 | }
|
634 | 634 | }
|
|
0 commit comments