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

Contents of /branches/Eiffel_57_docking/Src/Eiffel/interface/new_graphical/commands/eb_new_feature_command.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62171 - (show annotations)
Tue Aug 1 01:27:17 2006 UTC (13 years, 4 months ago) by larryl
File size: 3844 byte(s)
First commit docking tabbed Eiffel Studio.
1 indexing
2 description : "Command to create a new feature."
3 legal: "See notice at end of class."
4 status: "See notice at end of class."
5 date : "$Date$"
6 revision : "$Revision$"
7
8 class
9 EB_NEW_FEATURE_COMMAND
10
11 inherit
12 EB_TOOLBARABLE_AND_MENUABLE_COMMAND
13 redefine
14 mini_pixmap,
15 tooltext,
16 pixel_buffer
17 end
18
19 EB_DEVELOPMENT_WINDOW_COMMAND
20
21 SHARED_WORKBENCH
22
23 create
24 make
25
26 feature -- Basic operations
27
28 execute is
29 -- Pop up feature wizard.
30 local
31 c: CLASSI_STONE
32 class_i: CLASS_I
33 cg: CLASS_TEXT_MODIFIER
34 wd: EV_WARNING_DIALOG
35 class_c: CLASS_C
36 retried: BOOLEAN
37 do
38 if retried then
39 create wd.make_with_text (Warning_messages.w_could_not_modify_class)
40 wd.show_modal_to_window (target.window)
41 else
42 if
43 Workbench.last_reached_degree <= 2
44 then
45 c ?= target.stone
46 if c /= Void then
47 class_i := c.class_i
48 if class_i /= Void then
49 class_c := class_i.compiled_class
50 if not class_i.is_read_only then
51 create cg.make (class_i)
52 cg.new_feature
53 else
54 create wd.make_with_text (Warning_messages.W_class_not_modifiable)
55 wd.show_modal_to_window (target.window)
56 end
57 end
58 end
59 else
60 create wd.make_with_text (Warning_messages.w_Unsufficient_compilation (3))
61 wd.show_modal_to_window (target.window)
62 end
63 end
64 rescue
65 retried := True
66 retry
67 end
68
69 feature -- Access
70
71 mini_pixmap: EV_PIXMAP is
72 -- Pixmap representing the command for mini toolbars.
73 do
74 Result := pixmaps.mini_pixmaps.new_feature_icon
75 end
76
77 feature {NONE} -- Implementation
78
79 menu_name: STRING is
80 -- Name as it appears in the menu (with & symbol).
81 do
82 Result := Interface_names.m_Create_new_feature
83 end
84
85 pixmap: EV_PIXMAP is
86 -- Pixmap representing the command.
87 do
88 Result := pixmaps.icon_pixmaps.new_feature_icon
89 end
90
91 pixel_buffer: EV_PIXEL_BUFFER is
92 -- Pixel buffer representing the command.
93 do
94 Result := pixmaps.icon_pixmaps.new_feature_icon_buffer
95 end
96
97 tooltip: STRING is
98 -- Tooltip for the toolbar button.
99 do
100 Result := Interface_names.f_Create_new_feature
101 end
102
103 tooltext: STRING is
104 -- Text for the toolbar button.
105 do
106 Result := Interface_names.b_Create_new_feature
107 end
108
109 description: STRING is
110 -- Description for this command.
111 do
112 Result := Interface_names.f_Create_new_feature
113 end
114
115 name: STRING is "New_feature";
116 -- Name of the command. Used to store the command in the
117 -- preferences.
118
119 indexing
120 copyright: "Copyright (c) 1984-2006, Eiffel Software"
121 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
122 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 end -- class EB_NEW_FEATURE_COMMAND

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23