Exemplo n.º 1
0
 public override void OnGUI()
 {
     EditorGUI.BeginChangeCheck();
     display = EditorGUILayout.Foldout(display, "Data: ");
     if (display)
     {
         BBGuiHelper.BeginIndent();
         {
             scheme      = EditorGUILayout.TextField("Scheme: ", scheme);
             host        = EditorGUILayout.TextField("Host: ", host);
             port        = EditorGUILayout.TextField("Port: ", port);
             path        = EditorGUILayout.TextField("Path: ", path);
             pathPattern = EditorGUILayout.TextField("PathPattern: ", pathPattern);
             pathPrefix  = EditorGUILayout.TextField("PathPrefix: ", pathPrefix);
             GUILayout.BeginHorizontal();
             {
                 mimeType = EditorGUILayout.TextField("Mime Type: ", mimeType);
                 if (EditorGUI.EndChangeCheck())
                 {
                     elementEditStatus = EditStatus.EDITED;
                 }
                 if (GUILayout.Button("Remove "))
                 {
                     elementEditStatus = EditStatus.REMOVED;
                 }
             }
             GUILayout.EndHorizontal();
         }
         BBGuiHelper.EndIndent();
     }
 }
Exemplo n.º 2
0
        public override void OnGUI()
        {
            display = EditorGUILayout.Foldout(display, "Meta-Data: " + name);
            if (!display)
            {
                return;
            }
            EditorGUI.BeginChangeCheck();
            name = EditorGUILayout.TextField("Name: ", name);
            BBGuiHelper.BeginIndent();
            {
                value = EditorGUILayout.TextField("Value: ", value);
                GUILayout.BeginHorizontal();
                {
                    isResource = EditorGUILayout.Toggle("Is Resource: ", isResource);

                    if (EditorGUI.EndChangeCheck())
                    {
                        elementEditStatus = EditStatus.EDITED;
                    }
                    if (GUILayout.Button("Remove"))
                    {
                        elementEditStatus = EditStatus.REMOVED;
                    }
                }
                GUILayout.EndHorizontal();
            }
            BBGuiHelper.EndIndent();
        }
 public override void OnGUI()
 {
     EditorGUI.BeginChangeCheck();
     path = EditorGUILayout.TextField("Path: ", path);
     BBGuiHelper.BeginIndent();
     {
         pathPattern     = EditorGUILayout.TextField("PathPattern: ", pathPattern);
         pathPrefix      = EditorGUILayout.TextField("PathPrefix: ", pathPrefix);
         permission      = EditorGUILayout.TextField("Permission: ", permission);
         readPermission  = EditorGUILayout.TextField("Read Permission: ", readPermission);
         writePermission = EditorGUILayout.TextField("Write Permission: ", writePermission);
         GUILayout.BeginHorizontal();
         {
             if (EditorGUI.EndChangeCheck())
             {
                 elementEditStatus = EditStatus.EDITED;
             }
             if (GUILayout.Button("Remove Path-Permission "))
             {
                 elementEditStatus = EditStatus.REMOVED;
             }
         }
         GUILayout.EndHorizontal();
     }
     BBGuiHelper.EndIndent();
 }
Exemplo n.º 4
0
 public override void OnGUI()
 {
     display = EditorGUILayout.Foldout(display, "Permission: " + name);
     if (!display)
     {
         return;
     }
     EditorGUI.BeginChangeCheck();
     name = EditorGUILayout.TextField("Name: ", name);
     BBGuiHelper.BeginIndent();
     {
         protectionLevel = (ProtectionLevel)EditorGUILayout.EnumPopup("Protection Level: ", protectionLevel);
         label           = EditorGUILayout.TextField("Label: ", label);
         EditorGUILayout.LabelField("Description: ");
         description = EditorGUILayout.TextArea(description);
         GUILayout.BeginHorizontal(); {
             icon = EditorGUILayout.TextField("Icon: ", icon);
             if (EditorGUI.EndChangeCheck())
             {
                 elementEditStatus = EditStatus.EDITED;
             }
             if (GUILayout.Button("Remove"))
             {
                 elementEditStatus = EditStatus.REMOVED;
             }
         }
         GUILayout.EndHorizontal();
     }
     BBGuiHelper.EndIndent();
 }
Exemplo n.º 5
0
 public override void OnGUI()
 {
     if (removed)
     {
         return;
     }
     EditorGUILayout.BeginHorizontal();
     {
         displayFramework = EditorGUILayout.Foldout(displayFramework, currentSdkFile);
         if (GUILayout.Button("Remove"))
         {
             removed = true;
         }
     }
     EditorGUILayout.EndHorizontal();
     if (displayFramework)
     {
         EditorGUI.BeginChangeCheck();
         BBGuiHelper.BeginIndent();
         {
             EditorGUILayout.BeginHorizontal();
             {
                 sdkFileFilter   = EditorGUILayout.TextField(sdkFileFilter);
                 currentSdkFiles = sdkFiles.Where(p => p.IndexOf(sdkFileFilter, System.StringComparison.CurrentCultureIgnoreCase) >= 0).ToArray();
                 frameworkIndex  = EditorGUILayout.Popup(Mathf.Max(System.Array.IndexOf(currentSdkFiles, currentSdkFile), 0), currentSdkFiles, GUILayout.Width(200));
                 try {
                     currentSdkFile = currentSdkFiles[frameworkIndex];
                 } catch (System.IndexOutOfRangeException) {
                     currentSdkFile = sdkFiles[0];
                 }
                 if (frameworkIndex >= currentSdkFiles.Length)
                 {
                     frameworkIndex = 0;
                 }
             }
             EditorGUILayout.EndHorizontal();
             required = EditorGUILayout.Toggle("Required", required);
         }
         BBGuiHelper.EndIndent();
         if (EditorGUI.EndChangeCheck())
         {
             edited = true;
             name   = currentSdkFile;
         }
     }
 }
