mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 19:55:48 +01:00
Import SmartHomeUnits in Script Scope (#745)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
parent
77992e7df6
commit
89da305fd3
@ -22,6 +22,7 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.smarthome.core.library.unit.ImperialUnits;
|
||||
import org.eclipse.smarthome.core.library.unit.MetricPrefix;
|
||||
import org.eclipse.smarthome.core.library.unit.SIUnits;
|
||||
import org.eclipse.smarthome.core.library.unit.SmartHomeUnits;
|
||||
import org.eclipse.smarthome.core.thing.binding.ThingActions;
|
||||
import org.eclipse.smarthome.model.persistence.extensions.PersistenceExtensions;
|
||||
import org.eclipse.smarthome.model.script.actions.Audio;
|
||||
@ -48,11 +49,9 @@ import com.google.inject.Singleton;
|
||||
* extensions for specific jvm types, which should only be available in rules,
|
||||
* but not in scripts
|
||||
*
|
||||
* @author Kai Kreuzer - Initial contribution and API
|
||||
* @author Kai Kreuzer - Initial contribution
|
||||
* @author Oliver Libutzki - Xtext 2.5.0 migration
|
||||
*
|
||||
*/
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
@Singleton
|
||||
public class ScriptImplicitlyImportedTypes extends ImplicitlyImportedFeatures {
|
||||
@ -104,8 +103,9 @@ public class ScriptImplicitlyImportedTypes extends ImplicitlyImportedFeatures {
|
||||
result.add(Things.class);
|
||||
|
||||
result.add(ImperialUnits.class);
|
||||
result.add(SIUnits.class);
|
||||
result.add(MetricPrefix.class);
|
||||
result.add(SIUnits.class);
|
||||
result.add(SmartHomeUnits.class);
|
||||
|
||||
// jodatime static functions
|
||||
result.add(DateTime.class);
|
||||
|
Loading…
Reference in New Issue
Block a user