/[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 47772 - (hide annotations)
Sat Jan 22 00:01:58 2005 UTC (14 years, 11 months ago) by bennob
Original Path: trunk/Src/bench/Eiffel/interface/new_graphical/commands/eb_select_depth_command.e
File size: 3188 byte(s)
Keyboard shortcuts for all diagram commands.

1 manus 26913 indexing
2     description : "Command to change depth of relations."
3     date : "$Date$"
4     revision : "$Revision$"
5    
6     class
7     EB_SELECT_DEPTH_COMMAND
8    
9     inherit
10     EB_CONTEXT_DIAGRAM_COMMAND
11 etienne 27345 redefine
12 bennob 47772 menu_name,
13     initialize
14 etienne 27345 end
15 manus 26913
16     SHARED_ERROR_HANDLER
17    
18     create
19     make
20 bennob 47772
21     feature {NONE} -- Initialization
22    
23     initialize is
24     -- Initialize default values.
25     do
26     create accelerator.make_with_key_combination (
27     create {EV_KEY}.make_with_code (key_constants.key_d),
28     True, False, False)
29     accelerator.actions.extend (agent execute)
30     end
31 manus 26913
32     feature -- Basic operations
33    
34     execute is
35     -- User clicked on the button.
36     local
37 bennob 47280 cd: EIFFEL_CLUSTER_DIAGRAM
38 manus 26913 dial: EB_CONTEXT_DEPTH_DIALOG
39 bennob 47280 d: EIFFEL_CLASS_DIAGRAM
40     cg: ES_CLASS_GRAPH
41 manus 26913 do
42 bennob 47772 if is_sensitive then
43     d := tool.class_view
44     if d = Void then
45     cd := tool.cluster_view
46     create dial.make_for_cluster_view
47     dial.preset_for_cluster_view (cd)
48     dial.show_modal_to_window (tool.development_window.window)
49     if
50     not dial.cancelled
51     and
52     dial.supercluster_depth /= cd.model.supercluster_depth or
53     dial.subcluster_depth /= cd.model.subcluster_depth
54     then
55     history.wipe_out
56     cd.model.set_supercluster_depth (dial.supercluster_depth)
57     cd.model.set_subcluster_depth (dial.subcluster_depth)
58     tool.create_cluster_view (cd.model.center_cluster.cluster_i, False)
59     end
60     else
61     create dial.make_for_class_view
62     dial.preset_for_class_view (d)
63     dial.show_modal_to_window (tool.development_window.window)
64     cg := d.model
65     if
66     not dial.cancelled
67     and
68     (dial.ancestor_depth /= cg.ancestor_depth or
69     dial.descendant_depth /= cg.descendant_depth or
70     dial.client_depth /= cg.client_depth or
71     dial.supplier_depth /= cg.supplier_depth or
72     dial.all_classes_of_cluster /= cg.include_all_classes_of_cluster or
73     dial.only_classes_of_cluster /= cg.include_only_classes_of_cluster)
74     then
75     cg.set_ancestor_depth (dial.ancestor_depth)
76     cg.set_descendant_depth (dial.descendant_depth)
77     cg.set_client_depth (dial.client_depth)
78     cg.set_supplier_depth (dial.supplier_depth)
79     cg.set_include_all_classes_of_cluster (dial.all_classes_of_cluster)
80     cg.set_include_only_classes_of_cluster (dial.only_classes_of_cluster)
81     tool.create_class_view (cg.center_class.class_i, False)
82     end
83 etienne 26941 end
84 manus 26913 end
85     end
86    
87     feature {NONE} -- Implementation
88    
89     pixmap: ARRAY [EV_PIXMAP] is
90     -- Pixmaps representing the command (one for the
91     -- gray version, one for the color version).
92     do
93     Result := Pixmaps.Icon_select_depth
94     end
95    
96     tooltip: STRING is
97     -- Tooltip for the toolbar button.
98     do
99 etienne 27345 Result := Interface_names.f_diagram_context_depth
100 manus 26913 end
101    
102 etienne 27345 menu_name: STRING is
103     -- Name for the menu entry.
104 manus 26913 do
105 etienne 27345 Result := Interface_names.m_diagram_context_depth
106 manus 26913 end
107 etienne 27345
108 manus 26913 name: STRING is "Context_depth"
109     -- Name of the command. Used to store the command in the
110     -- preferences.
111    
112     class_depth_dialog: EB_CONTEXT_DEPTH_DIALOG
113     -- Dialog to tweak depths on class views.
114    
115     cluster_depth_dialog: EB_CONTEXT_DEPTH_DIALOG
116     -- Dialog to tweak depths on cluster views.
117    
118     end -- class EB_SELECT_DEPTH_COMMAND
119    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23