Exemplo n.º 6
0
 public override void OnGUI()
 {
     Undo.RecordObject(this, "Application");
     display = EditorGUILayout.Foldout(display, "Application:");
     if (display)
     {
         EditorGUI.BeginChangeCheck();
         BBGuiHelper.BeginIndent();
         {
             name = EditorGUILayout.TextField("Name: ", name);
             allowTaskReparenting = EditorGUILayout.Toggle("Allow Task Reparenting: ", allowTaskReparenting);
             allowBackup          = EditorGUILayout.Toggle("Allow Backup: ", allowBackup);
             backupAgent          = EditorGUILayout.TextField("Backup Agent:", backupAgent);
             debuggable           = EditorGUILayout.Toggle("Debuggable", debuggable);
             EditorGUILayout.LabelField("Description:");
             description         = EditorGUILayout.TextArea(description);
             enabled             = EditorGUILayout.Toggle("Enabled:", enabled);
             hasCode             = EditorGUILayout.Toggle("Has Code:", hasCode);
             hardwareAccelerated = EditorGUILayout.Toggle("Hardware Accelerated", hardwareAccelerated);
             icon                  = EditorGUILayout.TextField("Icon: ", icon);
             killAfterRestore      = EditorGUILayout.Toggle("Kill After Restore:", killAfterRestore);
             largeHeap             = EditorGUILayout.Toggle("Large Heap:", largeHeap);
             label                 = EditorGUILayout.TextField("Label:", label);
             logo                  = EditorGUILayout.TextField("Logo:", logo);
             manageSpaceActivity   = EditorGUILayout.TextField("Manage Space Activity:", manageSpaceActivity);
             permission            = EditorGUILayout.TextField("Permission:", permission);
             persistent            = EditorGUILayout.Toggle("Persistent:", persistent);
             process               = EditorGUILayout.TextField("Process:", process);
             restoreAnyVersion     = EditorGUILayout.Toggle("Restore Any Version:", restoreAnyVersion);
             requiredAccountType   = EditorGUILayout.TextField("Required Account Type:", requiredAccountType);
             restrictedAccountType = EditorGUILayout.TextField("Restricted Account Type:", restrictedAccountType);
             supportsRtl           = EditorGUILayout.Toggle("Supports Rtl:", supportsRtl);
             taskAffinity          = EditorGUILayout.TextField("Task Affinity", taskAffinity);
             testOnly              = EditorGUILayout.Toggle("Test Only", testOnly);
             theme                 = EditorGUILayout.TextField("Theme", theme);
             uiOptions             = EditorGUILayout.TextField("UI Options:", uiOptions);
             vmSafeMode            = EditorGUILayout.Toggle("VM Safe Mode:", vmSafeMode);
             if (EditorGUI.EndChangeCheck())
             {
                 elementEditStatus = EditStatus.EDITED;
             }
         }
         BBGuiHelper.EndIndent();
     }
 }
 public override void OnGUI()
 {
     display = EditorGUILayout.Foldout(display, "Uses-Permission: " + name);
     if (!display)
     {
         return;
     }
     EditorGUI.BeginChangeCheck();
     GUILayout.BeginHorizontal();
     {
         GUILayout.Label("Permission: ");
         if (standardPermission)
         {
             if (Array.IndexOf(permissionArray, name) == -1)
             {
                 name = permissionArray[0];
             }
             name = permissionArray [EditorGUILayout.Popup(Array.IndexOf(permissionArray, name), permissionArray)];
         }
         else
         {
             name = EditorGUILayout.TextField(name);
         }
     }
     GUILayout.EndHorizontal();
     standardPermission = EditorGUILayout.Toggle("Standard Permission: ", standardPermission);
     BBGuiHelper.BeginIndent();
     {
         GUILayout.BeginHorizontal();
         {
             maxSDKVersion = EditorGUILayout.IntSlider("Max SDK Version: ", maxSDKVersion, minAndroidSdk, maxAndroidSdk);
             if (EditorGUI.EndChangeCheck())
             {
                 elementEditStatus = EditStatus.EDITED;
             }
             if (GUILayout.Button("Remove"))
             {
                 elementEditStatus = EditStatus.REMOVED;
             }
         }
         GUILayout.EndHorizontal();
     }
     BBGuiHelper.EndIndent();
 }
Exemplo n.º 8
0
 public virtual void OnGUI()
 {
     if (removed)
     {
         return;
     }
     if (fileNotFound)
     {
         GUI.color = Color.red;
     }
     EditorGUILayout.BeginHorizontal();
     {
         display = EditorGUILayout.Foldout(display, name);
         if (GUILayout.Button("Remove"))
         {
             removed = true;
         }
     }
     EditorGUILayout.EndHorizontal();
     if (display)
     {
         EditorGUI.BeginChangeCheck();
         BBGuiHelper.BeginIndent();
         {
             EditorGUILayout.LabelField("Path: " + absolutePath);
             _newGroup = EditorGUILayout.TextField("Group:", _newGroup);
             if (buildPhase == BuildPhase.SOURCES)
             {
                 compilerFlags = EditorGUILayout.TextField("Compiler Flags: ", compilerFlags);
             }
             if (buildPhase == BuildPhase.FRAMEWORKS)
             {
                 required = EditorGUILayout.Toggle("Required: ", required);
             }
         }
         BBGuiHelper.EndIndent();
         if (EditorGUI.EndChangeCheck())
         {
             edited = true;
         }
     }
     GUI.color = Color.white;
 }
Exemplo n.º 9
0
 public override void OnGUI()
 {
     EditorGUI.BeginChangeCheck();
     feature = featureArray[EditorGUILayout.Popup("Feature: ", Array.IndexOf(featureArray, feature), featureArray)];
     BBGuiHelper.BeginIndent();
     {
         GUILayout.BeginHorizontal(); {
             required = EditorGUILayout.Toggle("Required: ", required);
             if (EditorGUI.EndChangeCheck())
             {
                 elementEditStatus = EditStatus.EDITED;
             }
             if (GUILayout.Button("Remove"))
             {
                 elementEditStatus = EditStatus.REMOVED;
             }
         }
         GUILayout.EndHorizontal();
     }
     BBGuiHelper.EndIndent();
 }
Exemplo n.º 10
0
 public override void OnGUI()
 {
     EditorGUI.BeginChangeCheck();
     name = EditorGUILayout.TextField("Name: ", name);
     BBGuiHelper.BeginIndent();
     {
         EditorGUILayout.BeginHorizontal();
         {
             required = EditorGUILayout.Toggle("Required: ", required);
             if (EditorGUI.EndChangeCheck())
             {
                 elementEditStatus = EditStatus.EDITED;
             }
             if (GUILayout.Button("Remove Uses-Library"))
             {
                 elementEditStatus = EditStatus.REMOVED;
             }
         }
         EditorGUILayout.EndHorizontal();
     }
     BBGuiHelper.EndIndent();
 }
Exemplo n.º 11
0
 void OnGUI()
 {
     if (serializer == null)
     {
         OnEnable();
     }
     scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
     {
         serializer.OnGUI();
         EditorGUILayout.Space();
         templateName = EditorGUILayout.TextField("Template name: ", templateName);
         if (GUILayout.Button("Save as Template"))
         {
             XcodeSerializer templateSerializer = XcodeSerializer.CreateInstance(serializer.ToString(), true);
             templateSerializer.name = templateName;
             XcodeTemplateManager.SaveTemplate(templateSerializer);
         }
         EditorGUILayout.Space();
         for (int i = 0; i < templates.Count; i++)
         {
             EditorGUILayout.BeginHorizontal();
             {
                 templates[i].display = EditorGUILayout.Foldout(templates[i].display, templates[i].name);
                 if (GUILayout.Button("Import", GUILayout.Width(50)))
                 {
                     serializer.Merge(templates[i]);
                 }
                 if (GUILayout.Button("Delete", GUILayout.Width(50)))
                 {
                     XcodeTemplateManager.DeleteTemplate(templates[i--]);
                     continue;
                 }
             }
             EditorGUILayout.EndHorizontal();
             BBGuiHelper.BeginIndent();
             {
                 if (templates[i].display)
                 {
                     EditorGUILayout.BeginHorizontal();
                     {
                         EditorGUILayout.LabelField("Name: ", GUILayout.Width(75));
                         templates[i].name = EditorGUILayout.TextField(templates[i].name);
                     }
                     EditorGUILayout.EndHorizontal();
                     templates[i].OnGUI();
                 }
             }
             BBGuiHelper.EndIndent();
         }
     }
     EditorGUILayout.EndScrollView();
     //Repaint on Undo
     if (Event.current.type == EventType.ValidateCommand)
     {
         switch (Event.current.commandName)
         {
         case "UndoRedoPerformed":
             this.Repaint();
             break;
         }
     }
 }
