From 924da8977d6b899d4ff5ead3b8aa1b57ea560046 Mon Sep 17 00:00:00 2001 From: Timon Gygax Date: Thu, 11 Jun 2026 08:24:21 +0200 Subject: [PATCH] Add getter to systems.ts to retrieve systems without creating them 443690 --- eclipse-scout-core/src/system/systems.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eclipse-scout-core/src/system/systems.ts b/eclipse-scout-core/src/system/systems.ts index fdcf04e0687..8e080dedcb9 100644 --- a/eclipse-scout-core/src/system/systems.ts +++ b/eclipse-scout-core/src/system/systems.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2024 BSI Business Systems Integration AG + * Copyright (c) 2010, 2026 BSI Business Systems Integration AG * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -39,6 +39,14 @@ export const systems = { return system; }, + /** + * Retrieves the {@link System} with given name. + * @param name The optional name of the System. If omitted, {@link System.MAIN_SYSTEM} is used. + */ + get(name?: string): System { + return systems._systemsMap.get(name || System.MAIN_SYSTEM); + }, + /** * @param name The optional name of the system. If omitted, {@link System.MAIN_SYSTEM} is used. * @returns true if a system with given name is already registered.