Exemplo n.º 1
0
 protected override void InitializeGroups()
 {
     GroupsAttribute groupAttribute = AttributeHelper.GetAttribute<GroupsAttribute>(entityInfo.fieldInfo.FieldType);
     if (groupAttribute != null)
     {
         groups = new Groups(groupAttribute.groups);
     }
     else
     {
         groups = new Groups(new string[]{""});
     }
 }
Exemplo n.º 2
0
 protected override void InitializeGroups()
 {
     GroupsAttribute groupsAttribute = AttributeHelper.GetAttribute<GroupsAttribute>(editorScript.GetType());
     if (groupsAttribute != null)
     {
         groups = new Groups(groupsAttribute.groups);
     }
     else
     {
         groups = new Groups(new string[] { "" });
     }
 }
Exemplo n.º 3
0
 private bool GroupExistsAndNotHidden(string groupName, Groups group)
 {
     return groups.Exist(groupName) && !groups.IsHidden(groupName);
 }
Exemplo n.º 4
0
 private bool GroupDoesNotExist(string groupName, Groups group)
 {
     return !groups.Exist(groupName);
 }
Exemplo n.º 5
0
 protected virtual void RetrieveGroupList()
 {
     this.groups = new Groups(new string[]{""});
 }
Exemplo n.º 6
0
        private void RetrieveObjectClassGroup()
        {
            IEnumerable<Type> collection = Utils.FindSubClassesOf<EasyEditorBase>();
            foreach (Type editorScript in collection)
            {
                CustomEditor customEditorAttribute = AttributeHelper.GetAttribute<CustomEditor>(editorScript);
                if (customEditorAttribute != null)
                {
                    Type inspectedType = typeof(CustomEditor).
                        GetField ("m_InspectedType", BindingFlags.NonPublic | BindingFlags.Instance).
                            GetValue (customEditorAttribute) as Type;

                    bool editorForChildClasses = (bool) typeof(CustomEditor).
                        GetField ("m_EditorForChildClasses", BindingFlags.NonPublic | BindingFlags.Instance).
                            GetValue (customEditorAttribute);

                    if (entityInfo.fieldInfo.FieldType == inspectedType
                        || (inspectedType.IsAssignableFrom(entityInfo.fieldInfo.FieldType) 
                        && editorForChildClasses))
                    {
                        GroupsAttribute groupAttribute = AttributeHelper.GetAttribute<GroupsAttribute>(editorScript);
                        if (groupAttribute != null)
                        {
                            groups = new Groups(groupAttribute.groups);
                        }
                        else
                        {
                            groups = new Groups(new string[]{""});
                        }

                        break;
                    }
                }
            }

            if(groups == null)
            {
                groups = new Groups(new string[]{""});
            }
        }
Exemplo n.º 7
0
 private void RetrieveCustomClassGroup()
 {
     GroupsAttribute groupAttribute = AttributeHelper.GetAttribute<GroupsAttribute>(entityInfo.fieldInfo.FieldType);
     if (groupAttribute != null)
     {
         groups = new Groups(groupAttribute.groups);
     }
     else
     {
         groups = new Groups(new string[]{""});
     }
 }
Exemplo n.º 8
0
 protected virtual void InitializeGroups()
 {
     this.groups = new Groups(new string[]{""});
 }