commit 3f810108ff1c0c13545d0103b0f94d07cf293099
parent 90758ff4e514d5ab73c750ec52e47a39a3508e49
Author: Ryan Culpepper <ryanc@racket-lang.org>
Date: Thu, 1 Feb 2007 23:19:44 +0000
Macro stepper: cosmetic changes, new interface (stub)
svn: r5536
original commit: 679bd4e30cb1ad602a6e7c77af5ee6f9e332af22
Diffstat:
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git 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
@@ -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