indexing description: "Microsoft Help 2.0 Project (VSIP)." date: "$Date$" revision: "$Revision$" class MSHELP_PROJECT inherit HELP_PROJECT UTILITY_FUNCTIONS TABLE_OF_CONTENTS_CONSTANTS create make feature -- File generate_files is -- Generate necessary files do create_project_file create_files_file create_collection_file end feature {NONE} -- File create_toc_file is -- Create table of contents file local template: PLAIN_TEXT_TEMPLATE_FILE template_file: FILE_NAME do create template_file.make_from_string (Shared_constants.Application_constants.Templates_path) template_file.extend ("HelpTOCTemplate.HxT") create template.make (template_file) template.add_symbol ("toc", full_toc_text) template.save_file (toc_file_name) end create_project_file is -- Create the actual project file for Visual Studio local template: PLAIN_TEXT_TEMPLATE_FILE template_file: FILE_NAME do create template_file.make_from_string (Shared_constants.Application_constants.Templates_path) template_file.extend ("HelpProjectTemplate.hwproj") create template.make (template_file) template.add_symbol ("project_name", name) template.add_symbol ("files", retrieve_files (False, True, toc)) template.add_symbol ("directories", retrieve_files (True, True, toc)) template.save_file (project_file_name) create project_file.make (template.template_filename) end create_files_file is -- Create the project include files file local template: PLAIN_TEXT_TEMPLATE_FILE template_file: FILE_NAME do create template_file.make_from_string (Shared_constants.Application_constants.templates_path) template_file.extend ("HelpFilesTemplate.HxF") create template.make (template_file) template.add_symbol ("files", retrieve_files (False, False, toc)) template.save_file (Help_directory.out + "\" + name + ".HxF") create files_file.make (template.template_filename) end create_collection_file is -- Create the projects collection file local template: PLAIN_TEXT_TEMPLATE_FILE template_file: FILE_NAME do create template_file.make_from_string (Shared_constants.Application_constants.templates_path) template_file.extend ("HelpCollectionTemplate.HxC") create template.make (template_file) template.add_symbol ("project_name", name) template.save_file (Help_directory.out + "\" + name + ".HxC") create collection_file.make (template.template_filename) end project_file: PLAIN_TEXT_FILE -- Project File files_file: PLAIN_TEXT_FILE -- Project File collection_file: PLAIN_TEXT_FILE -- Table of Contents File feature -- Commands build_table_of_contents is -- Build table of contents do create_toc_file end generate is -- Generate help project do generate_files end feature {NONE} -- Project retrieve_files (get_dirs, tags: BOOLEAN; a_toc: like toc): STRING is -- Retrieve the project files string or directories string if `get_dirs' local l_help_topic: XML_TABLE_OF_CONTENTS_NODE l_help_topics: HASH_TABLE [XML_TABLE_OF_CONTENTS_NODE, INTEGER] l_title, l_url: STRING l_util: UTILITY_FUNCTIONS do create l_util create Result.make_empty from l_help_topics := toc.nodes l_help_topics.start until l_help_topics.after loop l_help_topics.forth l_help_topic := l_help_topics.item_for_iteration l_url := l_help_topic.attribute_by_name (Url_string).value l_title := l_help_topic.attribute_by_name (Title_string).value if get_dirs then if l_help_topic.is_directory then Result.append ("