Adjusted the 'clear error highlight' menu item so it clears the coverage annotations too.

This commit is contained in:
Robby Findler 2010-09-21 13:34:34 -05:00
parent d4c68e7359
commit d55932e3df
2 changed files with 12 additions and 5 deletions

View File

@ -3612,13 +3612,18 @@ module browser threading seems wrong.
(parent language-specific-menu) (parent language-specific-menu)
(callback (callback
(λ (_1 _2) (λ (_1 _2)
(let ([ints (send (get-current-tab) get-ints)]) (let* ([tab (get-current-tab)]
(send ints reset-error-ranges)))) [ints (send tab get-ints)]
[defs (send tab get-defs)])
(send ints reset-error-ranges)
(send defs clear-test-coverage))))
(help-string (string-constant clear-error-highlight-item-help-string)) (help-string (string-constant clear-error-highlight-item-help-string))
(demand-callback (demand-callback
(λ (item) (λ (item)
(let ([ints (send (get-current-tab) get-ints)]) (let* ([tab (get-current-tab)]
(send item enable (send ints get-error-ranges)))))) [ints (send tab get-ints)])
(send item enable (or (send ints get-error-ranges)
(send tab get-test-coverage-info-visible?)))))))
(make-object separator-menu-item% language-specific-menu) (make-object separator-menu-item% language-specific-menu)
(make-object menu:can-restore-menu-item% (make-object menu:can-restore-menu-item%
(string-constant create-executable-menu-item-label) (string-constant create-executable-menu-item-label)

View File

@ -294,7 +294,9 @@ limit on the amount of memory that a program running in
DrRacket is allowed to consume.} DrRacket is allowed to consume.}
@item{@defmenuitem{Clear Error Highlight} Removes the red @item{@defmenuitem{Clear Error Highlight} Removes the red
background that signals the source location of an error.} background that signals the source location of an error.
Also removes the highlighting for uncovered (untested)
portions of the program.}
@item{@defmenuitem{Create Executable...} Creates a separate launcher @item{@defmenuitem{Create Executable...} Creates a separate launcher
for running your program. See @secref["create-exe"] for more for running your program. See @secref["create-exe"] for more