/// <summary> /// Apply the failed expectation /// </summary> /// <param name="runner"></param> public override void Apply(Runner runner) { base.Apply(runner); Expect.State = Expect.EventState.TimeOut; Expect.Explanation = Explanation; TimeLine.ActiveExpectations.Remove(Expect); ElementLog = Expect.Expectation.AddError(Message, true); }
/// <summary> /// Redirects errors applied to this to the appropriate structure in MergedStructures /// </summary> /// <param name="message"></param> /// <param name="failedExpectation"></param> /// <returns></returns> public ElementLog AddError(string message, bool failedExpectation) { ElementLog retVal = new ElementLog(ElementLog.LevelEnum.Error, message); retVal.FailedExpectation = failedExpectation; // Get the appropriate structure to add the error AddElementLog(retVal); return retVal; }
/// <summary> /// Adds a new element log attached to this model element /// </summary> /// <param name="log"></param> public override void AddElementLog(ElementLog log) { StateMachine unifiStateMachine = UnifiedStateMachine; if (unifiStateMachine != null && unifiStateMachine != this) { unifiStateMachine.AddElementLog(log); } else { base.AddElementLog(log); } }
public override void visit(BaseModelElement obj, bool visitSubNodes) { foreach (ElementLog log in obj.Messages) { if (log.Level == ElementLog.LevelEnum.Error) { ErrorMessageFound = log; break; } } if (ErrorMessageFound == null) { base.visit(obj, visitSubNodes); } }
/// <summary> /// Adds a new element log attached to this model element /// </summary> /// <param name="log"></param> public override void AddElementLog(ElementLog log) { bool add = true; foreach (ElementLog other in base.Messages) { if (other.CompareTo(log) == 0) { add = false; } } if (add) { base.Messages.Add(log); } }
/// <summary> /// Adds a new element log attached to this model element /// </summary> /// <param name="log"></param> public override void AddElementLog(ElementLog log) { if (!BeSilent) { Parameter enclosingParameter = EnclosingFinder <Parameter> .find(this); if (enclosingParameter != null) { log.Log = "In " + FullName + ":" + log.Log; enclosingParameter.AddElementLog(log); } else { base.AddElementLog(log); EFSSystem.Context.HandleInfoMessageChangeEvent(this); } } }
public void SetMessage(ElementLog log) { MessageDetailTextBox.Text = log.Log; string caption = ""; switch (log.Level) { case ElementLog.LevelEnum.Error: caption = "Error found"; break; case ElementLog.LevelEnum.Warning: caption = "Warning found"; break; case ElementLog.LevelEnum.Info: caption = "Informative message found"; break; } Text = caption; }
public override void AddElementLog(ElementLog log) { if (Enclosing is NameSpace) { base.AddElementLog(log); } else { IEnclosed current = Enclosing as IEnclosed; while (current != null) { ModelElement element = current as ModelElement; if (element != null) { element.AddElementLog(log); current = null; } else { current = current.Enclosing as IEnclosed; } } } }
/// <summary> /// Constructor /// </summary> /// <param name="elementLog"></param> public MessageEntry(ElementLog elementLog) { Log = elementLog; }
/// <summary> /// Constructor /// </summary> /// <param name="id"></param> public ModelInterpretationFailure(ElementLog log, INamable instance, acceptor.RulePriority? priority) : base(log.Log, instance, priority) { Log = log; }
/// <summary> /// Constructor /// </summary> /// <param name="id"></param> public ModelInterpretationFailure(ElementLog log, INamable instance, acceptor.RulePriority?priority) : base(log.Log, instance, priority) { Log = log; }