/// <summary>
        /// Creates a file node for a project element.
        /// </summary>
        /// <param name="element">The project element.</param>
        /// <returns>An instance of the <see cref="FileNode"/> class.</returns>
        public override FileNode CreateFileNode(ProjectElement element)
        {
            if (element == null)
            {
                throw new ArgumentNullException("element");
            }

            MultiverseInterfaceFileNode node = null;

            // Get the SubType for the project element.
            string subType = element.GetMetadata(ProjectFileConstants.SubType);

            switch (subType)
            {
            case MultiverseInterfaceSubType.Code:
                node = new MultiverseInterfacePythonFileNode(this, element);
                break;

            case MultiverseInterfaceSubType.Frame:
                node = new MultiverseInterfaceXmlFileNode(this, element);
                break;

            case MultiverseInterfaceSubType.TableOfContents:
                node = new MultiverseInterfaceTocFileNode(this, element);
                break;

            default:
                // We could not recognize the file subtype, just create a WowFileNode
                node = new MultiverseInterfaceFileNode(this, element);
                break;
            }

            // Check whether this file should be added to the language service
            if (subType == MultiverseInterfaceSubType.Frame || subType == MultiverseInterfaceSubType.Code)
            {
                IPythonLanguageService languageService = (IPythonLanguageService)this.GetService(typeof(IPythonLanguageService));

                // Make sure the language service is available
                if (languageService != null)
                {
                    switch (subType)
                    {
                    case MultiverseInterfaceSubType.Frame:
                        languageService.AddFrameXmlFile(node.GetMkDocument());
                        break;

                    case MultiverseInterfaceSubType.Code:
                        languageService.AddPythonFile(node.GetMkDocument());
                        break;
                    }
                }
            }

            return(node);
        }
        /// <summary>
        /// Creates a file node for a project element.
        /// </summary>
        /// <param name="element">The project element.</param>
        /// <returns>An instance of the <see cref="FileNode"/> class.</returns>
        public override FileNode CreateFileNode(ProjectElement element)
        {
            if (element == null)
                throw new ArgumentNullException("element");

            MultiverseInterfaceFileNode node = null;

            // Get the SubType for the project element.
            string subType = element.GetMetadata(ProjectFileConstants.SubType);

            switch (subType)
            {
                case MultiverseInterfaceSubType.Code:
                    node = new MultiverseInterfacePythonFileNode(this, element);
                    break;
                case MultiverseInterfaceSubType.Frame:
                    node = new MultiverseInterfaceXmlFileNode(this, element);
                    break;
                case MultiverseInterfaceSubType.TableOfContents:
                    node = new MultiverseInterfaceTocFileNode(this, element);
                    break;
                default:
                    // We could not recognize the file subtype, just create a WowFileNode
                    node = new MultiverseInterfaceFileNode(this, element);
                    break;
            }

            // Check whether this file should be added to the language service
            if (subType == MultiverseInterfaceSubType.Frame || subType == MultiverseInterfaceSubType.Code)
            {
                IPythonLanguageService languageService = (IPythonLanguageService)this.GetService(typeof(IPythonLanguageService));

                // Make sure the language service is available
                if (languageService != null)
                {
                    switch (subType)
                    {
                        case MultiverseInterfaceSubType.Frame:
                            languageService.AddFrameXmlFile(node.GetMkDocument());
                            break;
                        case MultiverseInterfaceSubType.Code:
                            languageService.AddPythonFile(node.GetMkDocument());
                            break;
                    }
                }
            }

            return node;
        }