Exemplo n.º 12
0
        public void OnGUI()
        {
            if (removed)
            {
                return;
            }
            EditorGUILayout.BeginVertical(GUI.skin.box);
            EditorGUILayout.BeginHorizontal();
            {
                display = EditorGUILayout.Foldout(display, "Plist Entry: " + (isArrayEntry ? "Array Entry " + arrayIndex : key));
                if (GUILayout.Button("Remove"))
                {
                    removed = true;
                }
            }
            EditorGUILayout.EndHorizontal();
            if (!display)
            {
                EditorGUILayout.EndVertical();
                return;
            }
            EditorGUI.BeginChangeCheck();
            BBGuiHelper.BeginIndent();
            {
                if (isArrayEntry)
                {
                    EditorGUILayout.LabelField("Key: Array Entry " + arrayIndex);
                }
                else
                {
                    key = EditorGUILayout.TextField("Key:", key);
                }
                entryType = (EntryTypes)EditorGUILayout.EnumPopup("Type:", entryType);
                if (entryType == EntryTypes.DICTIONARY || entryType == EntryTypes.ARRAY)
                {
                    if (EditorGUI.EndChangeCheck())
                    {
                        edited = true;
                    }
                    BBGuiHelper.BeginIndent();
                    for (int i = 0; i < valueEntries.Count; i++)
                    {
                        if (valueEntries[i].removed)
                        {
                            valueEntries.RemoveAt(i--);
                            continue;
                        }
                        BBGuiHelper.BeginIndent();
                        valueEntries[i].arrayIndex = (entryType == EntryTypes.ARRAY ? i : -1);
                        Undo.RecordObject(valueEntries[i], "Plist Entry");
                        valueEntries[i].OnGUI();
                        BBGuiHelper.EndIndent();
                    }
                    BBGuiHelper.EndIndent();
                    EditorGUI.BeginChangeCheck();
                }
                switch (entryType)
                {
                case EntryTypes.STRING:
                    valueString = EditorGUILayout.TextField("Value:", valueString);
                    break;

                case EntryTypes.BOOL:
                    valueBool = EditorGUILayout.Toggle("Value:", valueBool);
                    break;

                case EntryTypes.NUMBER:
                    valueNumber = EditorGUILayout.FloatField("Value:", valueNumber);
                    break;

                case EntryTypes.DATA:
                    valueData = EditorGUILayout.TextField("Value:", valueData);
                    break;

                case EntryTypes.DATE:
                    valueDate = EditorGUILayout.TextField("Value:", valueDate);
                    break;

                default:
                    BBGuiHelper.BeginIndent();
                    if (GUILayout.Button("New Plist Entry"))
                    {
                        valueEntries.Add(PlistEntry.CreateInstance());
                    }
                    BBGuiHelper.EndIndent();
                    break;
                }
            }
            BBGuiHelper.EndIndent();
            if (EditorGUI.EndChangeCheck())
            {
                edited = true;
            }
            EditorGUILayout.EndVertical();
        }
Exemplo n.º 13
0
 public override void OnGUI()
 {
     display = EditorGUILayout.Foldout(display, "Intent-Filter: " + name);
     if (!display)
     {
         return;
     }
     EditorGUI.BeginChangeCheck();
     BBGuiHelper.BeginIndent();
     {
         icon     = EditorGUILayout.TextField("Icon: ", icon);
         label    = EditorGUILayout.TextField("Label: ", label);
         priority = EditorGUILayout.IntField("Priority: ", priority);
         for (int i = 0; i < actionList.Count; i++)
         {
             Undo.RecordObject(actionList[i], "Action");
             if (actionList[i].ElementEditStatus != EditStatus.REMOVED)
             {
                 actionList[i].OnGUI();
             }
         }
         for (int i = 0; i < categoryList.Count; i++)
         {
             Undo.RecordObject(categoryList[i], "Category");
             if (categoryList[i].ElementEditStatus != EditStatus.REMOVED)
             {
                 categoryList[i].OnGUI();
             }
         }
         if (EditorGUI.EndChangeCheck())
         {
             elementEditStatus = EditStatus.EDITED;
         }
         for (int i = 0; i < dataList.Count; i++)
         {
             Undo.RecordObject(dataList[i], "Data");
             if (dataList[i].ElementEditStatus != EditStatus.REMOVED)
             {
                 dataList[i].OnGUI();
             }
             if (dataList[i].ElementEditStatus != EditStatus.NONE)
             {
                 elementEditStatus = EditStatus.EDITED;
             }
         }
         EditorGUI.BeginChangeCheck();
         GUILayout.BeginHorizontal();
         {
             if (GUILayout.Button("New Action: "))
             {
                 actionList.Add(ManifestAction.CreateInstance(node));
             }
             if (GUILayout.Button("New Category: "))
             {
                 categoryList.Add(ManifestCategory.CreateInstance(node));
             }
             if (GUILayout.Button("New Data: "))
             {
                 dataList.Add(ManifestData.CreateInstance(node));
             }
         }
         GUILayout.EndHorizontal();
         GUILayout.BeginHorizontal();
         {
             if (EditorGUI.EndChangeCheck())
             {
                 elementEditStatus = EditStatus.EDITED;
             }
             if (GUILayout.Button("Remove Intent-Filter"))
             {
                 elementEditStatus = EditStatus.REMOVED;
             }
         }
         GUILayout.EndHorizontal();
     }
     BBGuiHelper.EndIndent();
 }
