note description: "Command to display suppliers of `current_class'." legal: "See notice at end of class." status: "See notice at end of class."; date: "$Date$"; revision: "$Revision $" class E_SHOW_SUPPLIERS inherit E_CLASS_CMD redefine criterion, domain_generator end create make, default_create feature -- Output work -- Execute Current command. local l_formatter: like text_formatter do text_formatter.add_new_line; if attached {QL_CLASS_DOMAIN} system_target_domain.new_domain (domain_generator) as l_domain then if not l_domain.is_empty then l_formatter := text_formatter l_domain.sort (agent class_name_tester) across l_domain as ic loop ic.item.class_c.append_signature (l_formatter, True) l_formatter.add_new_line end end else check is_class_domain: False end end end criterion: QL_CRITERION -- Criterion used in current command do create {QL_CLASS_SUPPLIER_RELATION_CRI} Result.make ( query_class_item_from_class_c (current_class).wrapped_domain, True, False, False) ensure then result_attached: Result /= Void end domain_generator: QL_DOMAIN_GENERATOR -- Domain generator used in current command do create {QL_CLASS_DOMAIN_GENERATOR}Result Result.set_criterion (criterion) Result.enable_fill_domain ensure then result_attached: Result /= Void end class_name_tester (class_a, class_b: QL_CLASS): BOOLEAN -- Compare name of `class_a' and `class_b'. require class_a_attached: class_a /= Void class_b_attached: class_b /= Void do Result := class_a.name < class_b.name end note copyright: "Copyright (c) 1984-2018, 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 5949 Hollister Ave., 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 E_SHOW_SUPPLIERS