Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FileEditorFactory

A widget factory for editors. The namespace for FileEditorFactory class statics.

Hierarchy

  • ABCWidgetFactory<IDocumentWidget<FileEditor>, ICodeModel>
    • FileEditorFactory

Implements

  • IWidgetFactory<IDocumentWidget<FileEditor>, ICodeModel>

Index

Constructors

constructor

Properties

Private _services

_services: IEditorServices

canStartKernel

canStartKernel: boolean

Whether the widgets can start a kernel when opened.

defaultFor

defaultFor: string[]

The file types for which the factory should be the default.

defaultRendered

defaultRendered: string[]

The file types for which the factory should be the default for rendering a document model, if different from editing.

fileTypes

fileTypes: string[]

The file types the widget can view.

isDisposed

isDisposed: boolean

Get whether the model factory has been disposed.

modelName

modelName: string

The registered name of the model type used to create the widgets.

name

name: string

The name of the widget to display in dialogs.

preferKernel

preferKernel: boolean

Whether the widgets prefer having a kernel started.

readOnly

readOnly: boolean

Whether the widget factory is read only.

shutdownOnClose

shutdownOnClose: boolean

Whether the kernel should be shutdown when the widget is closed.

widgetCreated

widgetCreated: ISignal<IWidgetFactory<IDocumentWidget<FileEditor>, ICodeModel>, IDocumentWidget<FileEditor>>

A signal emitted when a widget is created.

Methods

createNew

  • createNew(context: IContext<ICodeModel>, source?: IDocumentWidget<FileEditor>): IDocumentWidget<FileEditor>
  • Create a new widget given a document model and a context.

    Notes

    It should emit the [widgetCreated] signal with the new widget.

    Parameters

    • context: IContext<ICodeModel>
    • Optional source: IDocumentWidget<FileEditor>

    Returns IDocumentWidget<FileEditor>

Protected createNewWidget

  • createNewWidget(context: DocumentRegistry.CodeContext): IDocumentWidget<FileEditor>
  • Create a new widget given a context.

    Parameters

    • context: DocumentRegistry.CodeContext

    Returns IDocumentWidget<FileEditor>

Protected defaultToolbarFactory

  • defaultToolbarFactory(widget: IDocumentWidget<FileEditor>): IToolbarItem[]
  • Default factory for toolbar items to be added after the widget is created.

    Parameters

    Returns IToolbarItem[]

dispose

  • dispose(): void
  • Dispose of the resources held by the document manager.

    Returns void

Generated using TypeDoc