/[eiffelstudio]/branches/eth/eve/Src/Eiffel/interface/graphical/tools/autodebug/panels/es_adb_panel_faults.e
ViewVC logotype

Contents of /branches/eth/eve/Src/Eiffel/interface/graphical/tools/autodebug/panels/es_adb_panel_faults.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 95332 - (show annotations)
Fri Jun 27 12:57:49 2014 UTC (5 years, 3 months ago) by maxpei
File size: 25223 byte(s)
Fixed a few bugs in AutoFix and AutoDebug.
1
2 class ES_ADB_PANEL_FAULTS
3
4 inherit
5
6 ES_ADB_PANEL_FAULTS_IMP
7 redefine
8 propogate_values_from_ui_to_config,
9 propogate_values_from_config_to_ui
10 end
11
12 ES_ADB_ACTIONS
13 undefine
14 copy,
15 default_create,
16 is_equal
17 end
18
19 create
20 make
21
22 feature{NONE} -- Initialization
23
24 make (a_tool: like tool_panel)
25 -- Initialization
26 require
27 a_tool /= Void
28 do
29 set_tool_panel (a_tool)
30 default_create
31
32 clear_information_display_widget
33 enable_information_display_widget (False)
34 enable_command_invocation_widget (False)
35
36 register_event_handlers
37
38 Info_center.extend (Current)
39 end
40
41 feature{NONE} -- Update GUI
42
43 clear_information_display_widget
44 -- Clear all information displayed on panel.
45 do
46 evgrid_faults.remove_rows (1, evgrid_faults.row_count)
47 end
48
49 enable_information_display_widget (a_flag: BOOLEAN)
50 -- Enable/Disable the widgets related to information display.
51 do
52 if a_flag then
53 evgrid_faults.enable_sensitive
54 evbutton_filter_by_approachability.enable_sensitive
55 evbutton_filter_by_fixes.enable_sensitive
56 else
57 evgrid_faults.disable_sensitive
58 evbutton_filter_by_approachability.disable_sensitive
59 evbutton_filter_by_fixes.disable_sensitive
60 end
61 end
62
63 enable_command_invocation_widget (a_flag: BOOLEAN)
64 -- Enable/Disable the widgets related to command invocation.
65 do
66 if a_flag then
67 if has_to_be_attempted then
68 evbutton_fix_all_to_be_attempted.enable_sensitive
69 else
70 evbutton_fix_all_to_be_attempted.disable_sensitive
71 end
72
73 if attached {ES_ADB_FAULT} selected_fault_in_grid as lt_fault and then is_fault_approachable (lt_fault) then
74 evbutton_fix_selected.enable_sensitive
75 else
76 evbutton_fix_selected.disable_sensitive
77 end
78 else
79 evbutton_fix_all_to_be_attempted.disable_sensitive
80 evbutton_fix_selected.disable_sensitive
81 end
82 end
83
84 clear_internal_state
85 -- Clear panel internal state.
86 do
87 fault_to_row_table_internal := Void
88 feature_to_row_table_internal := Void
89 end
90
91 feature -- ADB Actions
92
93 on_project_loaded
94 -- <Precursor>
95 do
96 enable_information_display_widget (True)
97 enable_command_invocation_widget (True)
98 end
99
100 on_project_unloaded
101 -- <Precursor>
102 do
103 clear_information_display_widget
104 clear_internal_state
105 enable_information_display_widget (False)
106 enable_command_invocation_widget (False)
107 end
108
109 on_compile_start
110 -- <Precursor>
111 do
112 end
113
114 on_compile_stop
115 -- <Precursor>
116 do
117 end
118
119 on_debugging_start
120 -- <Precursor>
121 do
122 clear_information_display_widget
123 clear_internal_state
124 enable_command_invocation_widget (False)
125 end
126
127 on_debugging_stop
128 -- <Precursor>
129 do
130 enable_command_invocation_widget (True)
131 update_has_to_be_attempted
132 end
133
134 on_testing_start
135 -- <Precursor>
136 do
137 end
138
139 on_test_case_generated (a_test: ES_ADB_TEST)
140 -- <Precursor>
141 local
142 l_label_item: EV_GRID_LABEL_ITEM
143 l_signature: EPA_TEST_CASE_SIGNATURE
144 l_feature_under_test_str: STRING
145 l_feature_under_test: EPA_FEATURE_WITH_CONTEXT_CLASS
146 l_index, l_count, l_insert_position: INTEGER
147 l_row, l_row_for_feature, l_row_for_fault: EV_GRID_ROW
148 l_fault: ES_ADB_FAULT
149 l_was_row_visible, l_was_sub_row_visible: BOOLEAN
150 l_text: STRING
151 l_left_par_index, l_right_par_index: INTEGER
152 l_is_new_feature_row, l_is_new_fault_row: BOOLEAN
153 do
154 l_signature := a_test.test_case_signature
155 l_feature_under_test_str := l_signature.class_and_feature_under_test
156
157 -- Locate the row corresponding to the feature
158 if feature_to_row_table.has (l_feature_under_test_str) then
159 l_row_for_feature := feature_to_row_table.item (l_feature_under_test_str)
160 end
161
162 if l_signature.is_passing and then l_row_for_feature /= Void then
163 -- Update number of passing tests for the feature
164 check attached {EV_GRID_LABEL_ITEM} l_row_for_feature.item (column_passing) as lt_label_item then
165 lt_label_item.set_text ((lt_label_item.text.to_integer + 1).out)
166 end
167
168 elseif l_signature.is_failing then
169 l_fault := info_center.fault_with_signature (l_signature, True)
170
171 if l_row_for_feature = Void then
172 l_is_new_feature_row := True
173 l_count := evgrid_faults.row_count
174 l_insert_position := first_row (evgrid_faults,
175 agent (a_row: EV_GRID_ROW; a_feature_str: STRING): BOOLEAN
176 do Result := attached {STRING} a_row.data as lt_feature_str and then lt_feature_str.is_greater_equal (a_feature_str) end (?, l_feature_under_test_str))
177 if l_insert_position = 0 then
178 l_insert_position := evgrid_faults.row_count + 1
179 end
180 -- Insert a row at the right position for the feature
181 evgrid_faults.set_row_count_to (l_count + 1)
182 l_row_for_feature := evgrid_faults.row (l_count + 1)
183 l_row_for_feature.set_data (l_feature_under_test_str)
184 evgrid_faults.move_row (l_count + 1, l_insert_position)
185 feature_to_row_table.force (l_row_for_feature, l_feature_under_test_str)
186
187 create l_label_item.make_with_text (l_feature_under_test_str)
188 l_label_item.align_text_left
189 l_row_for_feature.set_item (column_class_and_feature_under_test, l_label_item)
190
191 create l_label_item.make_with_text ("0")
192 l_row_for_feature.set_item (column_fault, l_label_item)
193
194 -- create l_feature_under_test.make_from_names (l_signature.feature_under_test, l_signature.class_under_test)
195 create l_label_item.make_with_text (info_center.passing_test_case_count_for_feature (l_signature.class_and_feature_under_test).out)
196 l_row_for_feature.set_item (column_passing, l_label_item)
197
198 create l_label_item.make_with_text ("0")
199 l_row_for_feature.set_item (column_failing, l_label_item)
200
201 create l_label_item.make_with_text ("")
202 l_row_for_feature.set_item (column_status, l_label_item)
203
204 create l_label_item.make_with_text ("")
205 l_row_for_feature.set_item (column_info, l_label_item)
206 end
207
208 if fault_to_row_table.has (l_fault) then
209 l_row_for_fault := fault_to_row_table.item (l_fault)
210 else
211 l_is_new_fault_row := True
212 -- Locate the subrow for fault
213 l_count := l_row_for_feature.subrow_count
214 l_insert_position := first_subrow (l_row_for_feature,
215 agent (a_subrow: EV_GRID_ROW; a_sig_id: STRING): BOOLEAN do Result := attached {ES_ADB_FAULT} a_subrow.data as lt_fault and then lt_fault.signature.id.is_greater_equal (a_sig_id) end (?, a_test.test_case_signature.id))
216 if l_insert_position = 0 then
217 l_insert_position := l_row_for_feature.subrow_count + 1
218 end
219
220 l_row_for_feature.insert_subrow (l_insert_position)
221 l_row_for_fault := l_row_for_feature.subrow (l_insert_position)
222 fault_to_row_table.force (l_row_for_fault, l_fault)
223 l_row_for_fault.set_data (l_fault)
224
225 l_row_for_fault.set_item (column_class_and_feature_under_test, create {EV_GRID_LABEL_ITEM}.make_with_text (""))
226
227 create l_label_item.make_with_text (l_signature.id)
228 l_row_for_fault.set_item (column_fault, l_label_item)
229
230 l_row_for_fault.set_item (column_passing, create {EV_GRID_LABEL_ITEM}.make_with_text (""))
231
232 create l_label_item.make_with_text ("0")
233 l_row_for_fault.set_item (column_failing, l_label_item)
234
235 l_row_for_fault.set_item (column_status, create {EV_GRID_LABEL_ITEM}.make_with_text (l_fault.status_string))
236
237 l_row_for_fault.set_item (column_info, create {EV_GRID_LABEL_ITEM}.make_with_text (l_signature.out))
238
239 end
240
241 check attached {EV_GRID_LABEL_ITEM} l_row_for_fault.item (column_failing) as lt_label_item then
242 lt_label_item.set_text ((lt_label_item.text.to_integer + 1).out)
243 end
244 if l_is_new_fault_row then
245 if is_fault_visible (l_fault) then
246 l_row_for_fault.show
247 -- #(failing tests) of the feature + 1
248 check attached {EV_GRID_LABEL_ITEM} l_row_for_feature.item (column_failing) as lt_label_item then
249 lt_label_item.set_text ((lt_label_item.text.to_integer + 1).out)
250 end
251 -- #(faults) of the feature + 1
252 check attached {EV_GRID_LABEL_ITEM} l_row_for_feature.item (column_fault) as lt_label_item then
253 lt_label_item.set_text ((lt_label_item.text.to_integer + 1).out)
254 end
255 else
256 l_row_for_fault.hide
257 end
258 if not has_to_be_attempted then
259 update_has_to_be_attempted
260 end
261 end
262 -- if is_fault_visible (l_fault) then
263 -- if l_is_new_fault_row then
264 -- l_row_for_fault.show
265 -- else
266 -- l_row_for_fault.hide
267 -- end
268 -- else
269 -- l_
270 -- end
271 -- if is_fault_visible (l_fault) then
272
273 -- update_feature_row (l_row_for_feature)
274 -- end
275 end
276 end
277
278 on_testing_stop
279 -- <Precursor>
280 do
281 end
282
283 on_fixing_start (a_fault: ES_ADB_FAULT)
284 -- <Precursor>
285 do
286 update_fault_status (a_fault)
287 end
288
289 on_fixing_stop
290 -- <Precursor>
291 do
292 end
293
294 on_continuation_debugging_start
295 -- <Precursor>
296 do
297 tool_panel.set_external_process_running (True)
298 tool_panel.save_settings
299 enable_command_invocation_widget (False)
300 end
301
302 on_continuation_debugging_stop
303 -- <Precursor>
304 do
305 tool_panel.set_external_process_running (False)
306 enable_command_invocation_widget (True)
307 evbutton_fix_selected.set_text (button_text_fix_selected)
308 end
309
310 on_valid_fix_found (a_fix: ES_ADB_FIX)
311 -- <Precursor>
312 local
313 l_fault: ES_ADB_FAULT
314 l_row: EV_GRID_ROW
315 do
316 update_fault_status (a_fix.fault)
317 end
318
319 on_fix_applied (a_fix: ES_ADB_FIX)
320 -- <Precursor>
321 local
322 l_fault: ES_ADB_FAULT
323 l_row: EV_GRID_ROW
324 do
325 update_fault_status (a_fix.fault)
326 update_has_to_be_attempted
327 if attached evgrid_faults.selected_rows as lt_rows and then not lt_rows.is_empty and then attached {ES_ADB_FAULT} lt_rows.first.data as lt_fault then
328 on_row_selected (lt_rows.first)
329 end
330 end
331
332 on_output (a_line: STRING)
333 -- <Precursor>
334 do
335 end
336
337 feature{NONE} -- ADB action implementation
338
339 update_fault_status (a_fault: ES_ADB_FAULT)
340 -- Update the status display of `a_fault'.
341 require
342 a_fault /= Void and then fault_to_row_table.has (a_fault)
343 local
344 l_row: EV_GRID_ROW
345 do
346 if fault_to_row_table.has (a_fault) then
347 l_row := fault_to_row_table.item (a_fault)
348 check attached {EV_GRID_LABEL_ITEM} l_row.item (column_status) as lt_label_item then
349 lt_label_item.set_text (a_fault.status_string)
350 end
351 end
352 end
353
354 feature{NONE} -- GUI actions
355
356 register_event_handlers
357 -- Register event handlers for the panel.
358 do
359 evgrid_faults.row_select_actions.extend (agent on_row_selected)
360 evgrid_faults.row_deselect_actions.extend (agent on_row_deselected)
361 evgrid_faults.pointer_double_press_item_actions.extend (agent on_grid_events_item_pointer_double_press)
362
363 evmenucheck_implementation_fixable.select_actions.extend (agent on_visibility_changed)
364 evmenucheck_contract_fixable.select_actions.extend (agent on_visibility_changed)
365 evmenucheck_not_fixable.select_actions.extend (agent on_visibility_changed)
366
367 evmenucheck_not_yet_attempted.select_actions.extend (agent on_visibility_changed)
368 evmenucheck_candidate_fix_available.select_actions.extend (agent on_visibility_changed)
369 evmenucheck_candidate_fix_unavailable.select_actions.extend (agent on_visibility_changed)
370 evmenucheck_candidate_fix_accepted.select_actions.extend (agent on_visibility_changed)
371 evmenucheck_manually_fixed.select_actions.extend (agent on_visibility_changed)
372
373 evbutton_fix_selected.select_actions.extend (agent on_fix_selected)
374 evbutton_fix_all_to_be_attempted.select_actions.extend (agent on_fix_all_to_be_attempted)
375 end
376
377 on_row_selected (a_row: EV_GRID_ROW)
378 -- Action to perform when `a_row' is selected.
379 local
380 l_fault: ES_ADB_FAULT
381 do
382 if not tool_panel.is_external_process_running then
383 if attached {ES_ADB_FAULT} a_row.data as lt_fault and then is_fault_approachable (lt_fault) and then not lt_fault.is_fixed then
384 evbutton_fix_selected.enable_sensitive
385 else
386 evbutton_fix_selected.disable_sensitive
387 end
388 end
389 end
390
391 on_row_deselected (a_row: EV_GRID_ROW)
392 -- Action to perform when `a_row' is deselected.
393 do
394 evbutton_fix_selected.disable_sensitive
395 end
396
397 on_grid_events_item_pointer_double_press (a_x: INTEGER_32; a_y: INTEGER_32; a_button: INTEGER_32; a_item: EV_GRID_ITEM)
398 -- Action to perform when user double press on the grid.
399 local
400 do
401 if a_item /= Void and then attached a_item.row as lt_row then
402 if attached {ES_ADB_FAULT} lt_row.data as lt_fault then
403 if not lt_fault.fixes.is_empty then
404 -- Switch to panel fix and show corresponding fixes.
405 end
406 end
407 end
408 end
409
410 on_visibility_changed
411 -- Action to perform when the filtering condition is changed.
412 local
413 l_index, l_count, l_sub_index, l_sub_count: INTEGER
414 l_visible_sub_rows: INTEGER
415 l_row, l_sub_row: EV_GRID_ROW
416 do
417 config.set_show_implementation_fixable (evmenucheck_implementation_fixable.is_selected)
418 config.set_show_contract_fixable (evmenucheck_contract_fixable.is_selected)
419 config.set_show_not_fixable (evmenucheck_not_fixable.is_selected)
420
421 config.set_show_not_yet_attempted (evmenucheck_not_yet_attempted.is_selected)
422 config.set_show_candidate_fix_available (evmenucheck_candidate_fix_available.is_selected)
423 config.set_show_candidate_fix_unavailable (evmenucheck_candidate_fix_unavailable.is_selected)
424 config.set_show_candidate_fix_accepted (evmenucheck_candidate_fix_accepted.is_selected)
425 config.set_show_manually_fixed (evmenucheck_candidate_fix_accepted.is_selected)
426
427 from
428 l_index := 1
429 l_count := evgrid_faults.row_count
430 until
431 l_index > l_count
432 loop
433 l_row := evgrid_faults.row (l_index)
434 if attached {STRING} l_row.data as lt_feature then
435 update_feature_row (l_row)
436 elseif attached {ES_ADB_FAULT} l_row.data as lt_fault then
437 -- Do nothing. Such rows are handled as subrows.
438 end
439
440 l_index := l_index + 1
441 end
442 end
443
444 on_fix_selected
445 -- Action to perform when `AutoFix selected' button is clicked.
446 local
447 l_text: STRING
448 l_fault: ES_ADB_FAULT
449 l_faults: DS_ARRAYED_LIST [ES_ADB_FAULT]
450 l_should_continue: BOOLEAN
451 l_fixing_task: ES_ADB_PROCESS_SEQUENCE_FOR_FIXING
452 do
453 l_text := evbutton_fix_selected.text
454 if l_text ~ Button_text_fix_selected then
455 l_fault := selected_fault_in_grid
456 check l_fault /= Void then
457 if l_fault.is_not_yet_attempted then
458 l_should_continue := True
459 else
460 l_should_continue := is_approved_by_user ({ES_ADB_INTERFACE_STRINGS}.Msg_discard_existing_fixing_results)
461 end
462 if l_should_continue then
463 info_center.on_continuation_debugging_start
464 evbutton_fix_selected.set_text (Button_text_fix_selected_stop)
465 evbutton_fix_selected.enable_sensitive
466
467 create l_faults.make_equal (1)
468 l_faults.force_last (l_fault)
469
470 create l_fixing_task.make (l_faults, True)
471 create forwarding_task.make (l_fixing_task)
472 forwarding_task.on_terminate_actions.extend (agent info_center.on_continuation_debugging_stop)
473 forwarding_task.start
474
475 end
476 end
477
478 elseif l_text ~ Button_text_fix_selected_stop then
479 forwarding_task.cancel
480 info_center.on_continuation_debugging_stop
481 end
482 end
483
484 on_fix_all_to_be_attempted
485 -- Action to perform when 'AutoFix all' is clicked.
486 local
487 l_text: STRING
488 l_all_to_be_attempted: DS_ARRAYED_LIST [ES_ADB_FAULT]
489 l_cursor: DS_HASH_TABLE_CURSOR [ES_ADB_FAULT, EPA_TEST_CASE_SIGNATURE]
490 l_fixing_task: ES_ADB_PROCESS_SEQUENCE_FOR_FIXING
491 do
492 l_text := evbutton_fix_all_to_be_attempted.text
493 if l_text ~ Button_text_fix_all then
494 info_center.on_continuation_debugging_start
495 evbutton_fix_all_to_be_attempted.set_text (button_text_fix_all_stop)
496 evbutton_fix_all_to_be_attempted.enable_sensitive
497
498 -- Collect the faults to be attempted.
499 create l_all_to_be_attempted.make_equal (info_center.fault_repository.count)
500 from
501 l_cursor := info_center.fault_repository.new_cursor
502 l_cursor.start
503 until
504 l_cursor.after
505 loop
506 if is_fault_to_be_attempted_and_approachable (l_cursor.item) then
507 l_all_to_be_attempted.force_last (l_cursor.item)
508 end
509 l_cursor.forth
510 end
511
512 if not l_all_to_be_attempted.is_empty then
513 create l_fixing_task.make (l_all_to_be_attempted, True)
514 create forwarding_task.make (l_fixing_task)
515 forwarding_task.on_terminate_actions.extend (agent do info_center.on_continuation_debugging_stop; evbutton_fix_all_to_be_attempted.set_text (button_text_fix_all) end)
516 forwarding_task.start
517
518 else
519 info_center.on_continuation_debugging_stop
520 evbutton_fix_all_to_be_attempted.set_text (button_text_fix_all)
521 end
522 else
523 forwarding_task.cancel
524 info_center.on_continuation_debugging_stop
525 end
526 end
527
528 feature{NONE} -- GUI action implementation
529
530 is_fault_approachable (a_fault: ES_ADB_FAULT): BOOLEAN
531 -- Is `a_fault' AutoFix-able?
532 require
533 a_fault /= Void
534 do
535 Result := not a_fault.is_fixed and then a_fault.is_approachable_per_config (config)
536 end
537
538 is_fault_visible (a_fault: ES_ADB_FAULT): BOOLEAN
539 -- Is `a_fault' visible according to the current filter?
540 do
541 Result := (a_fault.is_exception_type_in_scope_of_contract_fixing and then config.should_show_contract_fixable
542 or else a_fault.is_exception_type_in_scope_of_implementation_fixing and then config.should_show_implementation_fixable
543 or else not a_fault.is_exception_type_in_scope_of_contract_fixing and then not a_fault.is_exception_type_in_scope_of_implementation_fixing and then config.should_show_not_fixable)
544 and then
545 (a_fault.is_not_yet_attempted and then config.should_show_not_yet_attempted
546 or else a_fault.is_candidate_fix_available and then config.should_show_candidate_fix_available
547 or else a_fault.is_candidate_fix_unavailable and then config.should_show_candidate_fix_unavailable
548 or else a_fault.is_candidate_fix_accepted and then config.should_show_candidate_fix_accepted
549 or else a_fault.is_manually_fixed and then config.should_show_manually_fixed)
550 end
551
552
553 update_feature_row (a_row: EV_GRID_ROW)
554 -- Update feature information at `a_row'.
555 require
556 a_row /= Void and then attached {STRING} a_row.data
557 local
558 l_index, l_count, l_sub_index, l_sub_count: INTEGER
559 l_visible_sub_rows: INTEGER
560 l_total_failing_tests: INTEGER
561 l_row, l_sub_row: EV_GRID_ROW
562 do
563 check attached {STRING} a_row.data as lt_feature then
564 from
565 l_sub_index := 1
566 l_sub_count := a_row.subrow_count
567 l_visible_sub_rows := 0
568 until
569 l_sub_index > l_sub_count
570 loop
571 l_sub_row := a_row.subrow (l_sub_index)
572 check attached {ES_ADB_FAULT} l_sub_row.data as lt_fault then
573 if is_fault_visible (lt_fault) then
574 l_sub_row.show
575 l_visible_sub_rows := l_visible_sub_rows + 1
576 else
577 l_sub_row.hide
578 end
579 end
580 l_sub_index := l_sub_index + 1
581 end
582
583 if l_visible_sub_rows = 0 then
584 a_row.hide
585 else
586 check attached {EV_GRID_LABEL_ITEM} a_row.item (column_fault) as lt_label_item then
587 lt_label_item.set_text (l_visible_sub_rows.out)
588 end
589 a_row.show
590 end
591 end
592 end
593
594 selected_fault_in_grid: ES_ADB_FAULT
595 -- Fault currently selected in grid.
596 do
597 if attached evgrid_faults.selected_rows as lt_rows and then not lt_rows.is_empty and then attached {ES_ADB_FAULT} lt_rows.first.data as lt_fault then
598 Result := lt_fault
599 end
600 end
601
602 set_has_to_be_attempted (a_flag: BOOLEAN)
603 -- Set `has_to_be_attempted' with `a_flag'.
604 -- Enable/Disable `evbutton_fix_all_to_be_attempted' accordingly.
605 do
606 has_to_be_attempted := a_flag
607 if not tool_panel.is_external_process_running then
608 if has_to_be_attempted then
609 evbutton_fix_all_to_be_attempted.enable_sensitive
610 else
611 evbutton_fix_all_to_be_attempted.disable_sensitive
612 end
613 end
614 end
615
616
617 is_fault_to_be_attempted_and_approachable (a_fault: ES_ADB_FAULT): BOOLEAN
618 -- Is `a_fault' to-be-attempted, and approachable with `config'?
619 do
620 Result := a_fault.is_not_yet_attempted and then a_fault.is_approachable_per_config (config)
621 end
622
623 update_has_to_be_attempted
624 -- Update `has_to_be_attempted' to reflect the status of faults in grid.
625 local
626 l_has_to_be_attempted: BOOLEAN
627 l_fault_cursor: DS_HASH_TABLE_CURSOR [ES_ADB_FAULT, EPA_TEST_CASE_SIGNATURE]
628 l_fault: ES_ADB_FAULT
629 do
630 from
631 l_has_to_be_attempted := False
632 l_fault_cursor := info_center.fault_repository.new_cursor
633 l_fault_cursor.start
634 until
635 l_fault_cursor.after or else l_has_to_be_attempted
636 loop
637 if is_fault_to_be_attempted_and_approachable (l_fault_cursor.item) then
638 l_has_to_be_attempted := True
639 end
640 l_fault_cursor.forth
641 end
642 set_has_to_be_attempted (l_has_to_be_attempted)
643 end
644
645 feature -- Config <-> GUI sync
646
647 propogate_values_from_config_to_ui
648 -- <Precursor>
649 do
650 enable_check_menu_item (evmenucheck_implementation_fixable, True, config.should_show_implementation_fixable)
651 enable_check_menu_item (evmenucheck_contract_fixable, True, config.should_show_contract_fixable)
652 enable_check_menu_item (evmenucheck_not_fixable, True, config.should_show_not_fixable)
653
654 enable_check_menu_item (evmenucheck_not_yet_attempted, True, config.should_show_not_yet_attempted)
655 enable_check_menu_item (evmenucheck_candidate_fix_available, True, config.should_show_candidate_fix_available)
656 enable_check_menu_item (evmenucheck_candidate_fix_unavailable, True, config.should_show_candidate_fix_unavailable)
657 enable_check_menu_item (evmenucheck_candidate_fix_accepted, True, config.should_show_candidate_fix_accepted)
658 enable_check_menu_item (evmenucheck_manually_fixed, True, config.should_show_manually_fixed)
659 end
660
661 propogate_values_from_ui_to_config
662 -- Propogate changes from UI to config.
663 do
664 config.set_show_implementation_fixable (evmenucheck_implementation_fixable.is_selected)
665 config.set_show_contract_fixable (evmenucheck_contract_fixable.is_selected)
666 config.set_show_not_fixable (evmenucheck_not_fixable.is_selected)
667
668 config.set_show_not_yet_attempted (evmenucheck_not_yet_attempted.is_selected)
669 config.set_show_candidate_fix_available (evmenucheck_candidate_fix_available.is_selected)
670 config.set_show_candidate_fix_unavailable (evmenucheck_candidate_fix_unavailable.is_selected)
671 config.set_show_candidate_fix_accepted (evmenucheck_candidate_fix_accepted.is_selected)
672 config.set_show_manually_fixed (evmenucheck_manually_fixed.is_selected)
673 end
674
675 feature{NONE} -- Config <-> GUI sync implementation
676
677 enable_check_menu_item (a_item: EV_CHECK_MENU_ITEM; a_is_sensitive, a_is_selected: BOOLEAN)
678 -- Set status of `a_item', using `a_is_sensitive' and `a_is_selected'.
679 require
680 a_item /= Void
681 do
682 if a_is_sensitive then
683 a_item.enable_sensitive
684 if a_is_selected then
685 a_item.enable_select
686 else
687 a_item.disable_select
688 end
689 else
690 a_item.disable_select
691 a_item.disable_sensitive
692 end
693 end
694
695 feature{NONE} -- Implementation
696
697 has_to_be_attempted: BOOLEAN assign set_has_to_be_attempted
698 -- Has the grid some fault with status 'to-be-attempted'?
699
700 forwarding_task: ES_ADB_OUTPUT_RETRIEVER
701 -- Task to forward the process output to `info_center'.
702
703 fault_to_row_table: DS_HASH_TABLE [EV_GRID_ROW, ES_ADB_FAULT]
704 -- Table mapping faults to their associated rows.
705 do
706 if fault_to_row_table_internal = Void then
707 create fault_to_row_table_internal.make_equal (64)
708 end
709 Result := fault_to_row_table_internal
710 end
711
712 feature_to_row_table: DS_HASH_TABLE [EV_GRID_ROW, STRING]
713 -- Table mapping features to their associated rows.
714 do
715 if feature_to_row_table_internal = Void then
716 create feature_to_row_table_internal.make_equal (64)
717 end
718 Result := feature_to_row_table_internal
719 end
720
721 feature{NONE} -- Cache
722
723 fault_to_row_table_internal: like fault_to_row_table
724 -- Cache for `fault_to_row_table'.
725
726 feature_to_row_table_internal: like feature_to_row_table
727 -- Cache for `feature_to_row_table'.
728
729
730
731 ;note
732 copyright: "Copyright (c) 1984-2014, Eiffel Software"
733 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
734 licensing_options: "http://www.eiffel.com/licensing"
735 copying: "[
736 This file is part of Eiffel Software's Eiffel Development Environment.
737
738 Eiffel Software's Eiffel Development Environment is free
739 software; you can redistribute it and/or modify it under
740 the terms of the GNU General Public License as published
741 by the Free Software Foundation, version 2 of the License
742 (available at the URL listed under "license" above).
743
744 Eiffel Software's Eiffel Development Environment is
745 distributed in the hope that it will be useful, but
746 WITHOUT ANY WARRANTY; without even the implied warranty
747 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
748 See the GNU General Public License for more details.
749
750 You should have received a copy of the GNU General Public
751 License along with Eiffel Software's Eiffel Development
752 Environment; if not, write to the Free Software Foundation,
753 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
754 ]"
755 source: "[
756 Eiffel Software
757 5949 Hollister Ave., Goleta, CA 93117 USA
758 Telephone 805-685-1006, Fax 805-685-6869
759 Website http://www.eiffel.com
760 Customer support http://support.eiffel.com
761 ]"
762 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23