/[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 62171 - (hide annotations)
Tue Aug 1 01:27:17 2006 UTC (13 years, 5 months ago) by larryl
File size: 4685 byte(s)
First commit docking tabbed Eiffel Studio.
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 larryl 62171 dial.show_modal_to_window (tool.develop_window.window)
51 bennob 47772 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 larryl 62171 dial.show_modal_to_window (tool.develop_window.window)
66 bennob 47772 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 paulb 60407 Result := pixmaps.icon_pixmaps.diagram_depth_of_relations_icon
95 manus 26913 end
96    
97 larryl 62171 pixel_buffer: EV_PIXEL_BUFFER is
98     -- Pixel buffer representing the command.
99     do
100     -- Currently there is no pixel buffer for this command.
101     end
102    
103 manus 26913 tooltip: STRING is
104     -- Tooltip for the toolbar button.
105     do
106 etienne 27345 Result := Interface_names.f_diagram_context_depth
107 manus 26913 end
108    
109 etienne 27345 menu_name: STRING is
110     -- Name for the menu entry.
111 manus 26913 do
112 etienne 27345 Result := Interface_names.m_diagram_context_depth
113 manus 26913 end
114 king 56753
115 manus 26913 name: STRING is "Context_depth"
116     -- Name of the command. Used to store the command in the
117     -- preferences.
118    
119     class_depth_dialog: EB_CONTEXT_DEPTH_DIALOG
120     -- Dialog to tweak depths on class views.
121    
122 manus 56535 cluster_depth_dialog: EB_CONTEXT_DEPTH_DIALOG;
123 manus 26913 -- Dialog to tweak depths on cluster views.
124 king 56753
125 manus 56535 indexing
126     copyright: "Copyright (c) 1984-2006, Eiffel Software"
127 manus 58027 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
128 manus 56535 licensing_options: "http://www.eiffel.com/licensing"
129     copying: "[
130     This file is part of Eiffel Software's Eiffel Development Environment.
131    
132     Eiffel Software's Eiffel Development Environment is free
133     software; you can redistribute it and/or modify it under
134     the terms of the GNU General Public License as published
135     by the Free Software Foundation, version 2 of the License
136     (available at the URL listed under "license" above).
137    
138     Eiffel Software's Eiffel Development Environment is
139     distributed in the hope that it will be useful, but
140     WITHOUT ANY WARRANTY; without even the implied warranty
141     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
142     See the GNU General Public License for more details.
143    
144     You should have received a copy of the GNU General Public
145     License along with Eiffel Software's Eiffel Development
146     Environment; if not, write to the Free Software Foundation,
147     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
148     ]"
149     source: "[
150     Eiffel Software
151     356 Storke Road, Goleta, CA 93117 USA
152     Telephone 805-685-1006, Fax 805-685-6869
153     Website http://www.eiffel.com
154     Customer support http://support.eiffel.com
155     ]"
156    
157 manus 26913 end -- class EB_SELECT_DEPTH_COMMAND
158    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23