Exemplo n.º 14
0
        public override void OnGUI()
        {
            bool changed = false;

            display = EditorGUILayout.Foldout(display, "Activity: " + (!display ? name : ""));
            if (display)
            {
                EditorGUI.BeginChangeCheck();
                name     = EditorGUILayout.TextField("Name: ", name);
                changed |= EditorGUI.EndChangeCheck();
                #region attributes
                displayAttributes = EditorGUILayout.Foldout(displayAttributes, "Attributes: ");
                if (displayAttributes)
                {
                    EditorGUI.BeginChangeCheck();
                    BBGuiHelper.BeginIndent();
                    {
                        allowTaskReparenting  = EditorGUILayout.Toggle("Allow Task Reparenting: ", allowTaskReparenting);
                        alwaysRetainTaskState = EditorGUILayout.Toggle("Always Retain Task State: ", alwaysRetainTaskState);
                        clearTaskOnLaunch     = EditorGUILayout.Toggle("Clear Task On Launch: ", clearTaskOnLaunch);
                        configChanges         = EditorGUILayout.MaskField("Config Changes: ", configChanges, configChangesArray);
                        enabled             = EditorGUILayout.Toggle("Enabled: ", enabled);
                        excludeFromRecents  = EditorGUILayout.Toggle("Exclude From Recents: ", excludeFromRecents);
                        exported            = EditorGUILayout.Toggle("Exported: ", exported);
                        hardwareAccelerated = EditorGUILayout.Toggle("Hardware Accelerated: ", hardwareAccelerated);
                        icon                = EditorGUILayout.TextField("Icon: ", icon);
                        label               = EditorGUILayout.TextField("Label: ", label);
                        launchMode          = launchModeArray[EditorGUILayout.Popup("Launch Mode: ", Array.IndexOf(launchModeArray, launchMode), launchModeArray)];
                        multiprocess        = EditorGUILayout.Toggle("Multiprocess: ", multiprocess);
                        noHistory           = EditorGUILayout.Toggle("No History: ", noHistory);
                        permission          = EditorGUILayout.TextField("Permission: ", permission);
                        process             = EditorGUILayout.TextField("Process: ", process);
                        screenOrientation   = screenOrientationArray[EditorGUILayout.Popup("Screen Orientation: ", Array.IndexOf(screenOrientationArray, screenOrientation), screenOrientationArray)];
                        stateNotNeeded      = EditorGUILayout.Toggle("State Not Needed", stateNotNeeded);
                        taskAffinity        = EditorGUILayout.TextField("Task Affinity: ", taskAffinity);
                        theme               = EditorGUILayout.TextField("Theme: ", theme);
                        uiOptions           = uiOptionsArray[EditorGUILayout.Popup("UI Options: ", Array.IndexOf(uiOptionsArray, uiOptions), uiOptionsArray)];
                        windowSoftInputMode = EditorGUILayout.MaskField("Window Soft Input Mode: ", windowSoftInputMode, windowSoftInputModeArray);
                    }
                    BBGuiHelper.EndIndent();
                    changed |= EditorGUI.EndChangeCheck();
                }
                #endregion
                #region intentfilter
                displayIntentFilter = EditorGUILayout.Foldout(displayIntentFilter, "Intent-Filters: (" + intentFilterList.Count + ")");
                if (displayIntentFilter)
                {
                    BBGuiHelper.BeginIndent();
                    {
                        for (int i = 0; i < intentFilterList.Count; i++)
                        {
                            Undo.RecordObject(intentFilterList[i], "Intent-Filter");
                            if (intentFilterList[i].ElementEditStatus != EditStatus.REMOVED)
                            {
                                intentFilterList[i].OnGUI();
                            }
                            if (intentFilterList[i].ElementEditStatus != EditStatus.NONE)
                            {
                                changed = true;
                            }
                        }
                    }
                    BBGuiHelper.EndIndent();
                    GUILayout.BeginHorizontal();
                    {
                        EditorGUILayout.Space();
                        if (GUILayout.Button("New Intent-Filter", BBGuiHelper.ButtonWidth()))
                        {
                            intentFilterList.Add(ManifestIntentFilter.CreateInstance(node));
                            changed = true;
                        }
                    }
                    GUILayout.EndHorizontal();
                }
                #endregion
                #region metadata
                displayMetaData = EditorGUILayout.Foldout(displayMetaData, "Meta-Data: (" + metaDataList.Count + ")");
                if (displayMetaData)
                {
                    BBGuiHelper.BeginIndent();
                    {
                        for (int i = 0; i < metaDataList.Count; i++)
                        {
                            Undo.RecordObject(metaDataList[i], "Meta-Data");
                            if (metaDataList[i].ElementEditStatus != EditStatus.REMOVED)
                            {
                                metaDataList[i].OnGUI();
                            }
                            if (metaDataList[i].ElementEditStatus != EditStatus.NONE)
                            {
                                changed = true;
                            }
                        }
                    }
                    BBGuiHelper.EndIndent();
                    GUILayout.BeginHorizontal();
                    {
                        EditorGUILayout.Space();
                        if (GUILayout.Button("New Meta-Data", BBGuiHelper.ButtonWidth()))
                        {
                            metaDataList.Add(ManifestMetaData.CreateInstance(node));
                            changed = true;
                        }
                    }
                    GUILayout.EndHorizontal();
                }
                #endregion
                GUILayout.BeginHorizontal();
                {
                    EditorGUILayout.Space();
                    if (changed)
                    {
                        elementEditStatus = EditStatus.EDITED;
                    }
                    if (GUILayout.Button("Remove Activity", BBGuiHelper.ButtonWidth()))
                    {
                        elementEditStatus = EditStatus.REMOVED;
                    }
                }
                GUILayout.EndHorizontal();
            }
        }
Exemplo n.º 15
0
        public override void OnGUI()
        {
            bool changed = false;

            display = EditorGUILayout.Foldout(display, "Receiver: " + (!display ? name : ""));
            if (display)
            {
                EditorGUI.BeginChangeCheck();
                name     = EditorGUILayout.TextField("Name: ", name);
                changed |= EditorGUI.EndChangeCheck();
                BBGuiHelper.BeginIndent();
                {
                    #region attributes
                    displayAttributes = EditorGUILayout.Foldout(displayAttributes, "Attributes: ");
                    if (displayAttributes)
                    {
                        EditorGUI.BeginChangeCheck();
                        BBGuiHelper.BeginIndent();
                        {
                            enabled    = EditorGUILayout.Toggle("Enabled: ", enabled);
                            exported   = EditorGUILayout.Toggle("Exported: ", exported);
                            icon       = EditorGUILayout.TextField("Icon: ", icon);
                            label      = EditorGUILayout.TextField("Label: ", label);
                            permission = EditorGUILayout.TextField("Permission: ", permission);
                            process    = EditorGUILayout.TextField("Process: ", process);
                        }
                        BBGuiHelper.EndIndent();
                        changed |= EditorGUI.EndChangeCheck();
                    }
                    #endregion
                    #region intentfilter
                    displayIntentFilter = EditorGUILayout.Foldout(displayIntentFilter, "Intent-Filters: (" + intentFilterList.Count + ")");
                    if (displayIntentFilter)
                    {
                        for (int i = 0; i < intentFilterList.Count; i++)
                        {
                            Undo.RecordObject(intentFilterList[i], "Intent-Filter");
                            if (intentFilterList[i].ElementEditStatus != EditStatus.REMOVED)
                            {
                                intentFilterList[i].OnGUI();
                            }
                            if (intentFilterList[i].ElementEditStatus != EditStatus.NONE)
                            {
                                changed = true;
                            }
                        }
                        BBGuiHelper.EndIndent();
                        GUILayout.BeginHorizontal();
                        {
                            EditorGUILayout.Space();
                            if (GUILayout.Button("New Intent-Filter", BBGuiHelper.ButtonWidth()))
                            {
                                intentFilterList.Add(ManifestIntentFilter.CreateInstance(node));
                                changed = true;
                            }
                        }
                        GUILayout.EndHorizontal();
                        BBGuiHelper.BeginIndent();
                    }
                    #endregion
                    #region metadata
                    displayMetaData = EditorGUILayout.Foldout(displayMetaData, "Meta-Data: (" + intentFilterList.Count + ")");
                    if (displayMetaData)
                    {
                        for (int i = 0; i < metaDataList.Count; i++)
                        {
                            Undo.RecordObject(metaDataList[i], "Meta-Data");
                            if (metaDataList[i].ElementEditStatus != EditStatus.REMOVED)
                            {
                                metaDataList[i].OnGUI();
                            }
                            if (metaDataList[i].ElementEditStatus != EditStatus.NONE)
                            {
                                changed = true;
                            }
                        }
                        BBGuiHelper.EndIndent();
                        GUILayout.BeginHorizontal();
                        {
                            EditorGUILayout.Space();
                            if (GUILayout.Button("New Meta-Data", BBGuiHelper.ButtonWidth()))
                            {
                                metaDataList.Add(ManifestMetaData.CreateInstance(node));
                                changed = true;
                            }
                        }
                        GUILayout.EndHorizontal();
                        BBGuiHelper.BeginIndent();
                    }
                    #endregion
                }
                BBGuiHelper.EndIndent();
                GUILayout.BeginHorizontal();
                {
                    EditorGUILayout.Space();
                    if (changed)
                    {
                        elementEditStatus = EditStatus.EDITED;
                    }
                    if (GUILayout.Button("Remove Receiver", BBGuiHelper.ButtonWidth()))
                    {
                        elementEditStatus = EditStatus.REMOVED;
                    }
                }
                GUILayout.EndHorizontal();
            }
        }
