note description: "Objects that represent an EV_DIALOG.% %The original version of this class was generated by EiffelBuild." legal: "See notice at end of class." status: "See notice at end of class." date: "$Date$" revision: "$Revision$" class TOC_NEW_DIALOG inherit TOC_NEW_DIALOG_IMP redefine show_modal_to_window end SHARED_OBJECTS undefine copy, default_create end feature {NONE} -- Initialization user_initialization -- called by `initialize'. -- Any custom user initialization that -- could not be performed in `initialize', -- (due to regeneration of implementation class) -- can be added here. do okay_button.select_actions.extend (agent okay) cancel_button.select_actions.extend (agent hide) create check_tree tree_container.extend (check_tree) create dir_tree.make (shared_project.root_directory, check_tree) end feature -- Display show_modal_to_window (a_window: EV_WINDOW) -- Show do if shared_project.is_valid then project_radio.enable_sensitive else project_radio.disable_sensitive end precursor (a_window) end feature {NONE} -- Implementation check_tree: EV_CHECKABLE_TREE dir_tree: CHECKABLE_DIRECTORY_SELECTOR okay -- Okay pressed local l_dir: DIRECTORY do if not toc_name_text.text.is_empty then if project_radio.is_selected then -- Make from project root create l_dir.make (Shared_project.root_directory) Shared_toc_manager.build_toc (toc_name_text.text, l_dir) elseif dir_radio.is_selected then -- Make from project settings create l_dir.make (shared_project.root_directory) Shared_toc_manager.build_toc_sub_dirs (toc_name_text.text, l_dir, shared_project.preferences.toc_folders) elseif custom_radio.is_selected then -- Make from custom selections create l_dir.make (Shared_project.root_directory) Shared_toc_manager.build_toc_sub_dirs (toc_name_text.text, l_dir, selected_tree_directories) else -- Make empty Shared_toc_manager.new_toc (toc_name_text.text) end hide end end selected_tree_directories: ARRAYED_LIST [STRING] -- require item_checked: not check_tree.checked_items.is_empty local l_dir_name: STRING l_checked_items: DYNAMIC_LIST [EV_TREE_NODE] do create Result.make (check_tree.checked_items.count) l_checked_items := check_tree.checked_items from l_checked_items.start until l_checked_items.after loop l_dir_name ?= l_checked_items.item.data if l_dir_name /= Void then Result.extend (l_dir_name) end l_checked_items.forth end end note 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 TOC_NEW_DIALOG