예제 #1
0
        protected View InstantiateView(XView xView, Project project)
        {
            Progress?.Report($"Adding view: {xView.Name}");
            View view = xView.Instantiate(project);

            if (context.ViewNameGenerator.Exists(view.Name) || context.ViewNameGenerator.Conflicts(view.Name))
            {
                view.Name = context.ViewNameGenerator.MakeUnique(view.Name);
                Progress?.Report($"Renamed view: {view.Name}");
            }
            Metadata.InsertView(view);
            project.Views.Add(view);
            context.ViewIdMap[xView.ViewId] = view.Id;
            return(view);
        }