* Creates a new editor window.
(
rootDirectory: string | null = null,
fileList: string[] = [],
markdownList: string[] = [],
options: Partial<BrowserWindowConstructorOptions> = {},
bufferStoreInfo: { id: string; filePath: string | null } | null = null
)
| 471 | * Creates a new editor window. |
| 472 | */ |
| 473 | private _createEditorWindow( |
| 474 | rootDirectory: string | null = null, |
| 475 | fileList: string[] = [], |
| 476 | markdownList: string[] = [], |
| 477 | options: Partial<BrowserWindowConstructorOptions> = {}, |
| 478 | bufferStoreInfo: { id: string; filePath: string | null } | null = null |
| 479 | ): EditorWindow { |
| 480 | const editor = new EditorWindow(this._accessor) |
| 481 | if (rootDirectory) { |
| 482 | this._accessor.preferences.setItems({ lastOpenedFolder: rootDirectory }) |
| 483 | } |
| 484 | editor.createWindow(rootDirectory, fileList, markdownList, options, bufferStoreInfo) |
| 485 | this._windowManager.add(editor) |
| 486 | if (this._windowManager.windowCount === 1) { |
| 487 | this._accessor.menu.setActiveWindow(editor.id) |
| 488 | } |
| 489 | return editor |
| 490 | } |
| 491 | |
| 492 | /** |
| 493 | * Create a new setting window. |
no test coverage detected