* Return all variables referenced by this block. * * @returns List of variable models.
()
| 1163 | * @returns List of variable models. |
| 1164 | */ |
| 1165 | getVarModels(): IVariableModel<IVariableState>[] { |
| 1166 | const vars = []; |
| 1167 | for (const field of this.getFields()) { |
| 1168 | if (field.referencesVariables()) { |
| 1169 | const model = this.workspace |
| 1170 | .getVariableMap() |
| 1171 | .getVariableById(field.getValue() as string); |
| 1172 | // Check if the variable actually exists (and isn't just a potential |
| 1173 | // variable). |
| 1174 | if (model) { |
| 1175 | vars.push(model); |
| 1176 | } |
| 1177 | } |
| 1178 | } |
| 1179 | return vars; |
| 1180 | } |
| 1181 | |
| 1182 | /** |
| 1183 | * Notification that a variable is renaming but keeping the same ID. If the |
no test coverage detected