17 |
EB_TOOLBARABLE_AND_MENUABLE_COMMAND |
EB_TOOLBARABLE_AND_MENUABLE_COMMAND |
18 |
redefine |
redefine |
19 |
new_toolbar_item, |
new_toolbar_item, |
20 |
|
new_sd_toolbar_item, |
21 |
tooltext |
tooltext |
22 |
end |
end |
23 |
|
|
55 |
Result.drop_actions.set_veto_pebble_function (agent is_droppable) |
Result.drop_actions.set_veto_pebble_function (agent is_droppable) |
56 |
end |
end |
57 |
|
|
58 |
|
new_sd_toolbar_item (display_text: BOOLEAN): EB_SD_COMMAND_TOOL_BAR_BUTTON is |
59 |
|
-- Create a new toolbar button for this command. |
60 |
|
do |
61 |
|
Result := Precursor (display_text) |
62 |
|
Result.drop_actions.extend (agent drop (?)) |
63 |
|
Result.drop_actions.set_veto_pebble_function (agent is_droppable) |
64 |
|
end |
65 |
|
|
66 |
feature {NONE} -- Update |
feature {NONE} -- Update |
67 |
|
|
68 |
drop (s: STONE) is |
drop (s: STONE) is |
165 |
end |
end |
166 |
|
|
167 |
execute is |
execute is |
168 |
|
-- Redefine |
169 |
local |
local |
170 |
req: COMMAND_EXECUTOR |
req: COMMAND_EXECUTOR |
171 |
cmd_string: STRING |
cmd_string: STRING |
176 |
empty: BOOLEAN |
empty: BOOLEAN |
177 |
do |
do |
178 |
development_window := target |
development_window := target |
179 |
editor := development_window.editor_tool.text_area |
editor := development_window.editors_manager.current_editor |
180 |
if editor /= Void then |
if editor /= Void then |
181 |
empty := editor.is_empty |
empty := editor.is_empty |
182 |
|
|
202 |
if not empty then |
if not empty then |
203 |
cmd_string.replace_substring_all ("$line", line_nb.out) |
cmd_string.replace_substring_all ("$line", line_nb.out) |
204 |
else |
else |
205 |
cmd_string.replace_substring_all ("$line", "1") |
cmd_string.replace_substring_all ("$line", once "") |
206 |
end |
end |
207 |
create req |
create req |
208 |
req.execute (cmd_string) |
req.execute (cmd_string) |
241 |
Result := pixmaps.icon_pixmaps.command_send_to_external_editor_icon |
Result := pixmaps.icon_pixmaps.command_send_to_external_editor_icon |
242 |
end |
end |
243 |
|
|
244 |
|
pixel_buffer: EV_PIXEL_BUFFER is |
245 |
|
-- Pixel buffer representing the command. |
246 |
|
do |
247 |
|
Result := pixmaps.icon_pixmaps.command_send_to_external_editor_icon_buffer |
248 |
|
end |
249 |
|
|
250 |
tooltip: STRING is |
tooltip: STRING is |
251 |
-- Tooltip for the toolbar button. |
-- Tooltip for the toolbar button. |
252 |
do |
do |