Пример #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[]{""});
     }
 }
Пример #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[] { "" });
     }
 }
Пример #3
0
 private bool GroupExistsAndNotHidden(string groupName, Groups group)
 {
     return groups.Exist(groupName) && !groups.IsHidden(groupName);
 }
Пример #4
0
 private bool GroupDoesNotExist(string groupName, Groups group)
 {
     return !groups.Exist(groupName);
 }
Пример #5
0
 protected virtual void RetrieveGroupList()
 {
     this.groups = new Groups(new string[]{""});
 }
Пример #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[]{""});
            }
        }
Пример #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[]{""});
     }
 }
Пример #8
0
 protected virtual void InitializeGroups()
 {
     this.groups = new Groups(new string[]{""});
 }