mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
Open in New Window on a project file's tab now opens an editor-only window (editor-<parent>-n) instead of a second project workbench. It shares the parent's documents and language servers; unsaved text, caret and selection move with the tab, and the source tab is removed only after the new window reports ready. Files outside the project keep opening a full window. Review changes: closing the window settles only its own unsaved files (the project window's guard also asked to terminate running processes); Escape no longer closes it; error messages go through the text catalog; the window has its own stylesheet. Closes #4117 Co-authored-by: GGVidal <52431033+GGVidal@users.noreply.github.com>
25 lines
985 B
TypeScript
25 lines
985 B
TypeScript
import type { ComponentType } from "react";
|
|
import { activate as editor } from "./editor/core";
|
|
import { activateEditorWindow, EditorWindow } from "./editor/core/EditorWindow";
|
|
import { installLocaleSync } from "./features/app/locale";
|
|
import { installMenuBridge } from "./features/app/menuBridge";
|
|
import { trackRuntimeSettings } from "./features/settings/runtime";
|
|
import { installKeyboardDispatcher } from "./platform/keymap";
|
|
import { activateList } from "./windowBoot";
|
|
|
|
/**
|
|
* Lightweight editor window of project window `parent`: one file, sharing the
|
|
* parent's documents and language servers, with no workbench chrome.
|
|
*/
|
|
export function bootEditorWindow(parent: string): ComponentType {
|
|
activateList("editor window", [
|
|
["locale", installLocaleSync],
|
|
["settings", trackRuntimeSettings],
|
|
["menu", installMenuBridge],
|
|
["editor", editor],
|
|
["editorWindow", () => activateEditorWindow(parent)],
|
|
]);
|
|
installKeyboardDispatcher();
|
|
return EditorWindow;
|
|
}
|