Exemplo n.º 16
0
        void OnGUI()
        {
            if (data == null)
            {
                OnEnable();
            }
            Undo.RecordObject(data, "Manifest Window");
            GUI.color = Color.white;
            scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
            data.OnGUI();
            EditorGUILayout.Space();
            #region UpdateButton
            EditorGUILayout.BeginHorizontal();
            {
                if (data.dirty)
                {
                    GUI.color = Color.green;
                }
                else
                {
                    GUI.color = Color.grey;
                }
                if (GUILayout.Button("Apply Changes"))
                {
                    ApplyChanges();
                }
                if (data.dirty)
                {
                    GUI.color = Color.red;
                }
                else
                {
                    GUI.color = Color.grey;
                }
                if (GUILayout.Button("Clear Changes"))
                {
                    ReloadDocument();
                }
                GUI.color = Color.white;
            }
            EditorGUILayout.EndHorizontal();
            #endregion
            EditorGUILayout.Space();

            templateName = EditorGUILayout.TextField("Template name: ", templateName);
            if (GUILayout.Button("Save as Template"))
            {
                AndroidXmlEditor  templateEditor = new AndroidXmlEditor(data.ToString());
                AndroidWindowData newTemplate    = AndroidWindowData.CreateInstance(templateEditor);
                newTemplate.name = templateName;
                AndroidTemplateManager.SaveTemplate(newTemplate);
            }
            for (int i = 0; i < templateElements.Count; i++)
            {
                EditorGUILayout.BeginHorizontal();
                {
                    templateElements[i].display = EditorGUILayout.Foldout(templateElements[i].display, templateElements[i].name + ":");
                    if (GUILayout.Button("Import", GUILayout.Width(50)))
                    {
                        data.Merge(templateElements[i]);
                        data.dirty = true;
                    }
                    if (GUILayout.Button("Delete", GUILayout.Width(50)))
                    {
                        AndroidTemplateManager.DeleteTemplate(templateElements[i--]);
                        EditorGUILayout.EndHorizontal();
                        continue;
                    }
                }
                EditorGUILayout.EndHorizontal();
                if (templateElements[i].display)
                {
                    BBGuiHelper.BeginIndent();
                    {
                        templateElements[i].OnGUI();
                        EditorGUILayout.BeginHorizontal();
                        {
                            if (templateElements[i].dirty)
                            {
                                GUI.color = Color.green;
                            }
                            else
                            {
                                GUI.color = Color.grey;
                            }
                            if (GUILayout.Button("Apply Changes"))
                            {
                                templateElements[i].ApplyChanges();
                            }
                            if (templateElements[i].dirty)
                            {
                                GUI.color = Color.red;
                            }
                            else
                            {
                                GUI.color = Color.grey;
                            }
                            if (GUILayout.Button("Clear Changes"))
                            {
                                AndroidTemplateManager.ReloadTemplate(i);
                            }
                            GUI.color = Color.white;
                        }
                        EditorGUILayout.EndHorizontal();
                    }
                    BBGuiHelper.EndIndent();
                }
            }

            EditorGUILayout.EndScrollView();
            //Repaint on Undo
            if (Event.current.type == EventType.ValidateCommand)
            {
                switch (Event.current.commandName)
                {
                case "UndoRedoPerformed":
                    this.Repaint();
                    break;
                }
            }
        }
