model.rule.RulesRuntimeModule: switch {Rules => Script}ImplicitlyImportedTypes (#5397)

This commit is contained in:
Дилян Палаузов
2026-03-15 20:14:12 +01:00
committed by GitHub
parent eebf1173c5
commit a8fd50ef51
2 changed files with 2 additions and 33 deletions
@@ -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<? extends ImplicitlyImportedFeatures> bindImplicitlyImportedTypes() {
return RulesImplicitlyImportedTypes
return ScriptImplicitlyImportedTypes
}
def Class<StateAndCommandProvider> bindStateAndCommandProvider() {
@@ -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 {
}