/// <summary> /// Called when the model has changed or is initialized. /// </summary> public void UpdateAction(ActionEntity action, IProcessingData context) { _selectedQualifier = action.Qualifier; SetQualifierText((int)_selectedQualifier); _actionDescriptionNode.Text = action.Action; _isRelevant = !string.IsNullOrEmpty(_actionDescriptionNode.Text); AssignmentExpression expression = ActionMaster.InterpretTransitionText(action.Action, context); _actionDescriptionNode.HintTooltip = expression == null ? "???" : expression.ToString(); bool validExpression = expression != null && expression.IsValid(); Color background = validExpression ? new Color(1, 0, 0, 0f) : new Color(1, 0, 0, 0.2f); _actionDescriptionNode.AddColorOverride("background_color", background); }