public EntityInspectorElement(Session session, NativeList <Entity> targets)
        {
            m_Session       = session;
            m_Targets       = targets;
            m_Components    = new List <IComponentDataElement>();
            m_WorldManager  = m_Session.GetManager <IWorldManagerInternal>();
            m_ChangeManager = m_Session.GetManager <IChangeManager>();

            var entityManager = m_Session.GetManager <IWorldManager>().EntityManager;

            var firstTarget = m_Targets[0];
            var container   = new EntityContainer(entityManager, firstTarget);

            var visitor = new InspectorVisitor <Entity>(m_Session, m_Targets);

            visitor.AddAdapter(new EntityContainerAdapter(visitor));
            visitor.AddAdapter(new PrimitivesAdapter <Entity>(visitor));

            visitor.Context.PushParent(this);

            StronglyTypedVisit(visitor, ref container);

            m_EntityHeader = this.Q <EntityHeaderElement>();
            m_Components   = Children().OfType <IComponentDataElement>().ToList();
            OrderComponentsFromComponentOrder();
        }
 protected InspectorAdapter(InspectorVisitor <T> visitor)
 {
     Visitor = visitor;
     Context = visitor.Context;
     Targets = visitor.Targets;
     Session = visitor.Session;
 }
 public PrimitivesAdapter(InspectorVisitor <T> visitor) : base(visitor)
 {
 }
 public EntityContainerAdapter(InspectorVisitor <Entity> visitor) : base(visitor)
 {
     CustomInspectors = Session.GetManager <CustomInspectorManager>();
     EntityManager    = Session.GetManager <IWorldManager>().EntityManager;
 }
 private static void StronglyTypedVisit <TContainer>(InspectorVisitor <Entity> visitor, ref TContainer container)
 {
     PropertyContainer.Visit(new Wrapper <TContainer>(container), visitor);
 }