indexing description: "Objects that represent the Vision2 application.% %The original version of this class has been generated by EiffelBuild." legal: "See notice at end of class." status: "See notice at end of class." date: "$Date$" revision: "$Revision$" class ECDM_APPLICATION inherit EV_APPLICATION redefine print end create make_and_launch feature {NONE} -- Initialization make_and_launch is -- Parse arguments and execute accordingly. local l_cls: COMMAND_LINE_SYNTAX l_clp: COMMAND_LINE_PARSER l_args: ARGUMENTS do default_create create l_cls.make (option_specifications) create l_clp.make (l_cls) create l_args l_clp.parse (l_args.argument_array) exe_name := l_clp.executable_without_suffix if l_clp.valid_options.has ("-v") then print_version_info elseif l_clp.valid_options.has ("-h") then print (l_cls.program_help (exe_name, Void, Void)) elseif l_clp.valid_options.has ("-r") then create config_manager register_codedom_provider ((l_clp.valid_options @ "-r").first) elseif not l_clp.invalid_options_found then start_gui else print (l_clp.error_message) print (l_cls.program_usage (exe_name) + "%N") print ("Use -h/--help for more help." + "%N") end end start_gui is -- Create `Current', build and display `main_window', -- then launch the application. do create config_manager create main_window.make (config_manager) main_window.set_help_context (agent help_context) set_help_engine (create {CODE_HELP_ENGINE}) main_window.show launch end feature {NONE} -- Implementation help_context: CODE_HELP_CONTEXT is -- Help context do create Result.make_from_string ("tools/manager.html") end register_codedom_provider (a_path: STRING) is -- Register codedom provider and use `a_path' as default configuration folder. require non_void_path: a_path /= Void local l_retried: BOOLEAN l_config: ECDM_CONFIGURATION do if not l_retried then create l_config.make_empty (a_path, "Default") if l_config.last_save_successful then config_manager.register_default_configuration (l_config.path) print ("Default configuration successfully registered.") else print ("Could not create default configuration file, please check file permissions.") end else print ("Could not create default configuration file, please check file permissions.") end rescue l_retried := True retry end print_version_info is -- Print version information. local s: STRING do s := exe_name + " v" + (create {ECDM_CONSTANTS}).product_version + "%N" s.append ("Eiffel Codedom Provider Manager%N") s.append ("Copyright (c) 2004, Eiffel Software.%N") s.append ("Report bugs, problems or suggestions at http://support.eiffel.com%N") print (s) end option_specifications: ARRAY [STRING] is -- The recognized options of this program once Result := <<"-v,--version#Version information.", "-h,--help#Help on using this program.", "-r,--register=FOLDER!#Register Eiffel Codedom Provider and use FOLDER as default configuration file folder.">> end print (some: ANY) is -- Redirect output to dialog since graphical .NET applications cannot open a DOS console. local l_dialog: ECDM_OUTPUT_DIALOG l_text, l_out: STRING do if some /= Void then create l_dialog l_dialog.ok_button.select_actions.extend (agent destroy) l_out := some.out l_out.replace_substring_all ("%N", "%N>") create l_text.make (l_out.count + 1) l_text.append_character ('>') l_text.append (l_out) l_dialog.output.set_text (l_text) l_dialog.show launch end end file_names: LIST [STRING] -- Names of the files to operate on exe_name: STRING -- Name of this executable main_window: ECDM_MAIN_WINDOW -- Main window of `Current'. config_manager: ECDM_MANAGER; -- Configuration files manager 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 APPLICATION --+-------------------------------------------------------------------- --| Eiffel CodeDOM Provider Manager --| Copyright (C) 2001-2004 Eiffel Software --| Eiffel Software Confidential --| All rights reserved. Duplication and distribution prohibited. --| --| Eiffel Software --| 356 Storke Road, Goleta, CA 93117 USA --| http://www.eiffel.com --+--------------------------------------------------------------------