Exemplo n.º 17
0
        public void OnGUI()
        {
            Undo.RecordObject(this, "Xcode Window");
            #region buttons
            EditorGUILayout.BeginHorizontal();
            {
                if (GUILayout.Button("Add File"))
                {
                    string import = EditorUtility.OpenFilePanel("Include in Xcode project", Application.dataPath + "/..", "");
                    if (!import.Equals(""))
                    {
                        if (pbxFilePathSet.Contains(import))
                        {
                            Debug.LogWarning("Already importing: " + import);
                        }
                        else
                        {
                            pbxFileList.Add(PBXFile.CreateInstance(import, importGroup));
                            pbxFilePathSet.Add(import);
                            dirty = true;
                        }
                    }
                    for (int i = 0; i < pbxFileList.Count; i++)
                    {
                        if (pbxFileList[i].removed)
                        {
                            pbxFileList.RemoveAt(i--);
                        }
                    }
                }
                if (GUILayout.Button("Add Folder"))
                {
                    string import = EditorUtility.OpenFolderPanel("Include folder in Xcode project", Application.dataPath + "/..", "");
                    if (!import.Equals(""))
                    {
                        dirty = true;
                        if (System.IO.Path.GetExtension(import).Equals(".framework"))
                        {
                            pbxFileList.Add(PBXFile.CreateInstance(import, importGroup));
                        }
                        else
                        {
                            string[] filePaths = System.IO.Directory.GetFiles(import);
                            foreach (string path in filePaths)
                            {
                                if (pbxFilePathSet.Contains(path))
                                {
                                    Debug.LogWarning("Already importing: " + path);
                                }
                                else
                                {
                                    pbxFileList.Add(PBXFile.CreateInstance(path, importGroup));
                                    pbxFilePathSet.Add(path);
                                }
                            }
                            filePaths = System.IO.Directory.GetDirectories(import, "*.*");
                            foreach (string path in filePaths)
                            {
                                if (pbxFilePathSet.Contains(path))
                                {
                                    Debug.LogWarning("Already importing: " + path);
                                }
                                else
                                {
                                    pbxFileList.Add(PBXFile.CreateInstance(path, importGroup));
                                    pbxFilePathSet.Add(path);
                                }
                            }
                        }
                    }
                    for (int i = 0; i < pbxFileList.Count; i++)
                    {
                        if (pbxFileList[i].removed)
                        {
                            pbxFileList.RemoveAt(i--);
                        }
                    }
                }
                if (GUILayout.Button("Add iOS SDK File"))
                {
                    pbxSdkFileList.Add(PbxSdkFile.CreateInstance());
                    displaySdkFiles = true;
                }
            }
            try {
                EditorGUILayout.EndHorizontal();
            }
            catch (System.InvalidOperationException) { Debug.Log("Caught invalidoperatinexception"); }
            EditorGUILayout.BeginHorizontal();
            {
                if (GUILayout.Button("Header Search Path"))
                {
                    headerSearchPaths.Add("");
                    displayHeaderPaths = true;
                }
                if (GUILayout.Button("Library Search Path"))
                {
                    librarySearchPaths.Add("");
                    displayLibraryPaths = true;
                }
                if (GUILayout.Button("Plist Entry"))
                {
                    pListEntryList.Add(PlistEntry.CreateInstance());
                    displayPlistEditor = true;
                }
            }
            EditorGUILayout.EndHorizontal();
            #endregion
            EditorGUILayout.Space();

            importGroup = EditorGUILayout.TextField("File Import Group: ", importGroup);
            EditorGUI.BeginChangeCheck();
            linkerFlags = EditorGUILayout.TextField("Linker Flags: ", linkerFlags);
            if (EditorGUI.EndChangeCheck())
            {
                dirty = true;
            }
            EditorGUILayout.Space();
            #region SDKFilesData
            displaySdkFiles = EditorGUILayout.Foldout(displaySdkFiles, "iOS SDK Files: (" + pbxSdkFileList.Count + ")");
            if (displaySdkFiles)
            {
                BBGuiHelper.BeginIndent();
                {
                    for (int i = 0; i < pbxSdkFileList.Count; i++)
                    {
                        if (pbxSdkFileList[i].removed)
                        {
                            pbxFilePathSet.Remove(pbxSdkFileList[i].absolutePath);
                            pbxSdkFileList.RemoveAt(i--);
                            dirty = true;
                            continue;
                        }
                        if (pbxSdkFileList[i] != null)
                        {
                            Undo.RecordObject(pbxSdkFileList[i], "Xcode File Import");
                        }
                        pbxSdkFileList[i].OnGUI();
                        if (pbxSdkFileList[i].edited)
                        {
                            dirty = true;
                        }
                    }
                }
                BBGuiHelper.EndIndent();
            }
            #endregion
            EditorGUILayout.Space();
            #region FilesData
            displayFiles = EditorGUILayout.Foldout(displayFiles, "Other Files: (" + pbxFileList.Count + ")");
            if (displayFiles)
            {
                BBGuiHelper.BeginIndent();
                {
                    string currentGroup = "";
                    BBGuiHelper.BeginIndent();
                    for (int i = 0; i < pbxFileList.Count; i++)
                    {
                        if (pbxFileList[i].removed)
                        {
                            pbxFilePathSet.Remove(pbxFileList[i].absolutePath);
                            pbxFileList.RemoveAt(i--);
                            dirty = true;
                            continue;
                        }
                        if (pbxFileList[i] != null)
                        {
                            Undo.RecordObject(pbxFileList[i], "Xcode File Import");
                        }
                        if (!pbxFileList[i].group.Equals(currentGroup))
                        {
                            BBGuiHelper.EndIndent();
                            EditorGUILayout.LabelField(pbxFileList[i].group);
                            currentGroup = pbxFileList[i].group;
                            BBGuiHelper.BeginIndent();
                        }
                        pbxFileList[i].OnGUI();
                        if (pbxFileList[i].edited)
                        {
                            dirty = true;
                        }
                    }
                    BBGuiHelper.EndIndent();
                }
                BBGuiHelper.EndIndent();
            }
            #endregion
            EditorGUILayout.Space();
            #region HeaderPaths
            displayHeaderPaths = EditorGUILayout.Foldout(displayHeaderPaths, "Header Search Paths: (" + headerSearchPaths.Count + ")");
            if (displayHeaderPaths)
            {
                BBGuiHelper.BeginIndent();
                {
                    EditorGUI.BeginChangeCheck();
                    for (int i = 0; i < headerSearchPaths.Count; i++)
                    {
                        headerSearchPaths[i] = EditorGUILayout.TextField(headerSearchPaths[i]);
                        EditorGUILayout.BeginHorizontal();
                        if (GUILayout.Button("Set"))
                        {
                            headerSearchPaths[i] = EditorUtility.OpenFolderPanel("Set Header Search Path", Application.dataPath + "/..", "");
                            headerSearchPaths[i] = MakePathRelative(headerSearchPaths[i]);
                        }
                        if (GUILayout.Button("Remove"))
                        {
                            headerSearchPaths.RemoveAt(i--);
                        }
                        EditorGUILayout.EndHorizontal();
                    }
                    if (EditorGUI.EndChangeCheck())
                    {
                        dirty = true;
                    }
                }
                BBGuiHelper.EndIndent();
            }
            #endregion
            EditorGUILayout.Space();
            #region LibraryPaths
            displayLibraryPaths = EditorGUILayout.Foldout(displayLibraryPaths, "Library Search Paths: (" + librarySearchPaths.Count + ")");
            if (displayLibraryPaths)
            {
                BBGuiHelper.BeginIndent();
                {
                    EditorGUI.BeginChangeCheck();
                    for (int i = 0; i < librarySearchPaths.Count; i++)
                    {
                        librarySearchPaths[i] = EditorGUILayout.TextField(librarySearchPaths[i]);
                        EditorGUILayout.BeginHorizontal();
                        if (GUILayout.Button("Set"))
                        {
                            librarySearchPaths[i] = EditorUtility.OpenFolderPanel("Set Library Search Path", Application.dataPath + "/..", "");
                            librarySearchPaths[i] = MakePathRelative(librarySearchPaths[i]);
                        }
                        if (GUILayout.Button("Remove"))
                        {
                            librarySearchPaths.RemoveAt(i--);
                        }
                        EditorGUILayout.EndHorizontal();
                    }
                    if (EditorGUI.EndChangeCheck())
                    {
                        dirty = true;
                    }
                }
                BBGuiHelper.EndIndent();
            }
            #endregion
            EditorGUILayout.Space();
            #region plistEditor
            displayPlistEditor = EditorGUILayout.Foldout(displayPlistEditor, "Info.plist Editor: (" + pListEntryList.Count + ")");
            if (displayPlistEditor)
            {
                for (int i = 0; i < pListEntryList.Count; i++)
                {
                    if (pListEntryList[i] != null)
                    {
                        Undo.RecordObject(pListEntryList[i], "Plist Entry");
                    }
                    pListEntryList[i].OnGUI();
                    if (pListEntryList[i].edited)
                    {
                        dirty = true;
                    }
                    if (pListEntryList[i].removed)
                    {
                        pListEntryList.RemoveAt(i--);
                        dirty = true;
                    }
                }
            }
            #endregion
            EditorGUILayout.Space();
            EditorGUILayout.BeginHorizontal();
            {
                if (dirty)
                {
                    GUI.color = Color.green;
                }
                else
                {
                    GUI.color = Color.gray;
                }
                if (GUILayout.Button("Apply Changes"))
                {
                    ApplyChanges();
                }
                if (dirty)
                {
                    GUI.color = Color.red;
                }
                else
                {
                    GUI.color = Color.gray;
                }
                if (GUILayout.Button("Cancel Changes"))
                {
                    Initialize();
                }
            }
            EditorGUILayout.EndHorizontal();
            GUI.color = Color.white;
        }
