added more info to popup menu
svn: r13894
This commit is contained in:
parent
aaea005d0f
commit
036c315621
|
@ -21,8 +21,8 @@ If the namespace does not, they are colored the unbound color.
|
|||
scheme/unit
|
||||
scheme/contract
|
||||
scheme/class
|
||||
scheme/list
|
||||
drscheme/tool
|
||||
mzlib/list
|
||||
syntax/toplevel
|
||||
syntax/boundmap
|
||||
mrlib/switchable-button
|
||||
|
@ -2574,7 +2574,8 @@ If the namespace does not, they are colored the unbound color.
|
|||
(when path
|
||||
(let ([index-entry (xref-tag->index-entry xref definition-tag)])
|
||||
(when index-entry
|
||||
(send defs-text syncheck:add-background-color source-editor "navajowhite" start fin (syntax-e stx))
|
||||
(send defs-text syncheck:add-background-color
|
||||
source-editor "navajowhite" start fin (syntax-e stx))
|
||||
(send defs-text syncheck:add-menu
|
||||
source-editor
|
||||
start
|
||||
|
@ -2583,7 +2584,7 @@ If the namespace does not, they are colored the unbound color.
|
|||
(λ (menu)
|
||||
(instantiate menu-item% ()
|
||||
(parent menu)
|
||||
(label (fw:gui-utils:format-literal-label (string-constant cs-view-docs) (exported-index-desc-name (entry-desc index-entry))))
|
||||
(label (build-docs-label (entry-desc index-entry)))
|
||||
(callback
|
||||
(λ (x y)
|
||||
(let* ([url (path->url path)]
|
||||
|
@ -2599,6 +2600,24 @@ If the namespace does not, they are colored the unbound color.
|
|||
url)])
|
||||
(send-url (url->string url2))))))))))))))))))))))
|
||||
|
||||
(define (build-docs-label desc)
|
||||
(let ([libs (exported-index-desc-from-libs desc)])
|
||||
(cond
|
||||
[(null? libs)
|
||||
(fw:gui-utils:format-literal-label
|
||||
(string-constant cs-view-docs)
|
||||
(exported-index-desc-name desc))]
|
||||
[else
|
||||
(fw:gui-utils:format-literal-label
|
||||
(string-constant cs-view-docs-from)
|
||||
(format
|
||||
(string-constant cs-view-docs)
|
||||
(exported-index-desc-name desc))
|
||||
(apply string-append
|
||||
(add-between
|
||||
(map (λ (x) (format "~s" x)) libs)
|
||||
", ")))])))
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
|
|
@ -192,6 +192,7 @@ please adhere to these guidelines:
|
|||
(cs-status-loading-docs-index "Check Syntax: loading documentation index")
|
||||
(cs-mouse-over-import "binding ~s imported from ~s")
|
||||
(cs-view-docs "View documentation for ~a")
|
||||
(cs-view-docs-from "~a from ~a") ;; a completed version of the line above (cs-view-docs) is put into the first ~a and a list of modules (separated by commas) is put into the second ~a. Use check syntax and right-click on a documented variable (eg, 'require') to see this in use
|
||||
|
||||
(cs-lexical-variable "lexical variable")
|
||||
(cs-imported-variable "imported variable")
|
||||
|
|
Loading…
Reference in New Issue
Block a user