protected virtual void DrawComponent(ProvenceComponent component, VisualElement parent, bool removeable = true, bool hide = false)
        {
            Div container = new Div();

            container.AddToClassList("search-list-item");
            container.userData = component.GetType().Name;
            foreach (Type tag in collection[chosenKey].tags)
            {
                if (((MainframeTag)Activator.CreateInstance(tag)).requiredComponents.Contains(component.GetType()))
                {
                    container.userData += tag.Name;
                }
            }
            ListItem     titleItem = new ListItem(false, true);
            ListItemText title     = titleItem.AddTitle(System.Text.RegularExpressions.Regex.Replace(component.GetType().Name, @"((?<=\p{Ll})\p{Lu})|((?!\A)\p{Lu}(?>\p{Ll}))", " $0"));

            titleItem.name = component.GetType().Name.ToLower() + "-control-title";
            titleItem.AddToClassList("structure-control-title", "spacer");

            Div structContainer = (Div)Helpers.InvokeGenericMethod <ProvenceCollectionEditor <U> >(this, "DrawComponentControl", component.GetType(), component);

            titleItem.eventManager.AddListener <MouseClickEvent>(e => {
                switch (e.button)
                {
                case 0:
                    if (title.ClassListContains("second-alternate"))
                    {
                        title.RemoveFromClassList("second-alternate");
                    }
                    else
                    {
                        title.AddToClassList("second-alternate");
                    }
                    structContainer.Toggle();
                    break;

                case 1:
                    if (removeable)
                    {
                        entryEditorComponentContextMenu.Show(root, e, true);

                        ListItem removeButton = entryEditorComponentContextMenu.Q <ListItem>("entry-editor-component-remove-button");
                        removeButton.eventManager.ClearListeners();
                        removeButton.eventManager.AddListener <MouseClickEvent>(ev => {
                            Helpers.InvokeGenericMethod <ProvenceCollectionEditor <U> >(this, "RemoveComponentFromEntry", component.GetType());
                            entryEditorComponentContextMenu.Toggle();
                        });
                    }
                    break;
                }
            });

            if (hide)
            {
                titleItem.eventManager.Raise <MouseClickEvent>(new MouseClickEvent(titleItem, 0, Vector2.zero));
            }

            container.Add(titleItem, structContainer);
            parent.Add(container);
        }
        protected virtual void DrawTagList()
        {
            tagListScroller.Clear();
            if (chosenKey != null)
            {
                foreach (System.Type tag in collection[chosenKey].tags)
                {
                    ListItemText tagElement = new ListItemText(tag.Name);
                    tagElement.userData = tag;
                    tagElement.AddToClassList("entry-editor-tag");

                    tagElement.eventManager.AddListener <MouseClickEvent>(e => {
                        switch (e.button)
                        {
                        case 0:
                            ListItemSearchBar compSearchBar = root.Q <ListItemSearchBar>("entry-editor-search-bar");
                            compSearchBar.searchInput.value = compSearchBar.searchInput.value.Replace(" ", "");
                            if (tagElement.ClassListContains("selected"))
                            {
                                tagElement.RemoveFromClassList("selected");
                                compSearchBar.searchInput.value = compSearchBar.searchInput.text.ToLower().Replace(tag.Name.ToLower() + "/", "");
                            }
                            else
                            {
                                tagElement.AddToClassList("selected");
                                if (compSearchBar.searchInput.value == "")
                                {
                                    compSearchBar.searchInput.value = tag.Name.ToLower() + "/";
                                }
                                else
                                {
                                    if (compSearchBar.searchInput.value[compSearchBar.searchInput.value.Length - 1] != '/')
                                    {
                                        compSearchBar.searchInput.value += "/";
                                    }
                                    compSearchBar.searchInput.value += tag.Name.ToLower() + "/";
                                }
                            }
                            break;

                        case 1:
                            entryEditorTagContextMenu.Show(root, e, true);
                            ListItem removeButton = entryEditorTagContextMenu.Q <ListItem>("entry-editor-tag-remove-button");
                            removeButton.eventManager.ClearListeners();
                            removeButton.eventManager.AddListener <MouseClickEvent>(ev => {
                                RemoveTagFromEntry((dynamic)tagElement.userData);
                                entryEditorTagContextMenu.Toggle();
                            });
                            ListItem removeAllButton = entryEditorTagContextMenu.Q <ListItem>("entry-editor-tag-remove-all-button");
                            removeAllButton.eventManager.ClearListeners();
                            removeAllButton.eventManager.AddListener <MouseClickEvent>(ev => {
                                RemoveTagCompleteFromEntry((dynamic)tagElement.userData);
                                entryEditorTagContextMenu.Toggle();
                            });
                            break;
                        }
                    });

                    tagListScroller.Add(tagElement);
                }
            }
        }