Exemplo n.º 18
0
        public override void OnGUI()
        {
            bool changed = false;

            display = EditorGUILayout.Foldout(display, "Provider: " + (!display ? name : ""));
            EditorGUI.BeginChangeCheck();
            if (display)
            {
                name     = EditorGUILayout.TextField("Name: ", name);
                changed |= EditorGUI.EndChangeCheck();
                BBGuiHelper.BeginIndent();
                {
                    #region attributes
                    displayAttributes = EditorGUILayout.Foldout(displayAttributes, "Attributes: ");
                    if (displayAttributes)
                    {
                        EditorGUI.BeginChangeCheck();
                        BBGuiHelper.BeginIndent();
                        {
                            for (int i = 0; i < authorities.Count; i++)
                            {
                                EditorGUILayout.BeginHorizontal();
                                {
                                    authorities[i] = EditorGUILayout.TextField(authorities[i]);
                                    if (GUILayout.Button("Remove"))
                                    {
                                        authorities.RemoveAt(i--);
                                    }
                                }
                                EditorGUILayout.EndHorizontal();
                            }
                            enabled             = EditorGUILayout.Toggle("Enabled: ", enabled);
                            exported            = EditorGUILayout.Toggle("Exported: ", exported);
                            grantUriPermissions = EditorGUILayout.Toggle("Grant URI Permissions: ", grantUriPermissions);
                            icon            = EditorGUILayout.TextField("Icon: ", icon);
                            initOrder       = EditorGUILayout.IntField("Init Order: ", initOrder);
                            label           = EditorGUILayout.TextField("Label: ", label);
                            multiProcess    = EditorGUILayout.Toggle("Multiprocess: ", multiProcess);
                            permission      = EditorGUILayout.TextField("Permission: ", permission);
                            process         = EditorGUILayout.TextField("Process: ", process);
                            readPermission  = EditorGUILayout.TextField("Read Permission: ", readPermission);
                            syncable        = EditorGUILayout.Toggle("Syncable: ", syncable);
                            writePermission = EditorGUILayout.TextField("Write Permission: ", writePermission);
                        }
                        BBGuiHelper.EndIndent();
                        changed |= EditorGUI.EndChangeCheck();
                    }
                    #endregion
                    #region metadata
                    displayMetaData = EditorGUILayout.Foldout(displayMetaData, "Meta-Data: (" + metaDataList.Count + ")");
                    if (displayMetaData)
                    {
                        for (int i = 0; i < metaDataList.Count; i++)
                        {
                            Undo.RecordObject(metaDataList[i], "Meta-Data");
                            if (metaDataList[i].ElementEditStatus != EditStatus.REMOVED)
                            {
                                metaDataList[i].OnGUI();
                            }
                            if (metaDataList[i].ElementEditStatus != EditStatus.NONE)
                            {
                                changed = true;
                            }
                        }
                        BBGuiHelper.EndIndent();
                        GUILayout.BeginHorizontal();
                        {
                            EditorGUILayout.Space();
                            if (GUILayout.Button("New Meta-Data", BBGuiHelper.ButtonWidth()))
                            {
                                metaDataList.Add(ManifestMetaData.CreateInstance(node));
                                changed = true;
                            }
                        }
                        GUILayout.EndHorizontal();
                        BBGuiHelper.BeginIndent();
                    }
                    #endregion
                    #region granturipermission
                    displayGrantUriPermissions = EditorGUILayout.Foldout(displayGrantUriPermissions, "Grant-Uri-Permissions: (" + grantUriPermissionList.Count + ")");
                    if (displayGrantUriPermissions)
                    {
                        for (int i = 0; i < grantUriPermissionList.Count; i++)
                        {
                            Undo.RecordObject(grantUriPermissionList[i], "Grant-Uri-Permissions");
                            if (grantUriPermissionList[i].ElementEditStatus != EditStatus.REMOVED)
                            {
                                grantUriPermissionList[i].OnGUI();
                            }
                            if (grantUriPermissionList[i].ElementEditStatus != EditStatus.NONE)
                            {
                                changed = true;
                            }
                        }
                        BBGuiHelper.EndIndent();
                        GUILayout.BeginHorizontal();
                        {
                            EditorGUILayout.Space();
                            if (GUILayout.Button("New Grant-Uri-Permission", BBGuiHelper.ButtonWidth()))
                            {
                                grantUriPermissionList.Add(ManifestGrantUriPermission.CreateInstance(node));
                                changed = true;
                            }
                        }
                        GUILayout.EndHorizontal();
                        BBGuiHelper.BeginIndent();
                    }
                    #endregion
                    #region pathpermission
                    displayPathPermissions = EditorGUILayout.Foldout(displayPathPermissions, "Path-Permissions: (" + pathPermissionList.Count + ")");
                    if (displayPathPermissions)
                    {
                        for (int i = 0; i < pathPermissionList.Count; i++)
                        {
                            Undo.RecordObject(pathPermissionList[i], "Path-Permissions");
                            if (pathPermissionList[i].ElementEditStatus != EditStatus.REMOVED)
                            {
                                pathPermissionList[i].OnGUI();
                            }
                            if (pathPermissionList[i].ElementEditStatus != EditStatus.NONE)
                            {
                                changed = true;
                            }
                        }
                        BBGuiHelper.EndIndent();
                        GUILayout.BeginHorizontal();
                        {
                            EditorGUILayout.Space();
                            if (GUILayout.Button("New Path-Permission", BBGuiHelper.ButtonWidth()))
                            {
                                pathPermissionList.Add(ManifestPathPermission.CreateInstance(node));
                                changed = true;
                            }
                        }
                        GUILayout.EndHorizontal();
                        BBGuiHelper.BeginIndent();
                    }
                    #endregion
                }
                BBGuiHelper.EndIndent();
                GUILayout.BeginHorizontal();
                {
                    EditorGUILayout.Space();
                    if (changed)
                    {
                        elementEditStatus = EditStatus.EDITED;
                    }
                    if (GUILayout.Button("Remove Provider", BBGuiHelper.ButtonWidth()))
                    {
                        elementEditStatus = EditStatus.REMOVED;
                    }
                }
                GUILayout.EndHorizontal();
            }
        }
