Файли
openidea/src/features/templates/settingsPages.ts
T
Deng Liuтаdengliu 79accd1311 perf(settings): split Settings and auxiliary window boot out of the Workbench module (#4044)
Native auxiliary windows (settings, comparison, diff, deployment) all booted src/main.tsx, which statically imported the Workbench and every workbench feature (CodeMirror, xterm, editor extensions) even when the Settings window rendered none of them. main.tsx is now a small window-kind router with one boot module per window kind, and the settings pages, core plugin points and plugin theme runtime are registered from editor-free modules, so the Settings window loads no Workbench, @codemirror, @xterm or @/editor modules (about 57% less JS and a third less heap per Settings window). A static test keeps the Settings boot isolated.

Part of #3942

Co-authored-by: dengliu <[email protected]>
2026-11-18 18:32:14 +08:00

34 рядки
1.3 KiB
TypeScript
Неформатований Анотація Історія

Цей файл містить неоднозначні символи Юнікоду
Цей файл містить символи Юнікоду, які можна сплутати з іншими символами. Якщо ви вважаєте, що це зроблено навмисно, можете сміливо ігнорувати це попередження. Щоб показати їх, скористайтеся кнопкою Escape.
import { lazyComponent } from "@/ui";
import { registerSettingsPages } from "@/workbench/contributions";
/** Live / postfix / file template pages (also used by the Settings window). */
export function activateSettingsPages(): () => void {
return registerSettingsPages([
{
id: "editor.liveTemplates",
title: "Live Templates",
group: "Editor",
order: 28,
keywords: ["snippet", "abbreviation", "surround", "template"],
component: lazyComponent(() => import("./settings/LiveTemplatesPage").then((m) => m.LiveTemplatesPage)),
},
{
// IDEA: Editor › General › Postfix Completion.
id: "editor.general.postfixCompletion",
title: "Postfix Completion",
group: "Editor",
order: 7,
keywords: ["postfix", "template", ".if", ".var", ".for"],
component: lazyComponent(() => import("./settings/PostfixPage").then((m) => m.PostfixPage)),
},
{
id: "editor.fileTemplates",
title: "File and Code Templates",
group: "Editor",
order: 26,
keywords: ["new file", "class", "template", "package", "includes", "file header", "code", "scheme", "reformat"],
component: lazyComponent(() => import("./settings/FileTemplatesPage").then((m) => m.FileTemplatesPage)),
},
]);
}