Commit Graph

93 Commits

Author SHA1 Message Date
Robby Findler
39e4ac15e5 bring 'jump to definition' more in line with online check syntax
That is, when right-clicking on an imported identifier, if the
file that has that identifier's definition is open and online
check syntax has completed, then offer a "jump to definition" menu
item that just jumps there with the already computed informtion.
If the file isn't open or online check syntax hasn't completed,
instead offer just to go to the file, without jumping to the definition

also
- things should generally work slightly better with submodules
- jumping to identifiers should do a better job with scrolling,
  specifically it should scroll so the jumped-to identifier is
  about 20% from the top of the window (unless it was already visible,
  in which case no scrolling should occur)
2013-03-05 22:39:34 -06:00
Robby Findler
574fc8f50f add a missing arg to jump-to-next-callback
closes PR 13560
2013-02-26 21:55:17 -06:00
Robby Findler
c6f106d285 remove spurious printf 2013-02-19 19:18:17 -06:00
Robby Findler
d3e1c16159 adjust the c:x;n and c:x;p keybindings to use the
same information as the yellow green bubbles

Before, when you typed c:x;n, drracket would look at the identifier
you're on, find its binder, find all bound occurrences of that binder,
sort them by position in the buffer, and then jump to the one that
follows where you are.

This works great for things like the "x" in "(let ([x 1]) x x)"
but not so great for things like the "define" in:

  #lang racket
  (define x '(+ 1 2))
  (define y '(+ 3 4))

since that would jump to the quote, since there are bindign arrows
going from the "racket" to the define and to the quote.

Now, since it is using information ultimately derived directly
from (and only from) free-identifier=? (the arrows also come from
identifier-binding, which is how we get those arrows in the second
example above) you jump from the first define to the second define,
which seems better.
2013-02-19 13:52:42 -06:00
Robby Findler
85f9fbbaee interactivity fix for online check syntax
commit e503850f21 broke drracket's
interactivity (for some files it could take 2 seconds to do
that one line)

This changes the bindings-table so that it maps to sets instead of
lists. Now, instead of mutating all entries in the table right after
collecting everything, just leave them as sets until we need the info
and just sort a single entry, when it is needed
2013-02-18 16:33:50 -06:00
Robby Findler
8fb49059cb add a 'jump to previous binding occurrence' keybinding 2013-02-18 10:38:43 -06:00
Robby Findler
e503850f21 fix the c:x;n keybinding when used with online check syntax info
(and perhaps other parts of online check syntax)
2013-02-18 10:38:43 -06:00
Robby Findler
76cc599ff9 fix bug in check syntax introduced when adding the
new green, mouse-over, which-identifiers-are-the-same bubbles
2013-02-05 12:32:48 -06:00
Robby Findler
25f92f8e9e fix a problem with the way that check syntax's interval map
tracks information about the program
2013-02-02 19:35:09 -06:00
Robby Findler
a90434b080 avoid a deadlock introduced in recent identifier highlighting commit 2013-02-01 19:17:51 -06:00
Robby Findler
74c97cfc90 Rackety 2013-01-31 11:23:20 -06:00
Robby Findler
a3cde5fb42 adjust check syntax so it highlights all identifiers with the same
binding site (with a green/yellow bubble) when the mouse moves over
any one of them

This change comes about because of the recent fixes to the
interactivity wrt to the rename menu. Basically, in order to fix the
bug (but still preserve the interactivity optimization), check syntax
changed from sending the information "here is a place to offer a
rename for these identifiers" to "here is a set of identifiers that
are all free-identifier=?" (the difference being that the latter does
not imply you got them all (which enables the optimization) and that
the information is slightly less rename-menu specific (which enables
the change in this commit))
2013-01-31 10:58:04 -06:00
Robby Findler
b4ec1de386 unbreak drr 2013-01-30 21:48:22 -06:00
Robby Findler
dc4a74ddf3 fix bug in commit 4c4161ce2b 2013-01-30 15:11:28 -06:00
Robby Findler
4c4161ce2b guard a call to invalidate-bitmap-cache in
check syntax so it only happens when something
would draw differently
2013-01-30 11:54:47 -06:00
Robby Findler
f0450d716b fixes the responsiveness optimization disabled in
c8bee5acf7
2013-01-29 19:02:32 -06:00
Robby Findler
3e5a9ca3cd unbreak check syntax
get-current-tab may not be the right tab to replay the trace,
now that online expansion runs other tabs when the current tab
is up to date.
2013-01-27 07:31:34 -06:00
Robby Findler
3e3283aeba adjust drracket so check syntax can add its preferences itself
closes PR 13419
2013-01-08 01:01:40 -06:00
Robby Findler
7cad346cf8 add a preference to disable the arrows in online check syntax (and regular check syntax too) 2012-12-21 22:08:51 -06:00
Robby Findler
938959611e rework online compilation's internals
Things should now generally be set up to work better --
for example online check syntax is smarter now about
what happens when switching tabs/frames and this also
makes it easier to add new ways for a window to become
dirty (that is, for it to be known that it needs to
be recompiled)
2012-12-19 10:50:01 -06:00
Robby Findler
3a04bed479 avoid calling client->screen with numbers out of its domain
related to PR 13292
2012-11-23 15:41:04 -06:00
Robby Findler
4f27df3179 make the f2 button go find the definitions text,
instead of assuming it was typed in the definitions text

closes PR 13225
2012-11-22 10:10:21 -06:00
Robby Findler
0e655f8e79 only clear out the (offline) check syntax error message
panel when there is something definitely in the panel,
insert of doing on every insertion to the editor
2012-11-11 08:53:12 -06:00
Robby Findler
e2d74f2cf3 streamline the objects that are sent across the channel from
the expansion place to the main drracket place during
online check syntax
2012-10-31 16:52:44 -05:00
Robby Findler
c6caf11323 Adjust online check syntax's trace replay code so that it:
- lets other events be handled based on how long it has been
  replaying the current trace (instead of based on the number of
  pieces in the trace that have been seen)

- breaks up the syncheck:add-rename-menu pieces of the trace to
  be more granular (to make the previous point work better)

This should make DrRacket more responsive when the trace is being
replayed
2012-10-26 21:49:45 -05:00
Robby Findler
e89a121ae5 add some first-cut logging information to drracket
to track how long events take to be handled
2012-10-26 21:49:44 -05:00
Robby Findler
197b8308d0 fix some part of the check syntax blinking arrows infrastructure
to better cope with tooltips when tabs change and when the frame
becomes in-active.

related to PR 13139
2012-10-10 10:44:01 -05:00
Robby Findler
60a035889f make tooltips go away if the drracket window isn't
the top-level window (and make them not appear in
that case, too)

closes PR 13139
2012-09-28 23:09:16 -05:00
Robby Findler
e958c33739 make a bunch of unmutated private fields bound to procedures into private methods
(the usual (define f ...) in a class confusion)
2012-09-28 22:44:27 -05:00
Robby Findler
c3a454aebf Add a missing check for when arrow-records might be #f
closes PR 13133
2012-09-21 16:20:07 -05:00
Robby Findler
ae87169d7e eliminate some dead code (showuld have been removed in an earlier commit) 2012-09-19 06:08:03 -05:00
Robby Findler
51d41c6cfe adjust check syntax so that it doesn't take over the right-click
menu, but instead cooperates with the existing protocol
(using keymap:add-to-right-button-menu)
2012-09-19 05:19:03 -05:00
Robby Findler
8a4567f5aa adjust the tooltip position so it goes to the end of the line where the arrowhead sits 2012-08-27 20:13:49 -05:00
Robby Findler
9934f202c9 avoid allocating a bunch of boxes (instead use ones already lying around) 2012-08-27 20:13:49 -05:00
Robby Findler
0d92608367 rename contract-gui.rkt to blueboxes-gui.rkt 2012-08-23 21:42:07 -05:00
Robby Findler
25e4115f32 give the f2 keybinding a more useful name
(since it shows up in the keybindigns dialog box)
2012-08-16 19:16:57 -05:00
Robby Findler
0c6734f782 Add the contents of the "blue boxes" in the docs to the upper-right
corner of the definitions window, based on the information that check
syntax computes

This commit contains two separate changes to make this work:

  - adding a new renderer, based on the text renderer, that
    pulls out the contents of the blue boxes and saves them
    in the doc/ directories (specifically in the files named
    contract-blueboxes.rktd)

  - extend check syntax to use and display the information
    build by the new renderer
2012-08-12 08:41:46 -05:00
Robby Findler
1a619bd047 add tooltips at the start and end of arrows indicating how many references
there are and how many definition sites there are (in check syntax)

also: Rackety
2012-07-30 21:46:22 -05:00
Robby Findler
a66c735b82 removed the check syntax mode support 2012-07-17 13:07:41 -05:00
Robby Findler
f61f0830e5 change register-toolbar-button so that it accepts a number
argument and uses that to order the buttons in the DrRacket
panel.

Also, order all of the buttons via these numbers in
a more sane way
2012-02-25 16:57:49 -06:00
Robby Findler
914f9feebc lighten some check syntax arrow colors in white-on-black mode
closes PR 12594
2012-02-22 16:41:46 -06:00
Robby Findler
e8902f9981 added a hack to keep DrRacket from freezing when it is unable to
detect if a (n online check syntax) rename would conflict with
an existing name. (This can happen because the remote place's
custodian gets shutdown due to, for example, another tab's online
check syntax running.)
2012-01-31 21:11:16 -06:00
Robby Findler
188f868a28 Remove the position-location cache that check syntax used to maintain for
the purpose of drawing arrows.

The computation to fill in the cache seems to actually be pretty quick and
the work to clear the cache when it is out of date (via a call to on-change)
can be substantial on big files, so just not maintaining the cache seems better.
(there are 7254 arrows in drracket/private/unit.rkt, stored in an interval map,
and iterating over the interval-map in a for loop seems to be time consuming)

Also, DrRacket could get into a state where switching tabs would trigger a
call to on-change, which means that switching tabs would take a few seconds.
2011-12-23 16:15:26 -06:00
Robby Findler
458e2c2282 some long overdue Rackety: renaming the 'scheme:' exports of the framework to 'racket:' 2011-11-30 06:45:50 -06:00
Neil Toronto
4012373a8c Started icon reorganization
- SVG icon sources
 - Playback-style icons, logos, stop signs, magnifying glasses, etc., in diffuse and shiny styles
 - Program to pre-render SVG files (icons/private/svg/render-png.rkt)
 - Pre-rendered icons (PNGs in power-of-2 sizes)
 - Made `icons' a module, with functions to conveniently load icons and convert to/from picts
 - Scribble docs for `icons'
 - Used new icons in DrRacket toolbar
2011-11-28 22:09:15 -08:00
Robby Findler
25271be3e8 set the current-load-relative-directory to #f (initially) in drracket 2011-11-28 13:57:11 -06:00
Robby Findler
153dd73f6b adjust drracket to clean up the code that sets the initial value of
current-directory and current-load-relative-directory and to make
current-directory's initial value be the user's home directory
2011-11-28 13:29:55 -06:00
Neil Toronto
59691aab83 Arrows disappear immediately upon scroll; reduce scroll delay 2011-11-25 18:40:19 -07:00
Neil Toronto
d65b85ac55 Only try to build the Syntax Check popup menu if there is Syntax Check data 2011-11-20 22:23:38 -08:00
Neil Toronto
2d0fa3a60b UI fixes and improvements to Check Syntax
- Delays drawing arrows until mouse hovers for a very short time
- Delays drawing arrows when scrolling
- Tooltips appear in the correct pane when the editor is split
- Fixes infinite event queue with scrolling a split editor while a tooltip is displayed
2011-11-17 19:25:24 -07:00