indexing description: "Command to generate documentation." legal: "See notice at end of class." status: "See notice at end of class."; date: "$Date$"; revision: "$Revision $" class DOCUMENT_GENERATION inherit TOOL_COMMAND WARNER_CALLBACKS create make_flat, make_flat_short, make_text, make_short feature {NONE} -- Initialization make_flat is -- Initialize document generation to flat. do format_type := flat_type; tool := Project_tool end; make_flat_short is -- Initialize document generation to flat_short. do format_type := flat_short_type; tool := Project_tool end; make_text is -- Initialize document generation to text. do format_type := text_type; tool := Project_tool end; make_short is -- Initialize document generation to text. do format_type := short_type; tool := Project_tool end; feature -- Warner processing execute_warner_help is -- Action executed when help is pressed (do not generate parents). do generate_documentation (False) end; execute_warner_ok (arg: ANY) is -- Action executed when ok is pressed (confirmation of generate parents). do generate_documentation (True) end; feature -- Generation generate_documentation (do_parents: BOOLEAN) is -- Generate the documentations. local cmd: E_GENERATE_DOCUMENTATION do inspect format_type when flat_type then create cmd.make_flat (filter_name, Project_tool.progress_dialog) when flat_short_type then create cmd.make_flat_short (filter_name, Project_tool.progress_dialog) when text_type then create cmd.make_text (filter_name, Project_tool.progress_dialog) when short_type then create cmd.make_short (filter_name, Project_tool.progress_dialog) end if do_parents then cmd.set_do_parents end; cmd.set_error_window (Project_tool.text_window); cmd.execute; end; feature -- Status report name: STRING is -- Name of editor operations do inspect format_type when flat_type then Result := Interface_names.f_flat_doc when flat_short_type then Result := Interface_names.f_flat_short_doc when text_type then Result := Interface_names.f_text_doc when short_type then Result := Interface_names.f_short_doc end end; menu_name: STRING is -- Name used in menu entry do inspect format_type when flat_type then Result := Interface_names.m_flat_doc when flat_short_type then Result := Interface_names.m_flat_short_doc when text_type then Result := Interface_names.m_text_doc when short_type then Result := Interface_names.m_short_doc end end; accelerator: STRING is -- Accelerator action for menu entry do end feature -- Execution work (argument: ANY) is -- Perform edit operations. do if Project_tool.initialized then if argument = tool then filter_window.call (Current) elseif argument = Current then -- Comes from filter window filter_name := filter_window.selected_filter if filter_name /= Void then warner (Project_tool).custom_call (Current, Warning_messages.w_Include_parents, Interface_names.b_Yes, Interface_names.b_No, Void) end end end end; feature {NONE} -- Implementation filter_window: FILTER_W is -- Filter window once create Result.make (Current) end; filter_name: STRING -- Filter name format_type: INTEGER; -- Format type flat_short_type, short_type, flat_type, text_type: INTEGER is unique; -- Output type indexing copyright: "Copyright (c) 1984-2006, Eiffel Software" license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)" licensing_options: "http://www.eiffel.com/licensing" copying: "[ This file is part of Eiffel Software's Eiffel Development Environment. Eiffel Software's Eiffel Development Environment is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License (available at the URL listed under "license" above). Eiffel Software's Eiffel Development Environment is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Eiffel Software's Eiffel Development Environment; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ]" source: "[ Eiffel Software 356 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class DOCUMENT_GENERATION