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 GB_OBJECT_STILL_REFERENCED_DIALOG inherit GB_OBJECT_STILL_REFERENCED_DIALOG_IMP redefine destroy end GB_CONSTANTS export {NONE} all undefine default_create, copy, is_equal end create make_with_object feature {NONE} -- Initialization components: GB_INTERNAL_COMPONENTS -- Access to a set of internal components for an EiffelBuild instance. make_with_object (an_object: GB_OBJECT; a_components: GB_INTERNAL_COMPONENTS) -- Create `Current' and associate `an_object'. require an_object_not_void: an_object /= Void do components := a_components object := an_object default_create object.instance_referers.start if an_object.instance_referers.count = 1 then error_label.set_text (cannot_delete_as_still_referenced_single + cannot_delete_as_still_referenced_part2) else error_label.set_text (cannot_delete_as_still_referenced_multiple + cannot_delete_as_still_referenced_part2) end end 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. local pixmap: EV_PIXMAP do pixmap := (create {EV_STOCK_PIXMAPS}).warning_pixmap.twin pixmap.set_minimum_size (pixmap.width, pixmap.height) pixmap_cell.extend (pixmap) set_default_push_button (flatten_all_instances_button) set_default_cancel_button (cancel_button) set_icon_pixmap (icon_build_window_color_png) ensure then pixmap_cell_full: pixmap_cell.full end user_create_interface_objects -- Create any auxilliary objects needed for MAIN_WINDOW. -- Initialization for these objects must be performed in `user_initialization'. do -- Create attached types defined in class here, initialize them in `user_initialization'. end feature {NONE} -- Implementation object: GB_OBJECT -- Object to which `Current' references. flatten_all_instances -- Called by `select_actions' of `flatten_all_instances_button'. local command_flatten: GB_COMMAND_FLATTEN_OBJECT current_object: GB_OBJECT linear_rep: ARRAYED_LIST [INTEGER] do linear_rep := object.instance_referers.linear_representation from linear_rep.start until linear_rep.off loop current_object := components.object_handler.deep_object_from_id (linear_rep.item) if not components.object_handler.deleted_objects.has (current_object.id) then create command_flatten.make (current_object, False, components) command_flatten.execute end linear_rep.forth end destroy end cancel_selected -- Called by `select_actions' of `cancel_button'. do destroy end destroy -- Destroy `Current'. do is_destroying := True Precursor {GB_OBJECT_STILL_REFERENCED_DIALOG_IMP} ensure then is_destroying: is_destroying end is_destroying: BOOLEAN -- Is `Current' in the process of destroying? invariant object_not_void: object /= Void object_has_instance_referers: not is_destroying implies not object.instance_referers.is_empty 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 GB_OBJECT_STILL_REFERENCED_DIALOG