From a8fd50ef5192bd9e61246296c49dd1eabd6830a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Sun, 15 Mar 2026 21:14:12 +0200 Subject: [PATCH] model.rule.RulesRuntimeModule: switch {Rules => Script}ImplicitlyImportedTypes (#5397) --- .../core/model/rule/RulesRuntimeModule.xtend | 4 +-- .../scoping/RulesImplicitlyImportedTypes.java | 31 ------------------- 2 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/scoping/RulesImplicitlyImportedTypes.java diff --git a/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/RulesRuntimeModule.xtend b/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/RulesRuntimeModule.xtend index ae9441751..6a93f2827 100644 --- a/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/RulesRuntimeModule.xtend +++ b/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/RulesRuntimeModule.xtend @@ -18,11 +18,11 @@ org.openhab.core.model.rule import com.google.inject.Binder import com.google.inject.name.Names -import org.openhab.core.model.rule.scoping.RulesImplicitlyImportedTypes import org.openhab.core.model.rule.scoping.RulesJavaReflectAccess import org.openhab.core.model.script.interpreter.ScriptInterpreter import org.openhab.core.model.script.jvmmodel.ScriptTypeComputer import org.openhab.core.model.script.scoping.ActionClassLoader +import org.openhab.core.model.script.scoping.ScriptImplicitlyImportedTypes import org.openhab.core.model.script.scoping.ScriptImportSectionNamespaceScopeProvider import org.openhab.core.model.script.scoping.StateAndCommandProvider import org.eclipse.xtext.common.types.access.IJvmTypeProvider @@ -54,7 +54,7 @@ import org.eclipse.xtext.xbase.typesystem.computation.ITypeComputer } def Class bindImplicitlyImportedTypes() { - return RulesImplicitlyImportedTypes + return ScriptImplicitlyImportedTypes } def Class bindStateAndCommandProvider() { diff --git a/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/scoping/RulesImplicitlyImportedTypes.java b/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/scoping/RulesImplicitlyImportedTypes.java deleted file mode 100644 index 34e01a038..000000000 --- a/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/scoping/RulesImplicitlyImportedTypes.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010-2026 Contributors to the openHAB project - * - * See the NOTICE file(s) distributed with this work for additional - * information. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0 - * - * SPDX-License-Identifier: EPL-2.0 - */ -package org.openhab.core.model.rule.scoping; - -import org.openhab.core.model.script.scoping.ScriptImplicitlyImportedTypes; - -import com.google.inject.Singleton; - -/** - * This class registers all statically available functions as well as the - * extensions for specific jvm types, which should only be available in rules, - * but not in scripts - * - * @author Kai Kreuzer - Initial contribution - * @author Oliver Libutzki - Xtext 2.5.0 migration - */ - -@Singleton -public class RulesImplicitlyImportedTypes extends ScriptImplicitlyImportedTypes { - -}