From d55932e3df504dead1ebb717f2a0a92a79f63e22 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 21 Sep 2010 13:34:34 -0500 Subject: [PATCH] Adjusted the 'clear error highlight' menu item so it clears the coverage annotations too. --- collects/drracket/private/unit.rkt | 13 +++++++++---- collects/scribblings/drracket/menus.scrbl | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/collects/drracket/private/unit.rkt b/collects/drracket/private/unit.rkt index 637c271613..c466dcf3ec 100644 --- a/collects/drracket/private/unit.rkt +++ b/collects/drracket/private/unit.rkt @@ -3612,13 +3612,18 @@ module browser threading seems wrong. (parent language-specific-menu) (callback (λ (_1 _2) - (let ([ints (send (get-current-tab) get-ints)]) - (send ints reset-error-ranges)))) + (let* ([tab (get-current-tab)] + [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)) (demand-callback (λ (item) - (let ([ints (send (get-current-tab) get-ints)]) - (send item enable (send ints get-error-ranges)))))) + (let* ([tab (get-current-tab)] + [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 menu:can-restore-menu-item% (string-constant create-executable-menu-item-label) diff --git a/collects/scribblings/drracket/menus.scrbl b/collects/scribblings/drracket/menus.scrbl index 8331f38f09..bc13ca80e8 100644 --- a/collects/scribblings/drracket/menus.scrbl +++ b/collects/scribblings/drracket/menus.scrbl @@ -294,7 +294,9 @@ limit on the amount of memory that a program running in DrRacket is allowed to consume.} @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 for running your program. See @secref["create-exe"] for more