@Override
        public String @NotNull [] getVariablesInScope(XPathElement element) {
            final HistoryElement selectedItem = myModel.getSelectedItem();
            if (selectedItem != null) {
                return Variable.asSet(selectedItem.variables).toArray(new String[selectedItem.variables.size()]);
            } else {
                return ArrayUtilRt.EMPTY_STRING_ARRAY;
            }
        }
@Override
        public String @NotNull [] getVariablesInScope(XPathElement element)