diff --git a/collects/macro-debugger/syntax-browser/controller.ss b/collects/macro-debugger/syntax-browser/controller.ss index 5f0d78d..9df5c55 100644 --- a/collects/macro-debugger/syntax-browser/controller.ss +++ b/collects/macro-debugger/syntax-browser/controller.ss @@ -11,12 +11,13 @@ (class* object% (syntax-controller<%> syntax-pp-snip-controller<%> color-controller<%>) + (init-field (primary-partition (new-bound-partition))) + (init-field (properties-controller #f)) (define colorers null) (define selection-listeners null) (define selected-syntax #f) (define identifier=?-listeners null) - (init-field (properties-controller #f)) ;; syntax-controller<%> Methods @@ -42,7 +43,7 @@ (set! selection-listeners (cons p selection-listeners))) (define/public (on-update-identifier=? name id=?) - (set! -secondary-partition + (set! secondary-partition (and id=? (new partition% (relation id=?)))) (for-each (lambda (c) (send c refresh)) colorers) (for-each (lambda (f) (f name id=?)) identifier=?-listeners)) @@ -61,11 +62,10 @@ ;; color-controller<%> Methods - (define -primary-partition (new-bound-partition)) - (define -secondary-partition #f) + (define secondary-partition #f) - (define/public (get-primary-partition) -primary-partition) - (define/public (get-secondary-partition) -secondary-partition) + (define/public (get-primary-partition) primary-partition) + (define/public (get-secondary-partition) secondary-partition) ;; Initialization (super-new) diff --git a/collects/macro-debugger/syntax-browser/interfaces.ss b/collects/macro-debugger/syntax-browser/interfaces.ss index babd7b6..32af451 100644 --- a/collects/macro-debugger/syntax-browser/interfaces.ss +++ b/collects/macro-debugger/syntax-browser/interfaces.ss @@ -115,6 +115,14 @@ select-syntax apply-styles)) + ;; syntax-sharing-context<%> + ;; A syntax-sharing-context<%> + ;; Syntax snips search their enclosing editors for instances of sharing contexts + (define syntax-sharing-context<%> + (interface () + ;; get-shared-partition + get-shared-partition)) + ;;---------- ;; Convenience widget, specialized for displaying stx and not much else