/// <summary> /// Allows to refresh the view, when the value of a model changed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns>True if the view should be refreshed</returns> public override bool HandleValueChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = base.HandleValueChange(modelElement, changeKind); if (retVal) { testBrowserTreeView.RefreshModel(modelElement); Refresh(); } if (testDescriptionTimeLineControl.ShouldDisplayModelElement(modelElement)) { testDescriptionTimeLineControl.Refresh(); } if (testExecutionTimeLineControl.ShouldDisplayModelElement(modelElement)) { testExecutionTimeLineControl.Refresh(); } if (changeKind == Context.ChangeKind.EndOfCycle) { tabControl1.SelectedTab = testExecutionTabPage; } return(retVal); }
/// <summary> /// Allows to refresh the view, when the value of a model changed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns>True if the view should be refreshed</returns> public override bool HandleValueChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = base.HandleValueChange(modelElement, changeKind); if (retVal) { if (Variable != null) { Expression expression = new Parser().Expression( EnclosingFinder <Dictionary> .find(Variable), Variable.FullName); IVariable variable = expression.GetVariable(new InterpretationContext()); if (variable != Variable) { SetVariable(variable); } else { structureTreeListView.RefreshObject(Variable); structureTreeListView.Refresh(); } } } return(retVal); }
/// <summary> /// Allows to refresh the view, when the value of a model changed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns>True if the view should be refreshed</returns> public override bool HandleValueChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = base.HandleValueChange(modelElement, changeKind); if (retVal) { if (changeKind != Context.ChangeKind.EndOfCycle) { modelDiagramPanel.RefreshControl(); if (stateDiagramPanel != null) { stateDiagramPanel.RefreshControl(); } Dictionary enclosing = EnclosingFinder <Dictionary> .find(modelElement, true); if (modelElement == null || enclosing == Dictionary) { dataDictTree.RefreshModel(modelElement); } } } return(retVal); }
/// <summary> /// The delegate used to handle the change of the value of a model element /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind">Indicates the reason why the change occured</param> protected virtual void Context_ValueChange(IModelElement modelElement, Context.ChangeKind changeKind) { try { Invoke((MethodInvoker)(() => HandleValueChange(modelElement, changeKind))); } catch (Exception) { } }
/// <summary> /// Allows to refresh the view, when the value of a model changed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns>True if the view should be refreshed</returns> public override bool HandleValueChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = base.HandleValueChange(modelElement, changeKind); if (retVal) { shortcutTreeView.RefreshModel(modelElement); } return(retVal); }
/// <summary> /// Allows to refresh the view, when the value of a model changed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns>True if the view should be refreshed</returns> public override bool HandleValueChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = base.HandleValueChange(modelElement, changeKind); if (retVal) { Refresh(); } return(retVal); }
/// <summary> /// Allows to refresh the view, when the value of a model changed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns>True if the view should be refreshed</returns> public override bool HandleValueChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = base.HandleValueChange(modelElement, changeKind); if (retVal) { TreeView.RefreshModel(modelElement); staticTimeLineControl.Translation = Translation; staticTimeLineControl.Refresh(); } return(retVal); }
/// <summary> /// Indicates that a change event should be displayed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns></returns> protected virtual bool ShouldDisplayChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = true; // When end of cycle, only redisplay when the displayed element related to a variable if (changeKind == Context.ChangeKind.EndOfCycle) { IVariable variable = EnclosingFinder <IVariable> .find(DisplayedModel, true); retVal = (variable != null); } return(retVal); }
/// <summary> /// Allows to refresh the view, when the value of a model changed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns>True if the view should be refreshed</returns> public override bool HandleValueChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = base.HandleValueChange(modelElement, changeKind); if (retVal) { usageTreeView.Root = DisplayedModel; if (usageTreeView.Nodes.Count > 0) { usageTreeView.Nodes[0].EnsureVisible(); } } return(retVal); }
/// <summary> /// Indicates that a change event should be displayed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns></returns> protected override bool ShouldDisplayChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = modelElement == null; if (!retVal) { if (changeKind != Context.ChangeKind.EndOfCycle) { Dictionary enclosing = EnclosingFinder <Dictionary> .find(modelElement, true); retVal = (enclosing == Dictionary); } else { retVal = base.ShouldDisplayChange(modelElement, changeKind); } } return(retVal); }
/// <summary> /// Allows to refresh the view, when the value of a model changed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns>True if the view should be refreshed</returns> public override bool HandleValueChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = base.HandleValueChange(modelElement, changeKind); if (retVal) { if (modelElement == null) { BoxArrowContainerPanel.RefreshControl(); } else { TEnclosing enclosing = EnclosingFinder <TEnclosing> .find(modelElement, true); while (enclosing != null) { if (enclosing == Model) { BoxArrowContainerPanel.RefreshControl(); enclosing = null; } else { enclosing = EnclosingFinder <TEnclosing> .find(enclosing as IEnclosed, false); } } } } if (changeKind == Context.ChangeKind.EndOfCycle) { BoxArrowContainerPanel.Refresh(); } return(retVal); }
/// <summary> /// Indicates that a change event should be displayed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns></returns> protected override bool ShouldDisplayChange(IModelElement modelElement, Context.ChangeKind changeKind) { return(modelElement == null || EnclosingFinder <TranslationDictionary> .find(modelElement, true) == TranslationDictionary); }
/// <summary> /// Allows to refresh the view, when the value of a model changed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns>True if the view should be refreshed</returns> public virtual bool HandleValueChange(IModelElement modelElement, Context.ChangeKind changeKind) { return(ShouldDisplayChange(modelElement, changeKind)); }
/// <summary> /// Indicates that a change event should be displayed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns></returns> protected override bool ShouldDisplayChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = modelElement == null || DisplayedModel == null || DisplayedModel.IsParent(modelElement); return(retVal); }
/// <summary> /// Indicates that a change event should be displayed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns></returns> protected override bool ShouldDisplayChange(IModelElement modelElement, Context.ChangeKind changeKind) { // All changes in the model should be tracked return(changeKind != Context.ChangeKind.EndOfCycle && DisplayedModel == modelElement || modelElement == null); }
/// <summary> /// Indicates that a change event should be displayed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns></returns> protected override bool ShouldDisplayChange(IModelElement modelElement, Context.ChangeKind changeKind) { return(changeKind == Context.ChangeKind.EndOfCycle); }
/// <summary> /// Indicates that a change event should be displayed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns></returns> protected override bool ShouldDisplayChange(IModelElement modelElement, Context.ChangeKind changeKind) { // There is no smart way to determine whether the change should be taken into account or not return(true); }
/// <summary> /// Indicates that a change event should be displayed /// </summary> /// <param name="modelElement"></param> /// <param name="changeKind"></param> /// <returns></returns> protected override bool ShouldDisplayChange(IModelElement modelElement, Context.ChangeKind changeKind) { bool retVal = modelElement == null || changeKind != Context.ChangeKind.EndOfCycle; return(retVal); }