File-level val/var declarations behave unexpectedly

Thanks Ross (with apologies if that isn’t the right name!)

I’m painfully aware that the scripting language isn’t Java and that it appears to be within the confines of a class definition of sub-dialect of Xtend.

I did try fully qualifying the two-argument Procedure (it’s not a Function as it doesn’t have a return value) and didn’t get any different results.
(Note that the $ syntax has changed since Xtend 2.4.1 according to both https://www.eclipse.org/xtend/documentation/203_xtend_expressions.html#xtend-expressions-literals and the corrections done by Designer)

import org.eclipse.xtext.xbase.lib.Procedures
import org.eclipse.xtext.xbase.lib.Procedures.Procedure2

val org.eclipse.xtext.xbase.lib.Procedures.Procedure2<GroupItem, LinkedHashMap<String, Number>> dimmer_group_set_to_preset = [ GroupItem dimmer_group, LinkedHashMap<String, Number> preset_map |

The Procedure2 import is flagged by Designer as unused.

Trying to define it as a Function (and adding a return value) has the same behavior

val Functions.Function2<GroupItem, LinkedHashMap<String, Number>, void> dimmer_group_set_to_preset = [ GroupItem dimmer_group, LinkedHashMap<String, Number> preset_map |

(Designer collapses the full path to Functions)