Exemplo n.º 19
0
 public void OnGUI()
 {
     if (isTemplate)
     {
         EditorGUILayout.BeginHorizontal();
         {
             EditorGUILayout.LabelField("Name:", GUILayout.Width(75));
             name = EditorGUILayout.TextField(name);
         }
         EditorGUILayout.EndHorizontal();
     }
     else
     {
         application.OnGUI();
     }
     EditorGUILayout.LabelField("Application Level:");
     #region Activites
     displayActivities = EditorGUILayout.Foldout(displayActivities, "Activities: (" + activityList.Count + ")");
     if (displayActivities)
     {
         BBGuiHelper.BeginIndent();
         {
             for (int i = 0; i < activityList.Count; i++)
             {
                 Undo.RecordObject(activityList[i], "Activity");
                 if (activityList[i].ElementEditStatus == EditStatus.REMOVED)
                 {
                     editedList.Add(activityList[i]);
                     activityList.RemoveAt(i);
                     dirty = true;
                     i--;
                     continue;
                 }
                 activityList[i].OnGUI();
                 if (activityList[i].ElementEditStatus != EditStatus.NONE)
                 {
                     dirty = true;
                 }
             }
             if (GUILayout.Button("New Activity"))
             {
                 activityList.Add(ManifestActivity.CreateInstance());
             }
         }
         BBGuiHelper.EndIndent();
     }
     #endregion
     #region Receiver
     displayReceivers = EditorGUILayout.Foldout(displayReceivers, "Receivers: (" + receiverList.Count + ")");
     if (displayReceivers)
     {
         BBGuiHelper.BeginIndent();
         {
             for (int i = 0; i < receiverList.Count; i++)
             {
                 Undo.RecordObject(receiverList[i], "Receiver");
                 if (receiverList[i].ElementEditStatus == EditStatus.REMOVED)
                 {
                     editedList.Add(receiverList[i]);
                     receiverList.RemoveAt(i);
                     dirty = true;
                     i--;
                     continue;
                 }
                 receiverList[i].OnGUI();
                 if (receiverList[i].ElementEditStatus != EditStatus.NONE)
                 {
                     dirty = true;
                 }
             }
             if (GUILayout.Button("New Receiver"))
             {
                 receiverList.Add(ManifestReceiver.CreateInstance());
             }
         }
         BBGuiHelper.EndIndent();
     }
     #endregion
     #region Service
     displayServices = EditorGUILayout.Foldout(displayServices, "Services: (" + serviceList.Count + ")");
     if (displayServices)
     {
         BBGuiHelper.BeginIndent();
         {
             for (int i = 0; i < serviceList.Count; i++)
             {
                 Undo.RecordObject(serviceList[i], "Service");
                 if (serviceList[i].ElementEditStatus == EditStatus.REMOVED)
                 {
                     editedList.Add(serviceList[i]);
                     serviceList.RemoveAt(i);
                     dirty = true;
                     i--;
                     continue;
                 }
                 serviceList[i].OnGUI();
                 if (serviceList[i].ElementEditStatus != EditStatus.NONE)
                 {
                     dirty = true;
                 }
             }
             if (GUILayout.Button("New Service"))
             {
                 serviceList.Add(ManifestService.CreateInstance());
             }
         }
         BBGuiHelper.EndIndent();
     }
     #endregion
     #region Provider
     displayProviders = EditorGUILayout.Foldout(displayProviders, "Providers: (" + providerList.Count + ")");
     if (displayProviders)
     {
         BBGuiHelper.BeginIndent();
         {
             for (int i = 0; i < providerList.Count; i++)
             {
                 Undo.RecordObject(providerList[i], "Provider");
                 if (providerList[i].ElementEditStatus == EditStatus.REMOVED)
                 {
                     editedList.Add(providerList[i]);
                     providerList.RemoveAt(i);
                     dirty = true;
                     i--;
                     continue;
                 }
                 providerList[i].OnGUI();
                 if (providerList[i].ElementEditStatus != EditStatus.NONE)
                 {
                     dirty = true;
                 }
             }
             if (GUILayout.Button("New Provider"))
             {
                 providerList.Add(ManifestProvider.CreateInstance());
             }
         }
         BBGuiHelper.EndIndent();
     }
     #endregion
     #region MetaData
     displayMetaData = EditorGUILayout.Foldout(displayMetaData, "Meta-Data: (" + metaDataList.Count + ")");
     if (displayMetaData)
     {
         BBGuiHelper.BeginIndent();
         {
             for (int i = 0; i < metaDataList.Count; i++)
             {
                 Undo.RecordObject(metaDataList[i], "Meta-Data");
                 if (metaDataList[i].ElementEditStatus == EditStatus.REMOVED)
                 {
                     editedList.Add(metaDataList[i]);
                     metaDataList.RemoveAt(i);
                     dirty = true;
                     i--;
                     continue;
                 }
                 metaDataList[i].OnGUI();
                 if (metaDataList[i].ElementEditStatus != EditStatus.NONE)
                 {
                     dirty = true;
                 }
             }
             if (GUILayout.Button("New Meta-Data"))
             {
                 metaDataList.Add(ManifestMetaData.CreateInstance());
             }
         }
         BBGuiHelper.EndIndent();
     }
     #endregion
     #region UsesLibrary
     displayUsesLibrary = EditorGUILayout.Foldout(displayUsesLibrary, "Uses-Library: (" + usesLibraryList.Count + ")");
     if (displayUsesLibrary)
     {
         BBGuiHelper.BeginIndent();
         {
             for (int i = 0; i < usesLibraryList.Count; i++)
             {
                 Undo.RecordObject(usesLibraryList[i], "Uses-Library");
                 if (usesLibraryList[i].ElementEditStatus == EditStatus.REMOVED)
                 {
                     editedList.Add(usesLibraryList[i]);
                     usesLibraryList.RemoveAt(i);
                     dirty = true;
                     i--;
                     continue;
                 }
                 usesLibraryList[i].OnGUI();
                 if (usesLibraryList[i].ElementEditStatus != EditStatus.NONE)
                 {
                     dirty = true;
                 }
             }
             if (GUILayout.Button("New Uses-Library"))
             {
                 usesLibraryList.Add(ManifestUsesLibrary.CreateInstance());
             }
         }
         BBGuiHelper.EndIndent();
     }
     #endregion
     EditorGUILayout.LabelField("Manifest Level:");
     #region Permissions
     displayPermissions = EditorGUILayout.Foldout(displayPermissions, "Permissions: (" + permissionList.Count + ")");
     if (displayPermissions)
     {
         BBGuiHelper.BeginIndent();
         {
             for (int i = 0; i < permissionList.Count; i++)
             {
                 Undo.RecordObject(permissionList[i], "Permission");
                 if (permissionList[i].ElementEditStatus == EditStatus.REMOVED)
                 {
                     editedList.Add(permissionList[i]);
                     permissionList.RemoveAt(i);
                     dirty = true;
                     i--;
                     continue;
                 }
                 permissionList[i].OnGUI();
                 if (permissionList[i].ElementEditStatus != EditStatus.NONE)
                 {
                     dirty = true;
                 }
             }
             if (GUILayout.Button("New Permission"))
             {
                 permissionList.Add(ManifestPermission.CreateInstance());
             }
         }
         BBGuiHelper.EndIndent();
     }
     #endregion
     #region UsesPermissions
     displayUsesPermissions = EditorGUILayout.Foldout(displayUsesPermissions, "Uses-Permissions: (" + usesPermissionList.Count + ")");
     if (displayUsesPermissions)
     {
         BBGuiHelper.BeginIndent();
         {
             for (int i = 0; i < usesPermissionList.Count; i++)
             {
                 Undo.RecordObject(usesPermissionList[i], "Uses-Permission");
                 if (usesPermissionList[i].ElementEditStatus == EditStatus.REMOVED)
                 {
                     editedList.Add(usesPermissionList[i]);
                     usesPermissionList.RemoveAt(i);
                     dirty = true;
                     i--;
                     continue;
                 }
                 usesPermissionList[i].OnGUI();
                 if (usesPermissionList[i].ElementEditStatus != EditStatus.NONE)
                 {
                     dirty = true;
                 }
             }
             if (GUILayout.Button("New Uses-Permission"))
             {
                 usesPermissionList.Add(ManifestUsesPermission.CreateInstance());
             }
         }
         BBGuiHelper.EndIndent();
     }
     #endregion
     #region UsesFeature
     displayUsesFeatures = EditorGUILayout.Foldout(displayUsesFeatures, "Uses-Features: (" + usesFeatureList.Count + ")");
     if (displayUsesFeatures)
     {
         BBGuiHelper.BeginIndent();
         {
             for (int i = 0; i < usesFeatureList.Count; i++)
             {
                 Undo.RecordObject(usesFeatureList[i], "Uses-Feature");
                 if (usesFeatureList[i].ElementEditStatus == EditStatus.REMOVED)
                 {
                     editedList.Add(usesFeatureList[i]);
                     usesFeatureList.RemoveAt(i);
                     dirty = true;
                     i--;
                     continue;
                 }
                 usesFeatureList[i].OnGUI();
                 if (usesFeatureList[i].ElementEditStatus != EditStatus.NONE)
                 {
                     dirty = true;
                 }
             }
             if (GUILayout.Button("New Uses-Feature"))
             {
                 usesFeatureList.Add(ManifestUsesFeature.CreateInstance());
             }
         }
         BBGuiHelper.EndIndent();
     }
     #endregion
 }