public override void ExitSinglemodel([NotNull] SinglemodelContext context)
        {
            var fullpath = path.GetPath();

            path.Pop();
            logger.Trace("Exit singlemodel {0}", fullpath);

            var obj = ObjProps.Get(context.obj());

            var model = new Models.SingleModel(context.ID().GetText(), obj);

            var orderby = ObjOrderByProps.Get(context.obj());

            model.Path = fullpath;
            model.OrderBy.AddRange(orderby);

            //model.Section = CurrentSection;
            if (context.inherits() != null)
            {
                model.Inherits     = true;
                model.InheritsFrom = context.inherits().ID().GetText();
            }
            string obs = "";

            logger.Trace("Single model = {0}{1}{2}",
                         model.Name,
                         context.inherits() != null ? " : " + model.InheritsFrom : "",
                         orderby.Any() ? " / " + orderby.Aggregate(obs, (f, run) => obs += run + ", ") : "");

            GraphElements.Add(model.Path, new GraphElement(model.Path, model));
            SingleModels.Put(context, model);
            base.ExitSinglemodel(context);
        }
 public override void EnterSinglemodel([NotNull] SinglemodelContext context)
 {
     base.EnterSinglemodel(context);
     path.Push(context.ID().GetText());
 }