/[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 56535 - (hide annotations)
Tue Jan 17 01:37:10 2006 UTC (14 years ago) by manus
Original Path: trunk/Src/bench/Eiffel/interface/new_graphical/commands/eb_select_depth_command.e
File size: 4594 byte(s)
Added text of the GPL license to all classes of the compiler.

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 manus 26913
18     SHARED_ERROR_HANDLER
19    
20     create
21     make
22 bennob 47772
23     feature {NONE} -- Initialization
24    
25     initialize is
26     -- Initialize default values.
27     do
28     create accelerator.make_with_key_combination (
29     create {EV_KEY}.make_with_code (key_constants.key_d),
30     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     cd.model.set_supercluster_depth (dial.supercluster_depth)
59     cd.model.set_subcluster_depth (dial.subcluster_depth)
60     tool.create_cluster_view (cd.model.center_cluster.cluster_i, False)
61     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     pixmap: ARRAY [EV_PIXMAP] is
92     -- Pixmaps representing the command (one for the
93     -- gray version, one for the color version).
94     do
95     Result := Pixmaps.Icon_select_depth
96     end
97    
98     tooltip: STRING is
99     -- Tooltip for the toolbar button.
100     do
101 etienne 27345 Result := Interface_names.f_diagram_context_depth
102 manus 26913 end
103    
104 etienne 27345 menu_name: STRING is
105     -- Name for the menu entry.
106 manus 26913 do
107 etienne 27345 Result := Interface_names.m_diagram_context_depth
108 manus 26913 end
109 etienne 27345
110 manus 26913 name: STRING is "Context_depth"
111     -- Name of the command. Used to store the command in the
112     -- preferences.
113    
114     class_depth_dialog: EB_CONTEXT_DEPTH_DIALOG
115     -- Dialog to tweak depths on class views.
116    
117 manus 56535 cluster_depth_dialog: EB_CONTEXT_DEPTH_DIALOG;
118 manus 26913 -- Dialog to tweak depths on cluster views.
119    
120 manus 56535 indexing
121     copyright: "Copyright (c) 1984-2006, Eiffel Software"
122     license: "GPL version 2 see http://www.eiffel.com/licensing/gpl.txt)"
123     licensing_options: "http://www.eiffel.com/licensing"
124     copying: "[
125     This file is part of Eiffel Software's Eiffel Development Environment.
126    
127     Eiffel Software's Eiffel Development Environment is free
128     software; you can redistribute it and/or modify it under
129     the terms of the GNU General Public License as published
130     by the Free Software Foundation, version 2 of the License
131     (available at the URL listed under "license" above).
132    
133     Eiffel Software's Eiffel Development Environment is
134     distributed in the hope that it will be useful, but
135     WITHOUT ANY WARRANTY; without even the implied warranty
136     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
137     See the GNU General Public License for more details.
138    
139     You should have received a copy of the GNU General Public
140     License along with Eiffel Software's Eiffel Development
141     Environment; if not, write to the Free Software Foundation,
142     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
143     ]"
144     source: "[
145     Eiffel Software
146     356 Storke Road, Goleta, CA 93117 USA
147     Telephone 805-685-1006, Fax 805-685-6869
148     Website http://www.eiffel.com
149     Customer support http://support.eiffel.com
150     ]"
151    
152 manus 26913 end -- class EB_SELECT_DEPTH_COMMAND
153    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23