public bool ClosePluginOfType(Type type)
        {
            foreach (ITabDocument content in bottomTabControl.Documents)
            {
                if (content is ObjectEditorView && (content as ObjectEditorView).EditorPlugin.GetType() == type)
                {
                    // Unregister plugin from back end.
                    wbContext.close_gui_plugin((content as ObjectEditorView).EditorPlugin.GetFixedPtr());

                    content.Close();
                    if (bottomTabControl.TabCount == 0)
                    {
                        contentSplitContainer.Panel2Collapsed = true;
                    }
                    return(true);
                }
            }

            return(false);
        }