/[eiffelstudio]/branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/commands/eb_select_depth_command.e
ViewVC logotype

Annotation of /branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/commands/eb_select_depth_command.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 58518 - (hide annotations)
Thu Apr 27 20:21:42 2006 UTC (13 years, 9 months ago) by tedf
Original Path: trunk/Src/Eiffel/interface/new_graphical/commands/eb_select_depth_command.e
File size: 4516 byte(s)
Modification of diagram tool for new configuration system.
1 manus 26913 indexing
2     description : "Command to change depth of relations."
3 manus 56535 legal: "See notice at end of class."
4     status: "See notice at end of class."
5 manus 26913 date : "$Date$"
6     revision : "$Revision$"
7    
8     class
9     EB_SELECT_DEPTH_COMMAND
10    
11     inherit
12     EB_CONTEXT_DIAGRAM_COMMAND
13 etienne 27345 redefine
14 bennob 47772 menu_name,
15     initialize
16 etienne 27345 end
17 king 56753
18 manus 26913 SHARED_ERROR_HANDLER
19    
20     create
21     make
22 king 56753
23 bennob 47772 feature {NONE} -- Initialization
24 king 56753
25 bennob 47772 initialize is
26     -- Initialize default values.
27     do
28     create accelerator.make_with_key_combination (
29 king 56753 create {EV_KEY}.make_with_code ({EV_KEY_CONSTANTS}.key_d),
30 bennob 47772 True, False, False)
31     accelerator.actions.extend (agent execute)
32     end
33 manus 26913
34     feature -- Basic operations
35    
36     execute is
37     -- User clicked on the button.
38     local
39 bennob 47280 cd: EIFFEL_CLUSTER_DIAGRAM
40 manus 26913 dial: EB_CONTEXT_DEPTH_DIALOG
41 bennob 47280 d: EIFFEL_CLASS_DIAGRAM
42     cg: ES_CLASS_GRAPH
43 manus 26913 do
44 bennob 47772 if is_sensitive then
45     d := tool.class_view
46     if d = Void then
47     cd := tool.cluster_view
48     create dial.make_for_cluster_view
49     dial.preset_for_cluster_view (cd)
50     dial.show_modal_to_window (tool.development_window.window)
51     if
52     not dial.cancelled
53     and
54     dial.supercluster_depth /= cd.model.supercluster_depth or
55     dial.subcluster_depth /= cd.model.subcluster_depth
56     then
57     history.wipe_out
58 king 56753 cd.model.set_supercluster_depth (dial.supercluster_depth)
59 bennob 47772 cd.model.set_subcluster_depth (dial.subcluster_depth)
60 tedf 58518 tool.create_cluster_view (cd.model.center_cluster.group, False)
61 bennob 47772 end
62     else
63     create dial.make_for_class_view
64     dial.preset_for_class_view (d)
65     dial.show_modal_to_window (tool.development_window.window)
66     cg := d.model
67     if
68     not dial.cancelled
69     and
70     (dial.ancestor_depth /= cg.ancestor_depth or
71     dial.descendant_depth /= cg.descendant_depth or
72     dial.client_depth /= cg.client_depth or
73     dial.supplier_depth /= cg.supplier_depth or
74     dial.all_classes_of_cluster /= cg.include_all_classes_of_cluster or
75     dial.only_classes_of_cluster /= cg.include_only_classes_of_cluster)
76     then
77     cg.set_ancestor_depth (dial.ancestor_depth)
78     cg.set_descendant_depth (dial.descendant_depth)
79     cg.set_client_depth (dial.client_depth)
80     cg.set_supplier_depth (dial.supplier_depth)
81     cg.set_include_all_classes_of_cluster (dial.all_classes_of_cluster)
82     cg.set_include_only_classes_of_cluster (dial.only_classes_of_cluster)
83     tool.create_class_view (cg.center_class.class_i, False)
84     end
85 etienne 26941 end
86 manus 26913 end
87     end
88    
89     feature {NONE} -- Implementation
90    
91 king 56753 pixmap: EV_PIXMAP is
92     -- Pixmap representing the command.
93 manus 26913 do
94     Result := Pixmaps.Icon_select_depth
95     end
96    
97     tooltip: STRING is
98     -- Tooltip for the toolbar button.
99     do
100 etienne 27345 Result := Interface_names.f_diagram_context_depth
101 manus 26913 end
102    
103 etienne 27345 menu_name: STRING is
104     -- Name for the menu entry.
105 manus 26913 do
106 etienne 27345 Result := Interface_names.m_diagram_context_depth
107 manus 26913 end
108 king 56753
109 manus 26913 name: STRING is "Context_depth"
110     -- Name of the command. Used to store the command in the
111     -- preferences.
112    
113     class_depth_dialog: EB_CONTEXT_DEPTH_DIALOG
114     -- Dialog to tweak depths on class views.
115    
116 manus 56535 cluster_depth_dialog: EB_CONTEXT_DEPTH_DIALOG;
117 manus 26913 -- Dialog to tweak depths on cluster views.
118 king 56753
119 manus 56535 indexing
120     copyright: "Copyright (c) 1984-2006, Eiffel Software"
121 manus 58027 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
122 manus 56535 licensing_options: "http://www.eiffel.com/licensing"
123     copying: "[
124     This file is part of Eiffel Software's Eiffel Development Environment.
125    
126     Eiffel Software's Eiffel Development Environment is free
127     software; you can redistribute it and/or modify it under
128     the terms of the GNU General Public License as published
129     by the Free Software Foundation, version 2 of the License
130     (available at the URL listed under "license" above).
131    
132     Eiffel Software's Eiffel Development Environment is
133     distributed in the hope that it will be useful, but
134     WITHOUT ANY WARRANTY; without even the implied warranty
135     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
136     See the GNU General Public License for more details.
137    
138     You should have received a copy of the GNU General Public
139     License along with Eiffel Software's Eiffel Development
140     Environment; if not, write to the Free Software Foundation,
141     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
142     ]"
143     source: "[
144     Eiffel Software
145     356 Storke Road, Goleta, CA 93117 USA
146     Telephone 805-685-1006, Fax 805-685-6869
147     Website http://www.eiffel.com
148     Customer support http://support.eiffel.com
149     ]"
150    
151 manus 26913 end -- class EB_SELECT_DEPTH_COMMAND
152    

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23