Beispiel #1
0
 public void SaveLocalRulesToModel()
 {
     if (_model == null)
     {
         return;
     }
     _model.RemoveAnnotation("BestPractizeAnalyzer"); // Stupid typo in earlier version
     _model.SetAnnotation("BestPracticeAnalyzer", LocalRules.SerializeToJson(), false);
 }
Beispiel #2
0
        public void SaveLocalRulesToModel()
        {
            if (_model == null)
            {
                return;
            }
            _model.RemoveAnnotation("BestPractizeAnalyzer"); // Stupid typo in earlier version
            var previousAnnotation = _model.GetAnnotation(BPAAnnotation);
            var newAnnotation      = LocalRules.SerializeToJson();

            _model.SetAnnotation(BPAAnnotation, newAnnotation, false);
            if (previousAnnotation != newAnnotation)
            {
                UI.UIController.Current.Handler.UndoManager.FlagChange();
            }
        }